Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Spring
Issue with Spring LDAP/AD authentication
Martijn Verburg
author
Posts: 3285
13
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
I have the following configuration:
<bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource"> <constructor-arg value="ldap://myldapserver:389" /> <property name="base" value="dc=uk,dc=mydomain,dc=com"/> <property name="userDn" value="cn=Verburg Martijn,ou=People,ou=Logins,dc=uk,dc=mydomain,dc=com" /> <property name="password" value="mypassword" /> </bean> <bean id="secondLdapProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider"> <s:custom-authentication-provider /> <constructor-arg> <bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"> <constructor-arg ref="contextSource" /> <property name="userSearch"> <bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch"> <constructor-arg index="0" value="ou=People,ou=Logins,dc=uk,dc=mydomain,dc=com" /> <constructor-arg index="1" value="(sAMAccountName={0})" /> <constructor-arg index="2" ref="contextSource" /> <property name="searchSubtree" value="true" /> </bean> </property> </bean> </constructor-arg> <constructor-arg> <bean class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator"> <constructor-arg ref="contextSource" /> <constructor-arg value="" /> <property name="searchSubtree" value="true" /> <property name="convertToUpperCase" value="false" /> </bean> </constructor-arg> </bean>
But when I attempt to login I get the following error:
Authentication request failed: org.springframework.security.AuthenticationServiceException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=uk,DC=mydomain,DC=com' ^@]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=uk,DC=mydomain,DC=com' ^@]; remaining name 'ou=People,ou=Logins,dc=uk,dc=mydomain,dc=com'; nested exception is org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=uk,DC=mydomain,DC=com' ^@]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=uk,DC=mydomain,DC=com' ^@]; remaining name 'ou=People,ou=Logins,dc=uk,dc=mydomain,dc=com'
Not sure where to look next!
Cheers, Martijn,
Twitter
.
Martijn Verburg
author
Posts: 3285
13
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Heh, I solved it, you don't need to specify the full dn in further operations when you've already set the base.
Cheers, Martijn,
Twitter
.
Seriously Rick? Seriously? You might as well just read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Password Change on Ldap keep on failing
[Spring Security] No bean named 'springSecurityFilterChain' is defined
LDAP query throws error
user Authentication problem using LDAPTemplate
user Authentication problem using LDAPTemplate
More...