May 28th, 2009, 04:40 AM
How to do LDAP authentication and database Authorization in Spring security?
I'm new to Spring, so this question may look like so obvious.
I'm trying to implement Spring security and my requirement is to authenticate the user name/password against a LDAP server and once the user is authenticated, I need to retrieve the user roles from a relational database.
is it possible to do this in Spring security?
May 28th, 2009, 12:14 PM
Yes - this is a common scenario for some people.
Originally Posted by veerasundark
You can use an LDAP authentication that works with your LDAP server, then pull the roles from some other data source based on the username and create a new authentication object with the old authentication object username/password and the new authority roles, and then set the authentication in the SecurityContextHolder to the new authentication object.
Tags for this Thread