|
@@ -0,0 +1,71 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+
|
|
|
+<beans xmlns="http://www.springframework.org/schema/beans"
|
|
|
+ xmlns:sec="http://www.springframework.org/schema/security"
|
|
|
+ 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.xsd">
|
|
|
+ <sec:http>
|
|
|
+ <sec:intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR" requires-channel="https"/>
|
|
|
+ <sec:intercept-url pattern="/secure/**" access="ROLE_USER" />
|
|
|
+ <sec:logout />
|
|
|
+ </sec:http>
|
|
|
+
|
|
|
+ <bean id="casProcessingFilter" class="org.springframework.security.ui.cas.CasProcessingFilter" autowire="byType">
|
|
|
+ <sec:custom-filter after="CAS_PROCESSING_FILTER"/>
|
|
|
+ <property name="authenticationFailureUrl" value="/casfailed.jsp"/>
|
|
|
+ <property name="defaultTargetUrl" value="/"/>
|
|
|
+ </bean>
|
|
|
+
|
|
|
+ <bean id="casProcessingFilterEntryPoint" class="org.springframework.security.ui.cas.CasProcessingFilterEntryPoint">
|
|
|
+ <property name="loginUrl" value="https://localhost:9443/cas/login"/>
|
|
|
+ <property name="serviceProperties" ref="serviceProperties"/>
|
|
|
+ </bean>
|
|
|
+
|
|
|
+ <bean id="casAuthenticationProvider" class="org.springframework.security.providers.cas.CasAuthenticationProvider">
|
|
|
+ <sec:custom-authentication-provider />
|
|
|
+ <property name="casAuthoritiesPopulator">
|
|
|
+ <bean class="org.springframework.security.providers.DaoAuthoritiesPopulator">
|
|
|
+ <property name="userDetailsService" ref="userService"/>
|
|
|
+ </bean>
|
|
|
+ </property>
|
|
|
+ <property name="casProxyDecider">
|
|
|
+ <bean class="org.springframework.security.providers.cas.proxy.RejectProxyTickets"/>
|
|
|
+ </property>
|
|
|
+ <property name="ticketValidator">
|
|
|
+ <bean class="org.springframework.security.providers.cas.ticketvalidator.CasProxyTicketValidator">
|
|
|
+ <property name="casValidate" value="https://localhost:9443/cas/proxyValidate"/>
|
|
|
+ <property name="proxyCallbackUrl" value="https://localhost:8443/cas-sample/casProxy/receptor"/>
|
|
|
+ <property name="serviceProperties" ref="serviceProperties"/>
|
|
|
+ <property name="trustStore" value="../../certificates/server.jks"/>
|
|
|
+ <property name="trustPassword" value="password"/>
|
|
|
+ <!-- <property name="trustStore"><value>/some/path/to/your/lib/security/cacerts</value></property> -->
|
|
|
+ </bean>
|
|
|
+ </property>
|
|
|
+ <property name="statelessTicketCache">
|
|
|
+ <bean class="org.springframework.security.providers.cas.cache.EhCacheBasedTicketCache">
|
|
|
+ <property name="cache">
|
|
|
+ <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean">
|
|
|
+ <property name="cacheManager">
|
|
|
+ <bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>
|
|
|
+ </property>
|
|
|
+ <property name="cacheName" value="ticketCache"/>
|
|
|
+ </bean>
|
|
|
+ </property>
|
|
|
+ </bean>
|
|
|
+ </property>
|
|
|
+ <property name="key" value="an_id_for_this_auth_provider_only"/>
|
|
|
+ </bean>
|
|
|
+
|
|
|
+ <bean id="serviceProperties" class="org.springframework.security.ui.cas.ServiceProperties">
|
|
|
+ <property name="service" value="https://localhost:8443/cas-sample/j_spring_cas_security_check"/>
|
|
|
+ <property name="sendRenew" value="false"/>
|
|
|
+ </bean>
|
|
|
+
|
|
|
+ <sec:user-service id="userService">
|
|
|
+ <sec:user name="rod" password="rod" authorities="ROLE_SUPERVISOR,ROLE_USER" />
|
|
|
+ <sec:user name="dianne" password="dianne" authorities="ROLE_USER" />
|
|
|
+ <sec:user name="scott" password="scott" authorities="ROLE_USER" />
|
|
|
+ </sec:user-service>
|
|
|
+
|
|
|
+</beans>
|