-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55764/#review162432
-----------------------------------------------------------


Ship it!




Ship It!

- Sebastian Toader


On Jan. 20, 2017, 2:42 p.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55764/
> -----------------------------------------------------------
> 
> (Updated Jan. 20, 2017, 2:42 p.m.)
> 
> 
> Review request for Ambari, Eugene Chekanskiy, Jonathan Hurley, Laszlo Puskas, 
> Oliver Szabo, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-19632
>     https://issues.apache.org/jira/browse/AMBARI-19632
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ldap sync fails when there are special characters in distinguished names. 
> 
> For example if there was a user with the distinguished name of 
> {{OU=test/test,OU=users,DC=EXAMPLE,DC=COM}} and that user was a member of a 
> synced group, then the lookup of the user using the membership attribute in 
> the group would fail due to the special character.  
> 
> The error would look something like
> ```
> REASON: Caught exception running LDAP sync. Uncategorized exception occured 
> during LDAP processing; nested exception is javax.naming.NamingException: 
> [LDAP: error code 1 - 000020D6: SvcErr: DSID-031007DB, problem 5012 
> (DIR_ERROR), data 0
> ]; remaining name 'OU=test/test,OU=users,DC=EXAMPLE,DC=COM'
> ```
> 
> #Solution
> Update the library versionf for Spring LDAP 
> - {{org.springframework.security/spring-security-ldap}} to {{4.0.4.RELEASE}}
> - {{org.springframework.ldap/spring-ldap-core}} to {{2.0.4.RELEASE}}
> 
> Then use {{LdapUtils.newLdapName}} to convert a String representing a DN into 
> a {{javax.naming.ldap.LdapName}} and use that object in the search facility 
> executed in 
> {{org.apache.ambari.server.security.ldap.AmbariLdapDataPopulator#getFilteredLdapUsers(java.lang.String,
>  org.springframework.ldap.filter.Filter)}}.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 16ea2af 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticator.java
>  b4ef889 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapUtils.java
>  a64ab3d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java
>  2dccf11 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
>  5629913 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
>  fcaae37 
>   
> ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
>  6143cf8 
> 
> Diff: https://reviews.apache.org/r/55764/diff/
> 
> 
> Testing
> -------
> 
> manually test syncing LDAP and authentication.
> 
> 
> Thanks,
> 
> Robert Levas
> 
>

Reply via email to