DN Cannot be null error

1,277 views
Skip to first unread message

narendra agashe

unread,
Jul 18, 2016, 7:11:45 AM7/18/16
to ldaptive
Hi,

I am connecting to LDAP for authentication, my connection with LDAP is working fine but when I try to authenticate I get "DN Cannot be null error", i have made subtreeSearch true but error continues so bit confused.
The piece of code I am using for authentication is as follows. 

I am using this in Ratpack groovy and with ldaptive 1.1 version.

Regards,
Naren

SearchDnResolver dnResolver = new SearchDnResolver(new DefaultConnectionFactory(connConfig));
dnResolver.setBaseDn("ou=person,dc=mi-2,dc=com");
dnResolver.setSubtreeSearch(true);
dnResolver.setUserFilter("uid={0}");

BindAuthenticationHandler authHandler = new BindAuthenticationHandler(new DefaultConnectionFactory(connConfig));

Authenticator auth = new Authenticator(dnResolver, authHandler);
AuthenticationResponse response = auth.authenticate(new AuthenticationRequest("agashe", new Credential("password123")));
println auth;

if (response.getResult()) { // authentication succeeded
  println 'entered if'
} else { // authentication failed
  String msg = response.getMessage(); // read the failure message
  println msg
}

Daniel Fisher

unread,
Jul 18, 2016, 11:16:43 PM7/18/16
to ldap...@googlegroups.com
On Mon, Jul 18, 2016 at 7:11 AM narendra agashe <narendr...@gmail.com> wrote:
I am connecting to LDAP for authentication, my connection with LDAP is working fine but when I try to authenticate I get "DN Cannot be null error", i have made subtreeSearch true but error continues so bit confused.

Sounds like your DnResolver is failing. Turn on debug logging for the org.ldaptive package and you should see why.

--Daniel Fisher

narendra agashe

unread,
Jul 19, 2016, 5:45:52 AM7/19/16
to ldaptive
Hi Daniel,

Thanks for your reply, I turned on the logs and then logs looked like shown below

