SEC-1196: Introduce AuthenticationManagerDelegator is MethodSecurityInterceptor which is configured by global-method-security. Prevents regression of SEC-933 caused by eager init of AuthenitcationManager and dependent beans

This commit is contained in:
Luke Taylor
2009-08-03 01:44:49 +00:00
parent 997faabe1e
commit e40b9fbc75
7 changed files with 69 additions and 27 deletions

View File

@@ -6,12 +6,14 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
<authentication-provider>
<user-service>
<user name="miles" password="milespassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_TRUMPETER"/>
<user name="johnc" password="johncspassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_SAXOPHONIST"/>
<user name="jimi" password="jimispassword" authorities="ROLE_USER,ROLE_ROCK,ROLE_GUITARIST"/>
</user-service>
</authentication-provider>
<authentication-manager alias="authenticationManager">
<authentication-provider>
<user-service>
<user name="miles" password="milespassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_TRUMPETER"/>
<user name="johnc" password="johncspassword" authorities="ROLE_USER,ROLE_JAZZ,ROLE_SAXOPHONIST"/>
<user name="jimi" password="jimispassword" authorities="ROLE_USER,ROLE_ROCK,ROLE_GUITARIST"/>
</user-service>
</authentication-provider>
</authentication-manager>
</beans:beans>

View File

@@ -9,12 +9,14 @@
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.2.xsd">
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
<ldap-server ldif="classpath*:test-server.ldif"/>
<ldap-authentication-provider user-search-filter="(uid={0})" group-role-attribute="ou" />
<authentication-manager alias="authenticationManager">
<ldap-authentication-provider user-search-filter="(uid={0})" group-role-attribute="ou" />
</authentication-manager>
<ldap-user-service user-search-filter="(uid={0})" group-role-attribute="ou"/>
</beans:beans>
</beans:beans>