|
|
|
@ -1,19 +1,19 @@ |
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
|
|
|
- Sample namespace-based configuration |
|
|
|
|
|
|
|
- |
|
|
|
|
|
|
|
- $Id: applicationContext-security-ns.xml 2923 2008-04-12 17:17:46Z luke_t $ |
|
|
|
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<b:beans xmlns="http://www.springframework.org/schema/security" |
|
|
|
|
|
|
|
xmlns:b="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.5.xsd |
|
|
|
|
|
|
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.2.xsd"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<b:import resource="appContext-misc.xml"/> |
|
|
|
<!-- |
|
|
|
|
|
|
|
- Sample namespace-based configuration |
|
|
|
|
|
|
|
- |
|
|
|
|
|
|
|
- $Id: applicationContext-security-ns.xml 2923 2008-04-12 17:17:46Z luke_t $ |
|
|
|
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<b:beans xmlns="http://www.springframework.org/schema/security" |
|
|
|
|
|
|
|
xmlns:b="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.5.xsd |
|
|
|
|
|
|
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.2.xsd"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--b:import resource="appContext-misc.xml"/--> |
|
|
|
|
|
|
|
|
|
|
|
<!-- global-method-security secured-annotations="enabled" access-decision-manager-ref="methodAccessMgr"/ --> |
|
|
|
<!-- global-method-security secured-annotations="enabled" access-decision-manager-ref="methodAccessMgr"/ --> |
|
|
|
|
|
|
|
|
|
|
|
<b:bean id="methodAccessmanager" class="org.springframework.security.vote.AffirmativeBased"> |
|
|
|
<b:bean id="methodAccessmanager" class="org.springframework.security.vote.AffirmativeBased"> |
|
|
|
@ -24,30 +24,30 @@ |
|
|
|
</b:property> |
|
|
|
</b:property> |
|
|
|
</b:bean> |
|
|
|
</b:bean> |
|
|
|
|
|
|
|
|
|
|
|
<!-- http entry-point-ref='customEntryPoint'--> |
|
|
|
<http> |
|
|
|
<http> |
|
|
|
<intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/> |
|
|
|
<intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/> |
|
|
|
|
|
|
|
<intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" /> |
|
|
|
<intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" /> |
|
|
|
<intercept-url pattern="/testMulti.htm*" access="IS_AUTHENTICATED_FULLY" /> |
|
|
|
<intercept-url pattern="/testMulti.htm*" access="IS_AUTHENTICATED_FULLY" /> |
|
|
|
<!-- Disable web URI authorization, as we're using <global-method-security> and have @Secured the services layer instead |
|
|
|
<!-- Disable web URI authorization, as we're using <global-method-security> and have @Secured the services layer instead |
|
|
|
<intercept-url pattern="/listAccounts.html" access="IS_AUTHENTICATED_REMEMBERED" /> |
|
|
|
<intercept-url pattern="/listAccounts.html" access="IS_AUTHENTICATED_REMEMBERED" /> |
|
|
|
<intercept-url pattern="/post.html" access="ROLE_TELLER" /> |
|
|
|
<intercept-url pattern="/post.html" access="ROLE_TELLER" /> |
|
|
|
--> |
|
|
|
--> |
|
|
|
<intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" /> |
|
|
|
<intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" /> |
|
|
|
<!-- |
|
|
|
<!-- |
|
|
|
Uncomment to enable X509 client authentication support |
|
|
|
Uncomment to enable X509 client authentication support |
|
|
|
<x509 user-service-ref="daoUserService"/> |
|
|
|
<x509 user-service-ref="daoUserService"/> |
|
|
|
--> |
|
|
|
--> |
|
|
|
<!-- form-login default-target-url="/secure/index.jsp" login-page="/login.jsp" authentication-failure-url="/login.jsp?login-error=1" always-use-default-target="false"/--> |
|
|
|
<form-login default-target-url="/secure/index.jsp" login-page="/login.jsp" authentication-failure-url="/login.jsp?login-error=1" always-use-default-target="false"/> |
|
|
|
<anonymous /> |
|
|
|
<anonymous /> |
|
|
|
<http-basic /> |
|
|
|
<!-- http-basic / --> |
|
|
|
<logout /> |
|
|
|
<logout /> |
|
|
|
<remember-me key='doesntmatter' token-repository-ref='tokenRepo' user-service-ref='daoUserService'/> |
|
|
|
<remember-me key='doesntmatter' token-repository-ref='tokenRepo' user-service-ref='daoUserService'/> |
|
|
|
<!-- <remember-me user-service-ref="daoUserService"/> --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <remember-me user-service-ref="daoUserService"/> --> |
|
|
|
<!-- Uncomment to limit the number of sessions a user can have --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Uncomment to limit the number of sessions a user can have --> |
|
|
|
<concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="true" session-registry-ref='sessionRegistry'/> |
|
|
|
<concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="true" session-registry-ref='sessionRegistry'/> |
|
|
|
|
|
|
|
|
|
|
|
</http> |
|
|
|
</http> |
|
|
|
|
|
|
|
|
|
|
|
<authentication-manager alias="authenticationManager" /> |
|
|
|
<authentication-manager alias="authenticationManager" /> |
|
|
|
@ -66,42 +66,55 @@ |
|
|
|
</b:bean> |
|
|
|
</b:bean> |
|
|
|
--> |
|
|
|
--> |
|
|
|
<b:bean id='sessionRegistry' class="org.springframework.security.concurrent.SessionRegistryImpl"/> |
|
|
|
<b:bean id='sessionRegistry' class="org.springframework.security.concurrent.SessionRegistryImpl"/> |
|
|
|
<!-- |
|
|
|
<!-- |
|
|
|
<b:bean id="customAuthFilter" class="heavyduty.security.ui.HeavyDutyAuthenticationProcessingFilter"> |
|
|
|
<b:bean id="customAuthFilter" class="heavyduty.security.ui.HeavyDutyAuthenticationProcessingFilter"> |
|
|
|
<custom-filter position="AUTHENTICATION_PROCESSING_FILTER"/> |
|
|
|
<custom-filter position="AUTHENTICATION_PROCESSING_FILTER"/> |
|
|
|
<b:property name="defaultTargetUrl" value="/"/> |
|
|
|
<b:property name="defaultTargetUrl" value="/"/> |
|
|
|
<b:property name="authenticationManager" ref="authenticationManager"/> |
|
|
|
<b:property name="authenticationManager" ref="authenticationManager"/> |
|
|
|
</b:bean> |
|
|
|
</b:bean> |
|
|
|
--> |
|
|
|
|
|
|
|
<b:bean id="customEntryPoint" class="heavyduty.security.ui.HeavyDutyEntryPoint"> |
|
|
|
<b:bean id="customEntryPoint" class="heavyduty.security.ui.HeavyDutyEntryPoint"> |
|
|
|
<b:property name="loginFormUrl" value="/login.jsp"/> |
|
|
|
<b:property name="loginFormUrl" value="/login.jsp"/> |
|
|
|
</b:bean> |
|
|
|
</b:bean> |
|
|
|
|
|
|
|
--> |
|
|
|
<!-- |
|
|
|
<!-- |
|
|
|
<b:bean id="loginPageGenerator" class="org.springframework.security.ui.webapp.DefaultLoginPageGeneratingFilter"> |
|
|
|
<b:bean id="loginPageGenerator" class="org.springframework.security.ui.webapp.DefaultLoginPageGeneratingFilter"> |
|
|
|
<custom-filter after="AUTHENTICATION_PROCESSING_FILTER"/> |
|
|
|
<custom-filter after="AUTHENTICATION_PROCESSING_FILTER"/> |
|
|
|
<b:constructor-arg ref="customAuthFilter"/> |
|
|
|
<b:constructor-arg ref="customAuthFilter"/> |
|
|
|
</b:bean> |
|
|
|
</b:bean> |
|
|
|
--> |
|
|
|
--> |
|
|
|
<!-- |
|
|
|
|
|
|
|
Usernames/Passwords are |
|
|
|
|
|
|
|
rod/koala |
|
|
|
|
|
|
|
dianne/emu |
|
|
|
|
|
|
|
scott/wombat |
|
|
|
|
|
|
|
peter/opal |
|
|
|
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<authentication-provider user-service-ref="daoUserService"> |
|
|
|
<authentication-provider user-service-ref="daoUserService"> |
|
|
|
<password-encoder hash="md5" /> |
|
|
|
<password-encoder hash="md5" /> |
|
|
|
</authentication-provider> |
|
|
|
</authentication-provider> |
|
|
|
|
|
|
|
|
|
|
|
<authentication-provider> |
|
|
|
<authentication-provider> |
|
|
|
<password-encoder hash="md5"/> |
|
|
|
<password-encoder hash="md5"/> |
|
|
|
<user-service> |
|
|
|
<user-service> |
|
|
|
<user name="rod" password="a564de63c2d0da68cf47586ee05984d7" authorities="ROLE_SUPERVISOR, ROLE_USER, ROLE_TELLER" /> |
|
|
|
<user name="rod" password="a564de63c2d0da68cf47586ee05984d7" authorities="ROLE_SUPERVISOR, ROLE_USER, ROLE_TELLER" /> |
|
|
|
<user name="dianne" password="65d15fe9156f9c4bbffd98085992a44e" authorities="ROLE_USER,ROLE_TELLER" /> |
|
|
|
<user name="dianne" password="65d15fe9156f9c4bbffd98085992a44e" authorities="ROLE_USER,ROLE_TELLER" /> |
|
|
|
<user name="scott" password="2b58af6dddbd072ed27ffc86725d7d3a" authorities="ROLE_USER" /> |
|
|
|
<user name="scott" password="2b58af6dddbd072ed27ffc86725d7d3a" authorities="ROLE_USER" /> |
|
|
|
<user name="peter" password="22b5c9accc6e1ba628cedc63a72d57f8" authorities="ROLE_USER" /> |
|
|
|
<user name="peter" password="22b5c9accc6e1ba628cedc63a72d57f8" authorities="ROLE_USER" /> |
|
|
|
</user-service> |
|
|
|
</user-service> |
|
|
|
</authentication-provider> |
|
|
|
</authentication-provider> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ldap-server id="ldapServer"/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- b:bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"/ --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<b:bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"> |
|
|
|
|
|
|
|
<b:property name="beans"> |
|
|
|
|
|
|
|
<b:map> |
|
|
|
|
|
|
|
<b:entry key="bean:name=ldapContextSource" value-ref="ldapServer"/> |
|
|
|
|
|
|
|
</b:map> |
|
|
|
|
|
|
|
</b:property> |
|
|
|
|
|
|
|
<b:property name="assembler"> |
|
|
|
|
|
|
|
<b:bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler"> |
|
|
|
|
|
|
|
<b:property name="managedMethods" value="setPassword,setUserDn,getUrls,setUrl,setUrls,setPooled,isPooled,setBase,getBaseLdapPathAsString"/> |
|
|
|
|
|
|
|
</b:bean> |
|
|
|
|
|
|
|
</b:property> |
|
|
|
|
|
|
|
<!-- b:property name="server" ref="mbeanServer"/--> |
|
|
|
|
|
|
|
</b:bean> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</b:beans> |
|
|
|
</b:beans> |