security - Spring Windows Authentication Sample fails to bind to LDAP -
we trying make spring windows authentication module working on sles 11 sp3 system.
the user authentication seems work fine:
2015-07-08 08:32:02.596 debug 16861 --- [io-18080-exec-3] o.s.s.authentication.providermanager : authentication attempt using org.springframework.security.kerberos.authentication.kerberosserviceauthenticationprovider 2015-07-08 08:32:02.596 debug 16861 --- [io-18080-exec-3] .a.kerberosserviceauthenticationprovider : try validate kerberos token 2015-07-08 08:32:02.966 debug 16861 --- [io-18080-exec-3] .a.kerberosserviceauthenticationprovider : succesfully validated dummy@example.com 2015-07-08 08:32:02.967 debug 16861 --- [io-18080-exec-3] o.s.s.l.s.filterbasedldapusersearch : searching user 'dummy@example.com', user search [ searchfilter: '(| (userprincipalname={0}) (samaccountname={0}))', searchbase: 'ou=users,ou=custom,dc=example.com,dc=com', scope: subtree, searchtimelimit: 0, dereflinkflag: false ] debug true storekey true useticketcache false usekeytab true donotprompt true ticketcache null isinitiator true keytab /usr/share/tomcat/conf/myapplication.keytab refreshkrb5config false principal http/myapplication.example.com@example.com tryfirstpass false usefirstpass false storepass false clearpass false principal http/myapplication.example.com@example.com use keytab commit succeeded then attempt search user in our ldap/activedirectory fails:
2015-07-08 08:17:02.999 debug 16584 --- [io-18080-exec-3] o.s.l.c.support.abstractcontextsource : got ldap context on server 'ldaps://windc1.example.com:636/' 2015-07-08 08:17:03.050 debug 16584 --- [io-18080-exec-3] w.c.httpsessionsecuritycontextrepository : securitycontext empty or contents anonymous - context not stored in httpsession. 2015-07-08 08:17:03.050 debug 16584 --- [io-18080-exec-3] s.s.w.c.securitycontextpersistencefilter : securitycontextholder cleared, request processing completed 2015-07-08 08:17:03.056 error 16584 --- [io-18080-exec-3] o.a.c.c.c.[.[.[/].[dispatcherservlet] : servlet.service() servlet [dispatcherservlet] in context path [] threw exception org.springframework.ldap.uncategorizedldapexception: uncategorized exception occured during ldap processing; nested exception javax.naming.namingexception: [ldap: error code 1 - 000004dc: ldaperr: dsid-0c0907 2b, comment: in order perform operation successful bind must completed on connection., data 0, v2580]; remaining name 'ou=users,ou=custom,dc=example.com,dc=com' my application.yml file looks this:
server: port: 18080 app: ad-domain: example.com ad-server: ldaps://windc1.example.com:636/ service-principal: http/myapplication.example.com@example.com keytab-location: /usr/share/tomcat/conf/myapplication.keytab ldap-search-base: ou=users,ou=custom,dc=example.com,dc=com ldap-search-filter: "(| (userprincipalname={0}) (samaccountname={0}))" i checked verified service-principal , keytab produce valid tokens seems have no influence ldap module should understanding try bind directory.
as may allready noticed new stuff , appreciate every suggestion.
thx lot
regards
dominik
Comments
Post a Comment