aspose file tools
The moose likes Spring and the fly likes Spring Active Directory Authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Spring Active Directory Authentication" Watch "Spring Active Directory Authentication" New topic
Author

Spring Active Directory Authentication

James Daniel
Ranch Hand

Joined: Sep 24, 2004
Posts: 78
I have been trying (and trying) to get a Spring application to authenticate against an AD LDAP server. I keep getting "Bad credentials" exception. When I use the same username/password in a LDAP tool, it works without issue. I am using Spring Security 3.1.2 and there isn't much to configuration. Does anyone have any ideas? I just want to see it authenticate and work from there. I can't even get that to happen. Help..


<authentication-manager>
<authentication-provider ref="activeDirectoryAuthenticationProvider"/>
</authentication-manager>

<beans:bean id="activeDirectoryAuthenticationProvider" class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
<beans:constructor-arg value="my.domain.com" />
<beans:constructor-arg value="ldap://my.domain:389" />
<beans:property name="convertSubErrorCodesToExceptions" value="true"/>
</beans:bean>
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1282

Please UseCodeTags.

You are probably going to need a little more information to figure out what is happening. I would set your logger levels for org.springframework.security to DEBUG and you should get a better picture of what exactly you are missing.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Active Directory Authentication
 
Similar Threads
REST web service return both XML or JSON
Spring LDAP security 3
Preauthentication problem
[Spring Security] Where can I find Base64 usage in spring codebase?
Spring LDAP/Active Directory Security: Authenticate User w/out Using an Admin/Mgr Account