Announcement Announcement Module
Collapse
No announcement yet.
Active Directory Authentication Bad Credentials in search Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Active Directory Authentication Bad Credentials in search

    I'm trying to using Spring Security 3.1.3 to connect to my company Active Directory through LDAP. . It seems I can connect but can't perform a search. If I use JXplorer I can connect using the same configurations. Here is my applicationContext-security.xml.

    Code:
    	
           <authentication-manager>
    		<authentication-provider ref="ldapActiveDirectoryAuthProvider"/>
    	</authentication-manager>
    
    	<beans:bean id="ldapActiveDirectoryAuthProvider"
    		class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
    		<beans:constructor-arg value="mycompany.com" />
    		<beans:constructor-arg value="ldap://mycompany.com:3268" />
    		<beans:property name="convertSubErrorCodesToExceptions" value="true" />
    	</beans:bean>
    The DEBUG result is bellow

    Code:
     
    DEBUG org.springframework.security.authentication.ProviderManager  - Authentication attempt using org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider
    DEBUG org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider  - Processing authentication request for user: Mycompanyuser
    DEBUG org.springframework.security.ldap.SpringSecurityLdapTemplate  - Searching for entry under DN '', base = 'dc=mycompany,dc=com', filter = '(&(objectClass=user)(userPrincipalName={0}))'
    DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter  - Authentication request failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials
    DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter  - Updated SecurityContextHolder to contain null Authentication
    DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter  - Delegating to authentication failure handler org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler@7711089b
    Does anybody have a clue?

    Regards

  • #2
    Check out this link: http://www.isharecodes.com/2012/11/g...plugin-to.html
    That configuration is working to me as well.

    Originally posted by kinder View Post
    I'm trying to using Spring Security 3.1.3 to connect to my company Active Directory through LDAP. . It seems I can connect but can't perform a search. If I use JXplorer I can connect using the same configurations. Here is my applicationContext-security.xml.

    Code:
    	
           <authentication-manager>
    		<authentication-provider ref="ldapActiveDirectoryAuthProvider"/>
    	</authentication-manager>
    
    	<beans:bean id="ldapActiveDirectoryAuthProvider"
    		class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider">
    		<beans:constructor-arg value="mycompany.com" />
    		<beans:constructor-arg value="ldap://mycompany.com:3268" />
    		<beans:property name="convertSubErrorCodesToExceptions" value="true" />
    	</beans:bean>
    The DEBUG result is bellow

    Code:
     
    DEBUG org.springframework.security.authentication.ProviderManager  - Authentication attempt using org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider
    DEBUG org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider  - Processing authentication request for user: Mycompanyuser
    DEBUG org.springframework.security.ldap.SpringSecurityLdapTemplate  - Searching for entry under DN '', base = 'dc=mycompany,dc=com', filter = '(&(objectClass=user)(userPrincipalName={0}))'
    DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter  - Authentication request failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials
    DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter  - Updated SecurityContextHolder to contain null Authentication
    DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter  - Delegating to authentication failure handler org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler@7711089b
    Does anybody have a clue?

    Regards

    Comment

    Working...
    X