2016-07-19 14:58:10:349 TRACE org.ldaptive.ConnectionConfig - [ratpack-compute-1-2] - setting ldapUrl: ldaps://ldap.xyz.com:686
2016-07-19 14:58:10:350 TRACE org.ldaptive.ConnectionConfig - [ratpack-compute-1-2] - setting useSSL: true
2016-07-19 14:58:10:357 TRACE org.ldaptive.BindConnectionInitializer - [ratpack-compute-1-2] - setting bindDn: cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com
2016-07-19 14:58:10:357 TRACE org.ldaptive.BindConnectionInitializer - [ratpack-compute-1-2] - setting bindCredential: <suppressed>
2016-07-19 14:58:10:358 TRACE org.ldaptive.ConnectionConfig - [ratpack-compute-1-2] - setting connectionInitializer: [org.ldaptive.BindConnectionInitializer@593111054::bindDn=cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com, bindSaslConfig=null, bindControls=null]
2016-07-19 14:58:10:367 TRACE org.ldaptive.ConnectionConfig - [ratpack-compute-1-2] - setting sslConfig: [org.ldaptive.ssl.SslConfig@1184066040::credentialConfig=[org.ldaptive.ssl.KeyStoreCredentialConfig@-845595174::trustStore=classpath:/ratpack-pv-it.jks, trustStoreType=null, trustStoreAliases=null, keyStore=null, keyStoreType=null, keyStoreAliases=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null]
2016-07-19 14:58:10:379 TRACE org.ldaptive.provider.jndi.JndiProviderConfig - [ratpack-compute-1-2] - setting operationExceptionResultCodes: [PROTOCOL_ERROR, SERVER_DOWN]
2016-07-19 14:58:10:380 TRACE org.ldaptive.provider.jndi.JndiProviderConfig - [ratpack-compute-1-2] - setting controlProcessor: org.ldaptive.provider.ControlProcessor@6627e773
2016-07-19 14:58:10:380 TRACE org.ldaptive.provider.jndi.JndiProviderConfig - [ratpack-compute-1-2] - setting operationExceptionResultCodes: [PROTOCOL_ERROR, SERVER_DOWN]
2016-07-19 14:58:10:380 TRACE org.ldaptive.provider.jndi.JndiProviderConfig - [ratpack-compute-1-2] - setting controlProcessor: org.ldaptive.provider.ControlProcessor@3758ecb
2016-07-19 14:58:10:389 TRACE org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - setting baseDn: ou=people,dc=im-2,dc=com
2016-07-19 14:58:10:390 TRACE org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - setting subtreeSearch: true
2016-07-19 14:58:10:391 TRACE org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - setting userFilter: uid={0}
2016-07-19 14:58:10:391 TRACE org.ldaptive.provider.jndi.JndiProviderConfig - [ratpack-compute-1-2] - setting operationExceptionResultCodes: [PROTOCOL_ERROR, SERVER_DOWN]
2016-07-19 14:58:10:391 TRACE org.ldaptive.provider.jndi.JndiProviderConfig - [ratpack-compute-1-2] - setting controlProcessor: org.ldaptive.provider.ControlProcessor@7fa6d93
2016-07-19 14:58:10:405 DEBUG org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - resolve user=aga_she
2016-07-19 14:58:10:405 DEBUG org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - searching for DN using userFilter
2016-07-19 14:58:10:412 TRACE org.ldaptive.ssl.SslConfig - [ratpack-compute-1-2] - setting credentialConfig: [org.ldaptive.ssl.KeyStoreCredentialConfig@-845595174::trustStore=classpath:/ratpack-pv-it.jks, trustStoreType=null, trustStoreAliases=null, keyStore=null, keyStoreType=null, keyStoreAliases=null]
2016-07-19 14:58:10:413 TRACE org.ldaptive.ssl.SslConfig - [ratpack-compute-1-2] - setting trustManagers: null
2016-07-19 14:58:10:413 TRACE org.ldaptive.ssl.SslConfig - [ratpack-compute-1-2] - setting enabledCipherSuites: null
2016-07-19 14:58:10:413 TRACE org.ldaptive.ssl.SslConfig - [ratpack-compute-1-2] - setting enabledProtocols: null
2016-07-19 14:58:10:413 TRACE org.ldaptive.ssl.SslConfig - [ratpack-compute-1-2] - setting handshakeCompletedListeners: null
2016-07-19 14:58:10:416 TRACE org.ldaptive.ssl.SslConfig - [ratpack-compute-1-2] - setting trustManagers: [org.ldaptive.ssl.HostnameVerifyingTrustManager@15dd4e]
2016-07-19 14:58:10:417 TRACE org.ldaptive.ssl.KeyStoreCredentialReader - [ratpack-compute-1-2] - Found resource at classpath:/ratpack-pv-it.jks
2016-07-19 14:58:10:438 DEBUG org.ldaptive.ssl.KeyStoreCredentialReader - [ratpack-compute-1-2] - Successfully loaded credential java.security.KeyStore@3c0d856d from path classpath:/ratpack-pv-it.jks
2016-07-19 14:58:10:438 TRACE org.ldaptive.ssl.ThreadLocalTLSSocketFactory - [ratpack-compute-1-2] - Using SSLContextInitializer=[org.ldaptive.ssl.KeyStoreSSLContextInitializer@1601296722::trustManagers=[org.ldaptive.ssl.HostnameVerifyingTrustManager@15dd4e], trustKeystore=java.security.KeyStore@3c0d856d, trustAliases=null, authenticationKeystore=null, authenticationAliases=null]
2016-07-19 14:58:10:485 TRACE org.ldaptive.ssl.KeyStoreSSLContextInitializer - [ratpack-compute-1-2] - Initialize SSLContext with keyManagers=null and trustManagers=[[org.ldaptive.ssl.AggregateTrustManager@1913330562::trustManagers=[sun.security.ssl.X509TrustManagerImpl@255d646f, org.ldaptive.ssl.HostnameVerifyingTrustManager@15dd4e], trustStrategy=ALL]]
2016-07-19 14:58:10:697 TRACE org.ldaptive.provider.jndi.JndiConnectionFactory - [ratpack-compute-1-2] - [[ldapUrl=ldaps://ldap.xyz.com:686, count=0]] Attempting connection to ldaps://ldap.xyz.com:686 for strategy org.ldaptive.provider.DefaultConnectionStrategy@6e5bbe2a
2016-07-19 14:58:10:707 TRACE org.ldaptive.ssl.KeyStoreCredentialReader - [ratpack-compute-1-2] - Found resource at classpath:/ratpack-pv-it.jks
2016-07-19 14:58:10:707 DEBUG org.ldaptive.ssl.KeyStoreCredentialReader - [ratpack-compute-1-2] - Successfully loaded credential java.security.KeyStore@6b105080 from path classpath:/ratpack-pv-it.jks
2016-07-19 14:58:10:707 TRACE org.ldaptive.ssl.ThreadLocalTLSSocketFactory - [ratpack-compute-1-2] - Using SSLContextInitializer=[org.ldaptive.ssl.KeyStoreSSLContextInitializer@202605913::trustManagers=[org.ldaptive.ssl.HostnameVerifyingTrustManager@15dd4e], trustKeystore=java.security.KeyStore@6b105080, trustAliases=null, authenticationKeystore=null, authenticationAliases=null]
2016-07-19 14:58:10:708 TRACE org.ldaptive.ssl.KeyStoreSSLContextInitializer - [ratpack-compute-1-2] - Initialize SSLContext with keyManagers=null and trustManagers=[[org.ldaptive.ssl.AggregateTrustManager@323959735::trustManagers=[sun.security.ssl.X509TrustManagerImpl@4defacc7, org.ldaptive.ssl.HostnameVerifyingTrustManager@15dd4e], trustStrategy=ALL]]
2016-07-19 14:58:11:532 DEBUG org.ldaptive.BindOperation - [ratpack-compute-1-2] - execute request=[org.ldaptive.BindRequest@243711250::bindDn=cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com, saslConfig=null, controls=null, referralHandler=null, intermediateResponseHandlers=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@1023244626::config=[org.ldaptive.ConnectionConfig@2128532411::ldapUrl=ldaps://ldap.xyz.com:686, connectTimeout=-1, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@1184066040::credentialConfig=[org.ldaptive.ssl.KeyStoreCredentialConfig@-845595174::trustStore=classpath:/ratpack-pv-it.jks, trustStoreType=null, trustStoreAliases=null, keyStore=null, keyStoreType=null, keyStoreAliases=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=true, useStartTLS=false, connectionInitializer=[org.ldaptive.BindConnectionInitializer@593111054::bindDn=cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com, bindSaslConfig=null, bindControls=null]], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@1343140107::metadata=[ldapUrl=ldaps://ldap.xyz.com:686, count=1], environment={java.naming.ldap.factory.socket=org.ldaptive.ssl.ThreadLocalTLSSocketFactory, java.naming.ldap.version=3, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.security.protocol=ssl}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1809578037::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=org.ldaptive.provider.DefaultConnectionStrategy@6e5bbe2a, controlProcessor=org.ldaptive.provider.ControlProcessor@3758ecb, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@3c3b3bf5]
2016-07-19 14:58:11:784 DEBUG org.ldaptive.ssl.AggregateTrustManager - [Thread-1] - checkServerTrusted for sun.security.ssl.X509TrustManagerImpl@4defacc7 succeeded
2016-07-19 14:58:11:785 DEBUG org.ldaptive.ssl.DefaultHostnameVerifier - [Thread-1] - verifying hostname=ldap.xyz.com against cert=CN=Ldap.xyz.com, OU=Directory, O=Services, L=ABC, ST=New York, C=US
2016-07-19 14:58:11:786 DEBUG org.ldaptive.ssl.DefaultHostnameVerifier - [Thread-1] - verifyDNS using subjectAltNames=[]
2016-07-19 14:58:11:800 DEBUG org.ldaptive.ssl.DefaultHostnameVerifier - [Thread-1] - verifyDNS using CN=[Ldap.xyz.com]
2016-07-19 14:58:11:801 TRACE org.ldaptive.ssl.DefaultHostnameVerifier - [Thread-1] - matching for hostname=ldap.xyz.com, certName=Ldap.xyz.com, isWildcard=false
2016-07-19 14:58:11:801 TRACE org.ldaptive.ssl.DefaultHostnameVerifier - [Thread-1] - match=true for Ldap.xyz.com == ldap.xyz.com
2016-07-19 14:58:11:801 DEBUG org.ldaptive.ssl.DefaultHostnameVerifier - [Thread-1] - verifyDNS found hostname match: Ldap.xyz.com
2016-07-19 14:58:11:801 DEBUG org.ldaptive.ssl.HostnameVerifyingTrustManager - [Thread-1] - checkCertificateTrusted for org.ldaptive.ssl.DefaultHostnameVerifier@1f3a3061 succeeded against CN=Ldap.xyz.com, OU=Directory, O=Services, L=ABC, ST=New York, C=US
2016-07-19 14:58:11:801 DEBUG org.ldaptive.ssl.AggregateTrustManager - [Thread-1] - checkServerTrusted for org.ldaptive.ssl.HostnameVerifyingTrustManager@15dd4e succeeded
2016-07-19 14:58:11:801 DEBUG org.ldaptive.ssl.AggregateTrustManager - [Thread-1] - invoking getAcceptedIssuers invoked for sun.security.ssl.X509TrustManagerImpl@4defacc7
2016-07-19 14:58:11:801 DEBUG org.ldaptive.ssl.AggregateTrustManager - [Thread-1] - invoking getAcceptedIssuers invoked for org.ldaptive.ssl.HostnameVerifyingTrustManager@15dd4e
2016-07-19 14:58:12:573 DEBUG org.ldaptive.BindOperation - [ratpack-compute-1-2] - execute response=[org.ldaptive.Response@879785154::result=null, resultCode=SUCCESS, message=null, matchedDn=null, responseControls=null, referralURLs=null, messageId=-1] for request=[org.ldaptive.BindRequest@243711250::bindDn=cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com, saslConfig=null, controls=null, referralHandler=null, intermediateResponseHandlers=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@1023244626::config=[org.ldaptive.ConnectionConfig@2128532411::ldapUrl=ldaps://ldap.xyz.com:686, connectTimeout=-1, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@1184066040::credentialConfig=[org.ldaptive.ssl.KeyStoreCredentialConfig@-845595174::trustStore=classpath:/ratpack-pv-it.jks, trustStoreType=null, trustStoreAliases=null, keyStore=null, keyStoreType=null, keyStoreAliases=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=true, useStartTLS=false, connectionInitializer=[org.ldaptive.BindConnectionInitializer@593111054::bindDn=cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com, bindSaslConfig=null, bindControls=null]], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@1343140107::metadata=[ldapUrl=ldaps://ldap.xyz.com:686, count=1], environment={java.naming.ldap.factory.socket=org.ldaptive.ssl.ThreadLocalTLSSocketFactory, java.naming.ldap.version=3, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.security.protocol=ssl}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1809578037::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=org.ldaptive.provider.DefaultConnectionStrategy@6e5bbe2a, controlProcessor=org.ldaptive.provider.ControlProcessor@3758ecb, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@3c3b3bf5]
2016-07-19 14:58:12:579 DEBUG org.ldaptive.SearchOperation - [ratpack-compute-1-2] - execute request=[org.ldaptive.SearchRequest@746910059::baseDn=ou=people,dc=im-2,dc=com, searchFilter=[org.ldaptive.SearchFilter@1225181204::filter=uid={0}, parameters={user=aga_she}], returnAttributes=[1.1], searchScope=SUBTREE, timeLimit=0, sizeLimit=0, derefAliases=null, typesOnly=false, binaryAttributes=null, sortBehavior=UNORDERED, searchEntryHandlers=null, searchReferenceHandlers=null, controls=null, referralHandler=null, intermediateResponseHandlers=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@1023244626::config=[org.ldaptive.ConnectionConfig@2128532411::ldapUrl=ldaps://ldap.xyz.com:686, connectTimeout=-1, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@1184066040::credentialConfig=[org.ldaptive.ssl.KeyStoreCredentialConfig@-845595174::trustStore=classpath:/ratpack-pv-it.jks, trustStoreType=null, trustStoreAliases=null, keyStore=null, keyStoreType=null, keyStoreAliases=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=true, useStartTLS=false, connectionInitializer=[org.ldaptive.BindConnectionInitializer@593111054::bindDn=cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com, bindSaslConfig=null, bindControls=null]], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@1343140107::metadata=[ldapUrl=ldaps://ldap.xyz.com:686, count=1], environment={java.naming.ldap.factory.socket=org.ldaptive.ssl.ThreadLocalTLSSocketFactory, java.naming.ldap.version=3, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.security.protocol=ssl}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1809578037::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=org.ldaptive.provider.DefaultConnectionStrategy@6e5bbe2a, controlProcessor=org.ldaptive.provider.ControlProcessor@3758ecb, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@3c3b3bf5]
2016-07-19 14:58:12:820 DEBUG org.ldaptive.SearchOperation - [ratpack-compute-1-2] - execute response=[org.ldaptive.Response@2116735393::result=[org.ldaptive.SearchResult@4303153::entries=[], references=[]], resultCode=SUCCESS, message=null, matchedDn=null, responseControls=null, referralURLs=null, messageId=-1] for request=[org.ldaptive.SearchRequest@746910059::baseDn=ou=people,dc=im-2,dc=com, searchFilter=[org.ldaptive.SearchFilter@1225181204::filter=uid={0}, parameters={user=aga_she}], returnAttributes=[1.1], searchScope=SUBTREE, timeLimit=0, sizeLimit=0, derefAliases=null, typesOnly=false, binaryAttributes=null, sortBehavior=UNORDERED, searchEntryHandlers=null, searchReferenceHandlers=null, controls=null, referralHandler=null, intermediateResponseHandlers=null] with connection=[org.ldaptive.DefaultConnectionFactory$DefaultConnection@1023244626::config=[org.ldaptive.ConnectionConfig@2128532411::ldapUrl=ldaps://ldap.xyz.com:686, connectTimeout=-1, responseTimeout=-1, sslConfig=[org.ldaptive.ssl.SslConfig@1184066040::credentialConfig=[org.ldaptive.ssl.KeyStoreCredentialConfig@-845595174::trustStore=classpath:/ratpack-pv-it.jks, trustStoreType=null, trustStoreAliases=null, keyStore=null, keyStoreType=null, keyStoreAliases=null], trustManagers=null, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null], useSSL=true, useStartTLS=false, connectionInitializer=[org.ldaptive.BindConnectionInitializer@593111054::bindDn=cn=linksNet,ou=Applications,ou=xyz,ou=Services,dc=iM-2,dc=com, bindSaslConfig=null, bindControls=null]], providerConnectionFactory=[org.ldaptive.provider.jndi.JndiConnectionFactory@1343140107::metadata=[ldapUrl=ldaps://ldap.xyz.com:686, count=1], environment={java.naming.ldap.factory.socket=org.ldaptive.ssl.ThreadLocalTLSSocketFactory, java.naming.ldap.version=3, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.security.protocol=ssl}, providerConfig=[org.ldaptive.provider.jndi.JndiProviderConfig@1809578037::operationExceptionResultCodes=[PROTOCOL_ERROR, SERVER_DOWN], properties={}, connectionStrategy=org.ldaptive.provider.DefaultConnectionStrategy@6e5bbe2a, controlProcessor=org.ldaptive.provider.ControlProcessor@3758ecb, environment=null, tracePackets=null, removeDnUrls=true, searchIgnoreResultCodes=[TIME_LIMIT_EXCEEDED, SIZE_LIMIT_EXCEEDED, PARTIAL_RESULTS], sslSocketFactory=null, hostnameVerifier=null]], providerConnection=org.ldaptive.provider.jndi.JndiConnection@3c3b3bf5]
2016-07-19 14:58:12:822 INFO  org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - search for user=aga_she failed using filter=[org.ldaptive.SearchFilter@1225181204::filter=uid={0}, parameters={user=aga_she}]
2016-07-19 14:58:12:822 DEBUG org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - resolved dn=null for user=aga_she
2016-07-19 14:58:12:823 DEBUG org.ldaptive.auth.Authenticator - [ratpack-compute-1-2] - authenticate dn=null with request=[org.ldaptive.auth.AuthenticationRequest@834093384::user=aga_she, retAttrs=[1.1]]

Do you see any glaring error? I see BasDN getting in and then somehow it throws error as DN can not be null.

Regards,
Narendra 

Daniel Fisher

unread,
Jul 19, 2016, 10:23:05 AM7/19/16
to ldap...@googlegroups.com
On Tue, Jul 19, 2016 at 5:45 AM narendra agashe <narendr...@gmail.com> wrote:
2016-07-19 14:58:12:822 INFO  org.ldaptive.auth.SearchDnResolver - [ratpack-compute-1-2] - search for user=aga_she failed using filter=[org.ldaptive.SearchFilter@1225181204::filter=uid={0}, parameters={user=aga_she}]

Change your filter to '(uid={user})'
The SearchDnResolver implementation automatically configures a named parameter called 'user'.

--Daniel Fisher
 

narendra agashe

unread,
Jul 19, 2016, 10:41:34 AM7/19/16
to ldaptive
Thanks a ton Daniel your solution works like a charm.
You certainly have saved a lot of my effort. You are awesome! :) 

All I did is dnResolver.setUserFilter("(uid={user})"); 

Thanks Again and have a nice day ahead :)
Narendra

sabu nishad

unread,
Dec 15, 2019, 12:59:15 AM12/15/19
to ldaptive
Thank you, it is working for me also.. In my case it is  ((userprincipalname={user}))
Reply all
Reply to author
Forward
0 new messages