1 <?xml version="1.0" encoding="UTF-8"?>
3 <beans xmlns="http://www.springframework.org/schema/beans"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xmlns:sec="http://www.springframework.org/schema/security"
6 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
7 http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
10 <bean id="placeholderConfig4"
11 class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
12 <property name="locations">
14 <value>WEB-INF/cas.properties</value>
15 <value>WEB-INF/context-ldap.properties</value>
18 <property name="ignoreUnresolvablePlaceholders" value="true"/>
21 <sec:http entry-point-ref="casProcessingFilterEntryPoint">
22 <!--<sec:intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR" requires-channel="https"/>-->
23 <sec:intercept-url pattern="/repository/**" access="ROLE_MEMBER" />
24 <sec:logout logout-success-url="/cas-logout.jsp"/>
25 <sec:custom-filter ref="casProcessingFilter" after="CAS_FILTER"/>
28 <sec:authentication-manager alias="authenticationManager">
29 <sec:authentication-provider ref="casAuthenticationProvider" />
30 </sec:authentication-manager>
32 <bean id="casProcessingFilter" class="org.springframework.security.cas.web.CasAuthenticationFilter">
33 <property name="authenticationManager" ref="authenticationManager"/>
35 <!--<property name="authenticationFailureUrl" value="/casfailed.jsp"/>
36 <property name="defaultTargetUrl" value="/"/>
37 --><!--<property name="proxyGrantingTicketStorage" ref="proxyGrantingTicketStorage" />
38 <property name="proxyReceptorUrl" value="/${WEBAPP_CONTAINER}/receptor" />
42 <bean id="casProcessingFilterEntryPoint" class="org.springframework.security.cas.web.CasAuthenticationEntryPoint">
43 <property name="loginUrl" value="https://${CAS_HOST}/cas/login"/>
44 <property name="encodeServiceUrlWithSessionId" value="false"/>
45 <property name="serviceProperties" ref="serviceProperties"/>
49 <bean id="casAuthenticationProvider" class="org.springframework.security.cas.authentication.CasAuthenticationProvider">
50 <property name="userDetailsService" ref="userService"/>
51 <property name="serviceProperties" ref="serviceProperties" />
52 <property name="ticketValidator">
53 <bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
54 <constructor-arg index="0" value="https://${CAS_HOST}/cas" />
55 <!--<property name="proxyGrantingTicketStorage" ref="proxyGrantingTicketStorage" />
56 <property name="proxyCallbackUrl" value="https://${SERVICE_HOST}/${WEBAPP_CONTAINER}/receptor" /> -->
61 <property name="key" value="an_id_for_this_auth_provider_only"/>
64 <bean id="proxyGrantingTicketStorage" class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl" />
66 <bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties">
67 <property name="service" value="https://${SERVICE_HOST}/${WEBAPP_CONTAINER}/j_spring_cas_security_check"/>
68 <property name="sendRenew" value="false"/>
73 <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource" >
74 <description>ContextSource of the LDAP server and common connexion.</description>
75 <property name="urls" value="${urls}" />
76 <property name="userDn" value="${rootDN}" />
77 <property name="password" value="${password}" />
78 <property name="base" value="${base}" />
79 <property name="dirObjectFactory" value="org.springframework.ldap.core.support.DefaultDirObjectFactory" />
82 <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
83 <description>LDAPTemplate spring bean.</description>
84 <constructor-arg ref="contextSource" />
89 <bean id="ldapDAO" class="com.pentila.jackrabbit.auth.LdapDAO">
90 <property name="ldapTemplate"><ref local="ldapTemplate" /></property>
91 <property name="attrLogin" value="${attrLogin}" />
92 <property name="attrId" value="${attrId}" />
93 <property name="branchPeople" value="${userbase}" />
94 <property name="additionalFilter" value="${additionalFilter}"/>
98 <bean id="userService" class="com.pentila.jackrabbit.auth.CasAuth">
99 <constructor-arg index="0" value="ROLE_MEMBER" />
101 <property name="ldapDAO"><ref local="ldapDAO" /></property>
106 <sec:ldap-server id="ok_ldap" url="ldap://193.48.120.93:389/" manager-dn="cn=Manager,dc=portfolio,dc=org" manager-password="superuser" />
108 <sec:ldap-user-service id="userService" server-ref="ok_ldap"
109 user-search-filter="uid={0}"
110 user-search-base="ou=people, dc=portfolio, dc=org"
111 group-search-filter="uniquemember={0}"
112 group-search-base="ou=groupes, dc=portfolio, dc=org"
113 role-prefix="ROLE_" />
117 <sec:user-service id="userService">
118 <sec:user name="stagiaire1" password="vlad" authorities="system" />