系统:windwo xp
cas:cas-server-3.4.6
ldap:apacheds-1.5.7
服务器:jboss5.1.0GA
cas-3.4.6整合LDAP还需要spring-ldap
在cas-server-3.4.6-release.zip里有整合ldap所需的配置文件和.jar文件,直接使用就可以了,需要修改的地方时
在apacheds中有个admin的记录uid=admin,ou=system,使用ou=system做基节点,可以用admin登录,方便验证
apacheds用的端口是10389
user:uid=admin,ou=system
pwd:secret
cas:cas-server-3.4.6
ldap:apacheds-1.5.7
服务器:jboss5.1.0GA
cas-3.4.6整合LDAP还需要spring-ldap
在cas-server-3.4.6-release.zip里有整合ldap所需的配置文件和.jar文件,直接使用就可以了,需要修改的地方时
<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
<property name="filter" value="uid=%u" />
<!-- 基节点 -->
<property name="searchBase" value="ou=system" />
<property name="contextSource" ref="contextSource" />
</bean>
在apacheds中有个admin的记录uid=admin,ou=system,使用ou=system做基节点,可以用admin登录,方便验证
<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
<property name="anonymousReadOnly" value="false" />
<property name="password" value="secret" />
<property name="pooled" value="true" />
<property name="urls">
<list>
value>ldap://localhost:10389/</value>
</list>
</property>
<!-- 如果是老版本,这里应该用的是userName,而不是userDn -->
<property name="userDn" value="uid=admin,ou=system" />
<property name="baseEnvironmentProperties">
<map>
<entry>
<!--none 端口 389-->
<!--ssl 端口 636-->
<key><value>java.naming.security.protocol</value></key>
<value>none</value>
</entry>
<entry>
<key><value>java.naming.security.authentication</value></key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
apacheds用的端口是10389
user:uid=admin,ou=system
pwd:secret