Spring Security
  1. Spring Security
  2. SEC-1279

Invalid package name for AuthenticationManager

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.0 M2
    • Fix Version/s: 3.0.0.RC2
    • Component/s: None
    • Labels:
      None

      Description

      When trying to configure the PortletProcessingInterceptor, the following error below is thrown. Upon closer inspection, it is caused by an invalid package name for AuthenticationManger (it is trying to cast it to org.springframework.security.AuthenticationManager, but it should be org.springframework.security.authentication.AuthenticationManager).

      Caused by: java.lang.IllegalStateException: Cannot convert value of type [org.springframework.security.authentication.ProviderManager] to required type [org.springframework.security.AuthenticationManager] for property 'authenticationManager': no matching editors or conversion strategy found
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:241)
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:134)
      at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:398)

      Here is an excerpt from my application-security-config.xml:

      <sec:authentication-manager alias="authenticationManager">
      <sec:authentication-provider ref="preAuthenticatedAuthenticationProvider" />
      </sec:authentication-manager> -->

      <bean id="portletAuthenticationDetailsSource"
      class="org.springframework.security.ui.portlet.PortletPreAuthenticatedAuthenticationDetailsSource">
      <property name="mappableRolesRetriever">
      <bean
      class="org.springframework.security.authoritymapping.SimpleMappableAttributesRetriever">
      <property name="mappableAttributes">
      <list>
      <value>ADMIN</value>
      </list>
      </property>
      </bean>
      </property>
      </bean>
      <bean id="portletProcessingInterceptor"
      class="org.springframework.security.ui.portlet.PortletProcessingInterceptor">
      <property name="authenticationManager" ref="authenticationManager" />
      <property name="authenticationDetailsSource" ref="portletAuthenticationDetailsSource" />
      </bean>
      <bean id="preAuthenticatedAuthenticationProvider"
      class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider">
      <property name="preAuthenticatedUserDetailsService"
      ref="preAuthenticatedGrantedAuthoritiesUserDetailsService" />
      </bean>
      <bean id="preAuthenticatedGrantedAuthoritiesUserDetailsService"
      class="org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesUserDetailsService" />

        Activity

        Hide
        Luke Taylor added a comment -

        Portlet support was moved to the security extensions project with the RC1 release.

        Please check the latest release before raising issues.

        Show
        Luke Taylor added a comment - Portlet support was moved to the security extensions project with the RC1 release. Please check the latest release before raising issues.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Randy May
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: