Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

SEC-1279: Invalid package name for AuthenticationManager #1528

Closed
spring-issuemaster opened this Issue Oct 27, 2009 · 1 comment

Comments

Projects
None yet
1 participant

Randy May (Migrated from SEC-1279) said:

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" />

Luke Taylor said:

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

Please check the latest release before raising issues.

@spring-issuemaster spring-issuemaster added this to the 3.0.0.RC2 milestone Feb 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment