Results 1 to 2 of 2

Thread: Authentication in AD and in the database

  1. #1
    Join Date
    Feb 2013
    Posts
    5

    Default Authentication in AD and in the database

    Hi to all,

    This is my frist topic, I'm guessing the spring security fantastic and very complete.

    I have a question what would be the best way to implement the following scenario:

    1) To log into the application the system will check the user name and password in Active Directory, if the username and password are correct the system should search the database permissions registered for this user

    The name of the user in AD will be the same as the user name in the database.

    Can you give me any suggestions?

  2. #2
    Join Date
    Aug 2006
    Posts
    129

    Default

    you'll need a role populator like this :

    Code:
    <bean id="user-details-authorities-populator" class="org.springframework.security.ldap.authentication.UserDetailsServiceLdapAuthoritiesPopulator">
    		<constructor-arg ref="user-details-service"/>
    	</bean>
    and some user service like :

    Code:
    <security:jdbc-user-service id="user-service" data-source-ref="ds-security" cache-ref="user-cache"
    		users-by-username-query="${user.query}"
    		authorities-by-username-query="${role.query}"
    	/>

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
  •