Announcement Announcement Module
Collapse
No announcement yet.
SP SEC 3.1.0RC3 and the new active directory provider Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SP SEC 3.1.0RC3 and the new active directory provider

    After trying to get the LDAPprovider to work with a MS AD 2008 server and getting thoroughly frustrated, I thought I would give the new active directory provider a try.

    I am using the security name space configuration and I can't quite figure out how to continue doing so ( or change over to beans without breaking my existing config. )

    my exisiting config has

    Code:
    <authentication-manager>
    <authentication-provider>
    <user-service>
    <!-- backup user--->
    <user authorities="ROLE_USER" name="backupAdmin" password="realllyLongComplexString">
    </user-service>
    <authentication-provider>
    
    <ldap-authentication-provider user-dn-pattern="dn={0}",OU="TEST_OU"/>
    
    </authentication-manager>
    
    <ldap-server url="ldap://x.x.x.x:389/DC=my,DC=ad,DC=local" manager-dn="CN=ROadmin,CN=Users" manager-password="anotherLongString">
    so given the above how do I use the new adAuthenticationProvider instead ?

    Or how to a use the bean described in the docs linkdocs with the security namespace ?


    Could anyone give me a hand?

  • #2
    In case anyone else comes to this thread looking for an answer, this works for me (I'm not sure what version of AD we have):

    Code:
    	<authentication-manager alias="authenticationManager">
    		<authentication-provider ref="adAuthenticationProvider"/>
    	</authentication-manager>
    
    	<beans:bean id="adAuthenticationProvider" class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
    		<beans:constructor-arg value="ad.example.org" />
    		<beans:constructor-arg value="ldap://wdc01.example.org/" />
    		<beans:property name="convertSubErrorCodesToExceptions" value="true"/>
    	</beans:bean>

    Comment

    Working...
    X