hi  all
 I resolve my problem with
   1-FastBindLdapAuthenticationHandler.
   2-for connect to ldap in <property name="userName" 
value="CN=a.jhon,OU=XX,DC=XX,DC=XX" />
     we must specify username COMPLETELy .
  
 this  is my deployConfigContext.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";
        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.adaptors.ldap.FastBindLdapAuthenticationHandler">
                                        <property name="filter" 
value="CN=%u,OU=XX,DC=XX,DC=XX" />
                                        <property name="contextSource" 
ref="contextSource" />
                                        <property 
name="ignorePartialResultException"
                                        value="yes" />
                                        </bean>
                                        
                        </list>
                </property>
        </bean>
        <bean id="contextSource"
                
class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
                
                <property name="url" value="ldap://XX.XX:389"; />
                <property name="base" value="cn=Users,dc=XX,dc=XX" /> 
                <property name="userName"
                        value="CN=userName,OU=XX,DC=XX,DC=XX" />
                <property name="password" value="xxxxxxx" />
                <property name="pooled" value="true" />
                <property name="baseEnvironmentProperties">
                        <map>
                                <entry>
                                        <key>
                                                <value>
                                                        
java.naming.security.authentication
                                                </value>
                                        </key>
                                        <value>simple</value>
                                </entry>
                        <entry>
                                        <key>
                                                
<value>java.naming.security.principal</value>
                                        </key>
                                        <value>
                                                CN=userName,OU=XX,DC=XX,DC=XX
                                        </value>
                                </entry>
                                <entry>
                                        <key>
                                                
<value>java.naming.security.credentials</value>
                                        </key>
                                        <value>xxxxxx</value>
                                </entry>
                                </map>
                </property>
        </bean>
</beans>

thanks.

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to