Results 1 to 2 of 2

Thread: NamespaceAuthenitcationManager not finding auth provider

  1. #1
    Join Date
    Jun 2008
    Posts
    26

    Default NamespaceAuthenitcationManager not finding auth provider

    I'm trying to add an ldap auth provider (custom) into our stack of authentication providers.

    I originally have three providers in the list and it has been configured through the ProviderManager as below:

    Code:
        <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
            <property name="providers">
                <list>
                    <ref bean="tlcLdapAuthenticationProvider" />
                    <ref bean="casAuthenticationProvider"/>
                    <bean class="org.springframework.security.providers.rememberme.RememberMeAuthenticationProvider">
                        <property name="key" value="admin"/>
                    </bean>
                </list>
            </property>
        </bean>
    This seemed fine and is designed to drop authentication to a form login when cas failes (cas has been modified to include the gateway=true attribute). The LDAP provider extends the DaoAuthenticationProvider supplied by spring.

    In the first authentication attempt (put in a secure URL and it is caught and redirected) the three providers are present.

    If you fill in the form and submit it (sends to j_spring_security_check) only cas and _rememberMe are available, the LDAP provider is missing. This appears to be because the NamespaceAuthenticationManager doesn't have it in it's bean names list.

    My question: Why doesn't it appear in that list (I'm not formally setting it anywhere so I assume it is detected some how)?

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    You've defined a separate AuthenticationManager. You can't do this with the namespace. Please read the namespace chapter in the manual for more information. Not also that the namespace syntax has changed in version 3.0.
    Spring - by Pivotal
    twitter @tekul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •