salut,

je veux intégrer ldap avec CAS server,

j'ai ajouter cas-server-support-ldap-3.5.2.jar et spring-ldap-1.3.1.RELEASE-all.jar sous apache-tomcat-7.0.47\webapps\cas-server-webapp-3.5.2\WEB-INF\lib

et j'ai modifié deployerConfigContext.xml

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0" encoding="UTF-8"?>
 
 
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:sec="http://www.springframework.org/schema/security"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
       http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
 
	<bean id="authenticationManager"
		class="org.jasig.cas.authentication.AuthenticationManagerImpl">
 
 
 
		<property name="credentialsToPrincipalResolvers">
			<list>
 
				<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" >
					<property name="attributeRepository" ref="attributeRepository" />
				</bean>
 
				<bean
					class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
			</list>
		</property>
 
 
		<property name="authenticationHandlers">
			<list>
 
				<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
					p:httpClient-ref="httpClient" />
 
				<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
				      <property name="filter" value="mail=%u">
				      <property name="searchBase" value="DC=MINISTER,DC=FR">
				      <property name="contextSource" ref="contextSource"> 
				    </property></property></property></bean>
 
 
 
			</list>
		</property>
	</bean>
 
 
 
    <sec:user-service id="userDetailsService">
        <sec:user name="@@THIS SHOULD BE REPLACED@@" password="notused" authorities="ROLE_ADMIN" />
    </sec:user-service>
 
 
	<bean id="attributeRepository"
		class="org.jasig.services.persondir.support.StubPersonAttributeDao">
		<property name="backingMap">
			<map>
				<entry key="uid" value="uid" />
				<entry key="eduPersonAffiliation" value="eduPersonAffiliation" /> 
				<entry key="groupMembership" value="groupMembership" />
			</map>
		</property>
	</bean>
 
 
	<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
 
<property name="pooled" value="true">
 
<property name="urls">
 
<list>
 
<value>ldap://192.168.0.88:389</value>
 
</list>
 
</property>
 
<property name="userDn" value="DC=MINISTER,DC=FR">
 
<property name="password" value="secret">
 
<property name="baseEnvironmentProperties">
 
<map>
 
<entry key="java.naming.security.authentication" value="simple">
 
</entry></map>
 
</property>
 
</property></property></property></bean>
 
 
 
	<bean
		id="serviceRegistryDao"
        class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
            <property name="registeredServices">
                <list>
                    <bean class="org.jasig.cas.services.RegexRegisteredService">
                        <property name="id" value="0" />
                        <property name="name" value="HTTP and IMAP" />
                        <property name="description" value="Allows HTTP(S) and IMAP(S) protocols" />
                        <property name="serviceId" value="^(https?|imaps?)://.*" />
                        <property name="evaluationOrder" value="10000001" />
                    </bean>
 
                </list>
            </property>
        </bean>
 
  <bean id="auditTrailManager" class="com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager" />
 
  <bean id="healthCheckMonitor" class="org.jasig.cas.monitor.HealthCheckMonitor">
    <property name="monitors">
      <list>
        <bean class="org.jasig.cas.monitor.MemoryMonitor"
            p:freeMemoryWarnThreshold="10" />
 
        <bean class="org.jasig.cas.monitor.SessionMonitor"
            p:ticketRegistry-ref="ticketRegistry"
            p:serviceTicketCountWarnThreshold="5000"
            p:sessionCountWarnThreshold="100000" />
      </list>
    </property>
  </bean>
</beans>

mais quand j'ai fait le test je trouve cette erreur :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
......
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conten
t was found starting with element 'property'. One of '{"http://www.springframewo
rk.org/schema/beans":description, "http://www.springframework.org/schema/beans":
meta, "http://www.springframework.org/schema/beans":bean, "http://www.springfram
ework.org/schema/beans":ref, "http://www.springframework.org/schema/beans":idref
, "http://www.springframework.org/schema/beans":value, "http://www.springframewo
rk.org/schema/beans":null, "http://www.springframework.org/schema/beans":array,
"http://www.springframework.org/schema/beans":list, "http://www.springframework.
org/schema/beans":set, "http://www.springframework.org/schema/beans":map, "http:
//www.springframework.org/schema/beans":props, WC[##other:"http://www.springfram
ework.org/schema/beans"]}' is expected.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
............

merci d'avance