J'ai essayé de mettre de l'authentification avec Ldap-Active Directory et Spring Security 2.0.6. Mais je ne sais pas pourquoi l'authentification ne passe pas ...Spring Security 2.0.6 Authentification avec Active Directory
Ici vous pouvez voir la console:
> INFO [Server] JBoss (MX MicroKernel)
> [4.2.3.GA (build:
> SVNTag=JBoss_4_2_3_GA
> date=200807181439)] Started in
> 30s:118ms
>
> INFO [STDOUT] [WARN] Authentication
> event
> AuthenticationFailureBadCredentialsEvent:
> secretariauno1; details:
> [email protected]:
> RemoteIpAddress: 127.0.0.1; SessionId:
> 1D1DEAD28D4AE44AF67277654889D73E;
> exception: User secretariauno1 not
> found in directory.
>
> INFO [STDOUT] [WARN] Authentication
> event
> AuthenticationFailureBadCredentialsEvent:
> secretariauno; details:
> [email protected]:
> RemoteIpAddress: 127.0.0.1; SessionId:
> 1D1DEAD28D4AE44AF67277654889D73E;
> exception: Bad credentials; nested
> exception is
> org.springframework.ldap.AuthenticationException:
> [LDAP: error code 49 - 80090308:
> LdapErr: DSID-0C0903A9, comment:
> AcceptSecurityContext error, data 52e,
> v1db0
>
> INFO [STDOUT] [INFO] The
> returnObjFlag of supplied
> SearchControls is not set but a
> ContextMapper is used - setting flag
> to true
>
> INFO [STDOUT] [WARN] Authentication
> event
> AuthenticationFailureServiceExceptionEvent:
> secretariauno; details:
> [email protected]:
> RemoteIpAddress: 127.0.0.1; SessionId:
> 1D1DEAD28D4AE44AF67277654889D73E;
> exception: Unprocessed Continuation
> Reference(s); nested exception is
> javax.naming.PartialResultException:
> Unprocessed Continuation Reference(s);
> remaining name ''; nested exception is
> org.springframework.ldap.PartialResultException:
> Unprocessed Continuation Reference(s);
> nested exception is
> javax.naming.PartialResultException:
> Unprocessed Continuation Reference(s);
> remaining name ''
Il y a trois [WARN]
, le premier secretariauno1 est pas dans LDAP. Le second, le mot de passe est mauvais. Mais les tiers, c'est bien et ça ne passe pas. Il retourne à la page de connexion. J'ai cherché "returnObjFlag" et à propos de "nom restant" sans objectifs ...
S'il vous plaît, si quelqu'un peut m'aider ..., MERCI !!!
Ici vous pouvez voir tha applicationContext-security.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.xsd">
<bean id="loggerListener"
class="org.springframework.security.event.authentication.LoggerListener" />
<security:http>
<security:intercept-url pattern="/**" access="ROLE_USUARIO_AUTENTICADO" />
<security:intercept-url pattern="/login.jsp" filters="none"/>
<security:intercept-url pattern="/css/*" filters="none"/>
<security:form-login
login-processing-url="/j_security_check"
login-page="/login.jsp"
default-target-url="/index.jsp"
always-use-default-target="true"
authentication-failure-url="/login.jsp" />
<security:anonymous/>
<security:http-basic/>
<security:logout/>
</security:http>
<security:ldap-server id="ldapServer"
url="ldap://bibredc05.preadm.com:389/dc=preadm,dc=com"
manager-dn="cn=desLector,ou=Users,dc=preminjus,dc=es"
manager-password="pwd123"/>
<security:ldap-authentication-provider user-search-filter="(sAMAccountName={0})"
user-search-base="ou=Users"/>
<security:ldap-user-service server-ref="ldapServer"
user-search-filter="sAMAccountName={0}"
user-search-base="ou=Users"/>
</beans>