for a quick and dirty cas + ldap (Windows ad) setup youlll need
basically the spring-ldap-*release-all.jar (as you already noticed)
the cas-server-core , cas-server-support-ldap
and you need to configure the deployerConfigContext.xml for example like this:
(these are the settings that worked for me , check yours accordingly
(and remove the default handler which just checks if userand pw are
the same)
-add one bindldapconfigurationhandler
<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
<property name="filter" value="sAMAccountName=%u" />
<property name="searchBase" value="CN=Users,DC=my,DC=domain,DC=org" />
<property name="contextSource" ref="contextSource" />
<property name="ignorePartialResultException" value="yes" />
</bean>
+ the definition of contextSource (used before)
<bean id="contextSource"
class="org.springframework.ldap.core.support.LdapContextSource">
<property name="pooled" value="false"/>
<property name="urls">
<list>
<value>ldap://YOUR.AD.IP.ADDRESS/</value>
</list>
</property>
<property name="userDn"
value="CN=InsertUserNameHere,CN=Users,DC=my,DC=domain,DC=org"/>
<property name="password" value="insertPasswordHere"/>
<property name="baseEnvironmentProperties">
<map>
<entry>
<key>
<value>java.naming.security.authentication</value>
</key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
On Mon, Nov 15, 2010 at 2:20 PM, Scott Battaglia
<[email protected]> wrote:
> If you are doing a quick demo, you could merely do what you're doing which
> is copy the stuff in. Most of us, however, won't know off the top of our
> head which dependencies you'll be missing (though you could look in the
> appropriate pom.xml to find which ones they declare).
>
> The link I sent before should have a sample ZIP file with a mostly created
> pom.xml that you can build off of.
>
> Cheers,
> Scott
>
>
> On Mon, Nov 15, 2010 at 8:14 AM, Marco Nobler
> <[email protected]> wrote:
>>
>> OK, many thanks for your feedback, I was not expected to have to build
>> using maven also for the quick tutorial, i'll try.
>>
>> For completion, this is what i done:
>> 1. downloaded and extracted the CAS installation 3.4.3.1 war
>>
>> 2. found the "cas-server-webapp-3.4.3.1.war" under "modules" directory
>>
>> 3. added the following in pom.xml:
>> <dependency>
>> <groupId>${project.groupId}</groupId>
>> <artifactId>cas-server-support-ldap</artifactId>
>> <version>${project.version}</version>
>> </dependency>
>>
>> 4. added the following in deployerConfigContext.xml:
>> <bean id="contextSource"
>> class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
>> <property name="pooled" value="true"/>
>> <property name="urls">
>> <list>
>> <value>ldap://localhost:10389</value>
>> </list>
>> </property>
>> <property name="userName" value="uid=admin,ou=system"/>
>> <property name="password" value="secret"/>
>> <property name="baseEnvironmentProperties">
>> <map>
>> <entry key="java.naming.security.authentication" value="simple" />
>> </map>
>> </property>
>> </bean>
>>
>> 5. removed the demo authentication handler
>> 6. added the LDAP fast bind:
>> <bean
>> class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" >
>> <property name="filter" value="uid=%u,ou=system" />
>> <property name="contextSource" ref="contextSource" />
>> </bean>
>>
>> 7. 11.Added the cas-server-support-ldap-3.4.3.1.jar from the CAS
>> installation to
>> C:\apache-tomcat-6.0.29\webapps\cas-server-webapp-3.4.3.1\WEB-INF\lib.
>>
>>
>> bye
>> Marco
>>
>> --
>> You are currently subscribed to [email protected] as:
>> [email protected]
>> To unsubscribe, change settings or access archives, see
>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user