On Tue, 3 May 2011, Paul Chauvet wrote:

Hello all,

I've been trying to get CAS setup (using the Maven Overlay method) for a while and keep running into the same issue. I can get it up and running for the simple authentication methods for testing but when trying to use LDAP for authentication, I have issues.

I don't know if I'm missing pom.xml dependencies, something is wrong in deployerConfigContext.xml, or something else entirely. My searches for these errors have not come up with anything that (to me at least) I have been able to make sense of, beyond what I have already done. They appear to center on errors with Bean state is invalid: httpClient - may not be null

I'd appreciate any advice that you can provide. I apologize for bothering those on this list with this, I just can't seem to progress past this issue.

deployerConfigContext.xml
<?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="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="cn=%u" />
<property name="searchBase" value="o=sunynp" />
<property name="contextSource" ref="contextSource" />
</bean>
</list>
</property>
</bean>

<bean id="contextSource" 
class="org.springframework.ldap.core.support.LdapContextSource">
<property name="anonymousReadOnly" value="true" />
<property name="pooled" value="true" />
<property name="urls">
<list>
<value>ldap://server-name-redacted:389/</value>
</list>
</property>
<property name="baseEnvironmentProperties">
<map>
<entry>
<key><value>java.naming.security.authentication</value></key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
<bean id="serviceRegistryDao" 
class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl" />
<bean id="auditTrailManager" 
class="com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager" />


</beans>

Add the following bean to deployerConfigContext.xml:

<bean id="httpClient" class="org.jasig.cas.util.HttpClient"/>

You can add it at the end, after auditTrailManager.

        Andy

--
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

Reply via email to