Results 1 to 2 of 2

Thread: How to do LDAP authentication and database Authorization in Spring security?

  1. #1

    Default 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. #2
    Join Date
    Oct 2008
    Posts
    136

    Default

    Quote 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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •