On Tue, 16 Sep 2014 11:06:10 +0200
Patrick Pat <toirobertlegra...@gmail.com> wrote:

> Hi,
> I would like to connect CAS Server 3.5.2 with LDAP Server
> but i don't have a good procedure.

In case you have a working CAS server, my recipe is just three quick steps:

Add in the POM a new dependency:

  <dependency>
    <groupId>org.jasig.cas</groupId>
    <artifactId>cas-server-support-ldap</artifactId>
    <version>${cas.version}</version>
  </dependency>

Edit WEB-INF/deployerConfigContext.xml to add a bean:

 <bean id="contextSource"
       class="org.springframework.ldap.core.support.LdapContextSource">
   <property name="pooled" value="false"/>
   <property name="url" value="ldap://ip.or.fqdn.of.your.ldap.server"; />
   <property name="baseEnvironmentProperties">
    <map>
      <entry key="java.naming.security.authentication" value="simple" />
    </map>
   </property>     
 </bean>

and substitute

 <bean 
class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler"
 />

for

 <bean
   class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler">
   <property name="filter" value="uid=%u,ou=Users,dc=example,dc=com" />
   <property name="contextSource" ref="contextSource" />
 </bean>

I think you're done. At least that's what my notes read.

-- 
Alberto Cabello Sánchez
<albe...@unex.es>

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to