Spring Security-LDAP - Keine UserDetailsService registriert

Ich versuche zum einrichten der LDAP-Spring Security. Und ich habe hier mit einigen seltsamen Ausnahme:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_filterChainList'
...
No UserDetailsService registered

Meine security-config.xml sieht wie folgt aus:

<?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:sec="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.4.xsd">

    <sec:global-method-security secured-annotations="enabled"
                access-decision-manager-ref="accessDecisionManager" />

    <sec:http auto-config="true">
        <sec:intercept-url pattern="/css/**" filters="none" />
        <sec:intercept-url pattern="/js/**" filters="none" />
        <sec:intercept-url pattern="/img/**" filters="none" />

        <sec:intercept-url pattern="/login" access="IS_AUTHENTICATED_ANONYMOUSLY" />
        <sec:intercept-url pattern="/login" access="IS_AUTHENTICATED_ANONYMOUSLY" method="POST" />
        <sec:intercept-url pattern="/uzivatel/registrace" access="IS_AUTHENTICATED_ANONYMOUSLY" />

        <sec:intercept-url pattern="/**" access="ROLE_UZIVATEL" />

        <sec:form-login default-target-url="/vlakna" login-page="/login"  />
    </sec:http>

    <bean id="accessDecisionManager" class="org.springframework.security.vote.ConsensusBased">
        <property name="decisionVoters">
            <list>
                <ref bean="rightsAccessDecisionVoter" />
            </list>
        </property>
    </bean>

    <bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
        <constructor-arg value="ldap://111.111.111.111"/>
        <property name="userDn" value="cn=auth-user,ou=System,dc=sh,dc=company,dc=com"/>
        <property name="password" value="secret"/>
    </bean>

    <bean id="ldapAuthProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider">
        <sec:custom-authentication-provider/>
        <constructor-arg>
            <bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator">
                <constructor-arg ref="contextSource"/>
                <property name="userSearch">
                    <bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
                      <constructor-arg index="0" value="ou=People,dc=sh,dc=company,dc=com"/>
                      <constructor-arg index="1" value="(uid={0})"/>
                      <constructor-arg index="2" ref="contextSource" />
                    </bean>
                </property>
                <property name="userDnPatterns">
                    <list><value>uid={0},ou=people</value></list>
                </property>
                <property name="userAttributes">
                    <list><value></value></list>
                </property>
            </bean>
        </constructor-arg>
        <constructor-arg>
            <bean class="cz.rohan.dusps.services.UzivatelAuthoritiesPopulator" />
        </constructor-arg>
    </bean>

    <bean id="rightsAccessDecisionVoter" class="com.company.RightsAccessDecisionVoter" />
</beans>

Dachte ich, dass Sie ergreifen sollten, "ldapAuthProvider" als user-details-service, aber es funktioniert nicht. Hat jemand sehen, ein problem in meiner config?

Vielen Dank für jede Hilfe,
Mateo

  • Zeigen Sie den vollständigen stacktrace.
InformationsquelleAutor mateo | 2010-10-29
Schreibe einen Kommentar