You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Robert Levas <rl...@hortonworks.com> on 2015/05/24 16:23:39 UTC
Review Request 34643: Kerberos: Creating principals in AD when special
characters are involved causes failures
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34643/
-----------------------------------------------------------
Review request for Ambari, Emil Anca, Robert Nettleton, and Tom Beerbower.
Bugs: AMBARI-11362
https://issues.apache.org/jira/browse/AMBARI-11362
Repository: ambari
Description
-------
Creating principals in AD when special characters are involved causes failures.
The following characters in the CN need to be escaped:
```
/ , \ # + < > ; " =
```
*Note:* javax.naming.ldap.Rdn will properly escape relative distinguished name parts.
The following characters in the sAMAccountName need to be removed or replaced:
```
[ ] : ; | = + * ? < > / \
```
*Note:* This needs to be done explicitly within the attributes set if a relevant entry exists.
```
// Replace the following _illegal_ characters: [ ] : ; | = + * ? < > / \
value = value.toString().replaceAll("\[|\]|\:|\;|\||\=|\+|\*|\?|\<|\>|\/|\\", "_");
```
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java 38a7563
ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java 48bf473
Diff: https://reviews.apache.org/r/34643/diff/
Testing
-------
Manually tested using different special characters in the CN and spaces in the container DN.
Thanks,
Robert Levas
Re: Review Request 34643: Kerberos: Creating principals in AD when
special characters are involved causes failures
Posted by Robert Nettleton <rn...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34643/#review85095
-----------------------------------------------------------
Ship it!
Ship It!
- Robert Nettleton
On May 24, 2015, 2:23 p.m., Robert Levas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34643/
> -----------------------------------------------------------
>
> (Updated May 24, 2015, 2:23 p.m.)
>
>
> Review request for Ambari, Emil Anca, Robert Nettleton, and Tom Beerbower.
>
>
> Bugs: AMBARI-11362
> https://issues.apache.org/jira/browse/AMBARI-11362
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Creating principals in AD when special characters are involved causes failures.
>
> The following characters in the CN need to be escaped:
> ```
> / , \ # + < > ; " =
> ```
>
> *Note:* javax.naming.ldap.Rdn will properly escape relative distinguished name parts.
>
>
> The following characters in the sAMAccountName need to be removed or replaced:
> ```
> [ ] : ; | = + * ? < > / \
> ```
>
> *Note:* This needs to be done explicitly within the attributes set if a relevant entry exists.
> ```
> // Replace the following _illegal_ characters: [ ] : ; | = + * ? < > / \
> value = value.toString().replaceAll("\[|\]|\:|\;|\||\=|\+|\*|\?|\<|\>|\/|\\", "_");
> ```
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java 38a7563
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java 48bf473
>
> Diff: https://reviews.apache.org/r/34643/diff/
>
>
> Testing
> -------
>
> Manually tested using different special characters in the CN and spaces in the container DN.
>
>
> Thanks,
>
> Robert Levas
>
>
Re: Review Request 34643: Kerberos: Creating principals in AD when
special characters are involved causes failures
Posted by Emil Anca <ea...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34643/#review85123
-----------------------------------------------------------
Ship it!
Ship It!
- Emil Anca
On May 24, 2015, 2:23 p.m., Robert Levas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34643/
> -----------------------------------------------------------
>
> (Updated May 24, 2015, 2:23 p.m.)
>
>
> Review request for Ambari, Emil Anca, Robert Nettleton, and Tom Beerbower.
>
>
> Bugs: AMBARI-11362
> https://issues.apache.org/jira/browse/AMBARI-11362
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Creating principals in AD when special characters are involved causes failures.
>
> The following characters in the CN need to be escaped:
> ```
> / , \ # + < > ; " =
> ```
>
> *Note:* javax.naming.ldap.Rdn will properly escape relative distinguished name parts.
>
>
> The following characters in the sAMAccountName need to be removed or replaced:
> ```
> [ ] : ; | = + * ? < > / \
> ```
>
> *Note:* This needs to be done explicitly within the attributes set if a relevant entry exists.
> ```
> // Replace the following _illegal_ characters: [ ] : ; | = + * ? < > / \
> value = value.toString().replaceAll("\[|\]|\:|\;|\||\=|\+|\*|\?|\<|\>|\/|\\", "_");
> ```
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java 38a7563
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java 48bf473
>
> Diff: https://reviews.apache.org/r/34643/diff/
>
>
> Testing
> -------
>
> Manually tested using different special characters in the CN and spaces in the container DN.
>
>
> Thanks,
>
> Robert Levas
>
>