hadoopldapbigdataapachedsapache-knox

Apache Knox Ldap Integration failed


I am using Apacheknox version 1.0.0. I have tried to authenticate knox uiusing Ldap user. I have tried with following changes in knox

 In ambari --> knox-->config-->Advanced topology           

            
<param>
<name>main.ldapRealm.userDnTemplate</name>
<value>cn=admin</value>
</param>
<param>
<name>main.ldapRealm.contextFactory.url</name>
<value>ldap://x.x.x.x:10390</value>
</param>

First Iam trying for single user only.I have tried different user search But no luck I am always getting same error like below.

2021-01-29 10:22:07,266 ERROR knox.gateway (KnoxLdapRealm.java:doGetAuthenticationInfo(206)) - Shiro unable to login: javax.naming.AuthenticationException: [LDAP: error
 code 49 - INVALID_CREDENTIALS: Bind failed: Invalid authentication]

enter image description here


Solution

  • LDAP: error code 49 - INVALID_CREDENTIALS Means, three things, Username/password is incorrect or the account is locked. You are having this error for Bind user.

    You need to verify you systemUsername and systemPassword in configured topology.

    A tool ldapsearch can be useful to verify credentials for Bind user.

    main.ldapRealm.userDnTemplate should be like following

    <param>
    <name>main.ldapRealm.userDnTemplate</name>
    <value>cn={0},ou=hadoop,ou=personal,ou=accounts,dc=example,dc=com</value>
    </param>