File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Security LDAP authentication Multiple dn pattern

 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using spring security & using LDAP to authenticate our web application. In our LDAP configuration, there are multiple userndn patterns available. I would like to know how to configure multiple userdn patterns in the applicationContext-security.xml file. I have the below configuration specified



When I provide the above configuration in the xml file, users corresponding to Dn pattern for a specific location will only be able to login. I want to know how we can configure multiple userdn patterns in the xml file.

Any help on this is much appreciated. Thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't you just want to use the ldap user details service instead of a custom provider?

Also, you can create multiple UserDetailsService(s) and add them and authentication will loop through them till one authenticates the user. So each one would have a different dn pattern and work with what you are looking for.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic