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="serviceProperties" ref="serviceProperties"/>
48 <bean id="casAuthenticationProvider" class="org.springframework.security.cas.authentication.CasAuthenticationProvider">
49 <property name="userDetailsService" ref="userService"/>
50 <property name="serviceProperties" ref="serviceProperties" />
51 <property name="ticketValidator">
52 <bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
53 <constructor-arg index="0" value="https://${CAS_HOST}/cas" />
54 <!--<property name="proxyGrantingTicketStorage" ref="proxyGrantingTicketStorage" />
55 <property name="proxyCallbackUrl" value="https://${SERVICE_HOST}/${WEBAPP_CONTAINER}/receptor" /> -->
60 <property name="key" value="an_id_for_this_auth_provider_only"/>
63 <bean id="proxyGrantingTicketStorage" class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl" />
65 <bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties">
66 <property name="service" value="https://${SERVICE_HOST}/${WEBAPP_CONTAINER}/j_spring_cas_security_check"/>
67 <property name="sendRenew" value="false"/>
72 <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource" >
73 <description>ContextSource of the LDAP server and common connexion.</description>
74 <property name="urls" value="${urls}" />
75 <property name="userDn" value="${rootDN}" />
76 <property name="password" value="${password}" />
77 <property name="base" value="${base}" />
78 <property name="dirObjectFactory" value="org.springframework.ldap.core.support.DefaultDirObjectFactory" />
81 <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
82 <description>LDAPTemplate spring bean.</description>
83 <constructor-arg ref="contextSource" />
88 <bean id="ldapDAO" class="com.pentila.jackrabbit.auth.LdapDAO">
89 <property name="ldapTemplate"><ref local="ldapTemplate" /></property>
90 <property name="attrLogin" value="${attrLogin}" />
91 <property name="attrId" value="${attrId}" />
92 <property name="branchPeople" value="${userbase}" />
93 <property name="additionalFilter" value="${additionalFilter}"/>
97 <bean id="userService" class="com.pentila.jackrabbit.auth.CasAuth">
98 <constructor-arg index="0" value="ROLE_MEMBER" />
100 <property name="ldapDAO"><ref local="ldapDAO" /></property>
105 <sec:ldap-server id="ok_ldap" url="ldap://193.48.120.93:389/" manager-dn="cn=Manager,dc=portfolio,dc=org" manager-password="superuser" />
107 <sec:ldap-user-service id="userService" server-ref="ok_ldap"
108 user-search-filter="uid={0}"
109 user-search-base="ou=people, dc=portfolio, dc=org"
110 group-search-filter="uniquemember={0}"
111 group-search-base="ou=groupes, dc=portfolio, dc=org"
112 role-prefix="ROLE_" />
116 <sec:user-service id="userService">
117 <sec:user name="stagiaire1" password="vlad" authorities="system" />