Announcement Announcement Module
Collapse
No announcement yet.
How to do LDAP authentication and database Authorization in Spring security? Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    Originally posted by veerasundark View Post
    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?
    Yes - this is a common scenario for some people.

    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.

    Comment

    Working...
    X