Connecting CAS 3.1.1 to LDAP
Zach Seifts
zach.seifts at cpcc.edu
Fri Jan 11 12:02:54 EST 2008
Hey everyone,
I'm having some trouble trying to setup a cas3 server which connects to
MS-AD with LDAP (running on etch's tomcat). I've been following the LDAP
tutorial on the ja-sig wiki and after everything is configured the way
it says in the tutorial, I compile and deploy the war file to tomcat
and it won't start up. The logs tell me i have errors in my
deployerConfigContext.xml which leads me to think my something in the
contextSource bean isn't configured correctly. I don't have "ldap://" in
front of the server name in the urls property, do I need that? Any
insight would be helpful.
Cheers
Zach
Logs:
2008-01-10 10:40:37,494 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas-server-webapp-3.1.1]] - <Exception starting filter Acegi Filter Chain Proxy>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'centralAuthenticationService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean 'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#1416de4' of type [org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler] while setting bean property 'authenticationHandlers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#1416de4' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type[org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource': no matching editors or conversion strategy found
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean 'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#1416de4' of type [org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler] while setting bean property 'authenticationHandlers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#1416de4' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource': no matching editors or con version strategy found
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler#1416de4' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource': no matching editors or conversion strategy found
Caused by:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] forproperty 'contextSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource': no matching editors or conversion strategy found
Caused by:
java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource] for property 'contextSource': no matching editors or conversion strategy found
deployerConfigContext.xml:
<?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"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<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"
p:httpClient-ref="httpClient" />
<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
<property name="filter" value="uid=%u" />
<property name="searchBase" value="cn=XXXXX,dc=XXXX,dc=XXXX" />
<property name="contextSource" value="contextSource" />
</bean>
</list>
</property>
</bean>
<bean id="contextSource" class="org.jasig.cas.adpators.ldap.util.AuthenticatedLdapContextSource">
<property name="urls">
<list>
<value>XXXXXXXXXXXXXXXX</value>
</list>
</property>
<property name="userName" value="XXXXXXX" />
<property name="password" value="XXXXXXX" />
<property name="baseEnvironmentProperties">
<property name="ignorePartialResultException" value="yes" />
<map>
<entry>
<key><value>java.naming.security.protocol</value></key>
<value>ssl</value>
</entry>
<entry>
<key><value>java.naming.security.authentication</value></key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
<bean id="userDetailsService" class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
<property name="userMap">
<value>
</value>
</property>
</bean>
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.StubPersonAttributeDao">
<property name="backingMap">
<map>
<entry key="uid" value="uid" />
</map>
</property>
</bean>
<bean
id="serviceRegistryDao"
class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl" />
</beans>
--
------------------------------------------------------------------------
Zach Seifts
Central Piedmont Community College
704.330.6988
zach.seifts at cpcc.edu <mailto:zach.seifts at cpcc.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20080111/5185f5f3/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zach_seifts.vcf
Type: text/x-vcard
Size: 290 bytes
Desc: not available
Url : http://tp.its.yale.edu/pipermail/cas/attachments/20080111/5185f5f3/attachment.vcf
More information about the cas
mailing list