ldap error
Sumiya Sakoda
sakoda at toyoake.or.jp
Sun Aug 6 01:34:30 EDT 2006
Hello.
I am trying to ldap authentication with CAS, but it does'nt work.
First, I get three archives.
* cas-server-3.0.5.tar.gz
* ldaptemplate-bin-1.0.2.zip
* commons-lang-2.1.tar.gz
Next, I have done the action to install as follows.
1. uncommpress archives.
2. put cas-server-ldap-3.0.5.jar, ldaptemplate-1.0.2.jar,
commons-lang-2.1.jar in ${project.home}/localPlugins/lib.
3. make war file in ${project.home} with ant
$ ant war
4. deploy cas.war by Tomcat 5.5 Web application manager.
5. try to test SimpleTestUsernamePasswordAuthenticationHandler with
both of same username and password on http://localhost:8080/cardweb.
it works.
Then, I refer to follwing url to use ldap.
http://www.ja-sig.org/products/cas/server/ldapauthhandler/index.html
I customized deployerConfigContext.xml like this
<!-- begin -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManagerImpl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
<bean class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" />
<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" >
<property name="filter" value="uid=%u,ou=Users,dc=toyoake,dc=or,dc=jp" />
<property name="contextSource" ref="contextSource" />
</bean>
</list>
</property>
</bean>
<bean id="contextSource" class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
<property name="urls">
<list>
<value>ldap://localhost</value>
</list>
</property>
</bean>
</beans>
<!-- end -->
I try to login, but I can't. it says
"""
CAS is Unavailable
A general exception occurred while trying to access CAS. Please notify your system administrator.
"""
I have no idea for the reason. but CAS Generic Handler works well with
this genericHandler.xml
<!-- begin -->
<?xml version="1.0"?>
<authentication debug="off">
<handler>
<classname>org.esupportail.cas.server.handlers.ldap.FastBindLdapHandler</classname>
<config>
<filter>uid=%u,ou=Users,dc=toyoake,dc=or,dc=jp</filter>
<server>
<url>ldap://localhost</url>
</server>
</config>
</handler>
</authentication>
<!-- end -->
Does anyone help me ?
- sS
More information about the cas
mailing list