Steve Loughran commented on YARN-2677:

Proposed fix is
# retain the restriction in the specification
# retain the punycoding in the code
# do NOT validate the hostname against DNS rules. 

If and when a switch to DNS exports takes place, the names will have to be 
escaped into DNS. 

The punycoding encoding guarantees that for a REST API, URLs paths will always 

> registry punycoding of usernames doesn't fix all usernames to be DNS-valid
> --------------------------------------------------------------------------
>                 Key: YARN-2677
>                 URL: https://issues.apache.org/jira/browse/YARN-2677
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: api, resourcemanager
>    Affects Versions: 2.6.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
> The registry has a restriction "DNS-valid names only" to retain the future 
> option of DNS exporting of the registry.
> to handle complex usernames, it punycodes the username first, using Java's 
> {{java.net.IDN}} class.
> This turns out to only map high unicode-> ASCII, and does nothing for 
> ascii-but-invalid-hostname chars, so stopping users with DNS-illegal names 
> (e.g. with an underscore in them) from being able to register

This message was sent by Atlassian JIRA

Reply via email to