Spring Security
  1. Spring Security
  2. SEC-1466

authentication-provider should reject child password-encoder element when used with ref attribute

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.1.0.M1
    • Component/s: Namespace
    • Labels:
      None
    • Environment:
      OS X, JBoss 4.2.3.GA
      Gentoo/Linux, JBoss 4.2.3.GA

      Description

      Basically want to achieve the following (as was natural to me from reading the documentation and trying to adapt to my own situation):

      <authentication-manager>
      <authentication-provider ref="daoAuthenticationProvider">
      <password-encoder ref="passwordEncoder">
      <salt-source ref="saltSource" />
      </password-encoder>
      </authentication-provider>
      </authentication-manager>
      <!-- Expose as Bean as other Beans are Autowired for it -->
      <beans:bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder">
      <beans:constructor-arg value="256"/>
      </beans:bean>
      <beans:bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
      <beans:property name="userPropertyToUse" value="username"/>
      </beans:bean>
      <beans:bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
      <beans:property name="userDetailsService" ref="userDetailsService" />
      <beans:property name="userCache">
      <beans:bean class="org.springframework.security.core.userdetails.cache.EhCacheBasedUserCache">
      <beans:property name="cache" ref="userCache" />
      </beans:bean>
      </beans:property>
      </beans:bean>

      The above resulted in a null saltSource for daoAuthenticationProvider (but not a null passwordEncoder).

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Nes Yarug
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: