Hi,

  I have CAS 3.5.2 set up to work with LDAP and the authentication is working 
fine. I am having trouble populating the attributemap with the LDAP attributes. 

This is what I see in the logs,

2013-10-31 14:17:29,230 INFO 
[org.jasig.cas.authentication.AuthenticationManagerImpl] - 
<org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler succes
sfully authenticated [username: testuser]>
2013-10-31 14:17:29,231 DEBUG 
[org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver]
 - <Attempting to resolve a principal...
>
2013-10-31 14:17:29,232 DEBUG 
[org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver]
 - <Creating SimplePrincipal for [rvenka
7]>
2013-10-31 14:17:29,232 INFO 
[org.jasig.cas.authentication.AuthenticationManagerImpl] - <Resolved principal 
testuser>
2013-10-31 14:17:29,233 INFO 
[org.jasig.cas.authentication.AuthenticationManagerImpl] - 
<org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler@1c0423
0 authenticated testuser with credential [username: testuser].>
2013-10-31 14:17:29,233 DEBUG 
[org.jasig.cas.authentication.AuthenticationManagerImpl] - <Attribute map for 
testuser: {}>

I have ldap configuration for deployerConfigContext.xml and the client web.xml 
configuration attached. 

Also in the service management application, I have the attributes selected. 

I followed the configurations for LDAP from : 
https://wiki.jasig.org/display/CASUM/Attributes

Any idea as to what i am doing wrong here?

thanks,
Rakesh
-- 
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
<filter>
	<filter-name>CAS Authentication Filter</filter-name>
	<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
	<init-param>
		<param-name>casServerLoginUrl</param-name>
		<param-value>https://mydevcas.iit.edu/cas/login</param-value>
	</init-param>
	<init-param>
		<param-name>serverName</param-name>
		<param-value>https://localhost:8080</param-value>
	</init-param>
</filter>

<filter>
	<filter-name>CAS Validation Filter</filter-name>
	<filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter</filter-class>
	<init-param>
		<param-name>casServerUrlPrefix</param-name>
		<param-value>https://mydevcas.iit.edu/cas</param-value>
	</init-param>
	<init-param>
		<param-name>serverName</param-name>
		<param-value>https://localhost:8080</param-value>
	</init-param>
	<init-param>
		<param-name>redirectAfterValidation</param-name>
		<param-value>true</param-value>
	</init-param>
	<init-param>
		<param-name>useSession</param-name>
		<param-value>true</param-value>
	</init-param>
</filter>

<filter>
	<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
	<filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
</filter>

<filter>
	<filter-name>CAS Assertion Thread Local Filter</filter-name>
	<filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
</filter>

<filter-mapping>
	<filter-name>CAS Validation Filter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
	<filter-name>CAS Authentication Filter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
	<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
	<filter-name>CAS Assertion Thread Local Filter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>
<bean id="authenticationManager"  
class="org.jasig.cas.authentication.AuthenticationManagerImpl">

        <property name="credentialsToPrincipalResolvers">
               <list>

                        <bean 
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"
 >
                                <property name="attributeRepository" 
ref="attributeRepository" />
                        </bean>
                </list>
        </property>

        <property name="authenticationHandlers">
                <list>
                        <bean 
class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" >
                              <property name="filter" 
value="uid=%u,ou=people,o=iit.edu,o=iit.edu" />
                              <property name="contextSource" 
ref="contextSource" />
                        </bean>
                </list>
        </property>
</bean>

<bean id="contextSource" 
class="org.springframework.ldap.core.support.LdapContextSource">
        <property name="pooled" value="false"/>
        <property name="urls">
               <list>
                        <value>ldap://myldap:389</value>
               </list>
        </property>

        <property name="userDn" 
value="uid=castestadmin,ou=People,o=iit.edu,o=iit.edu" />
        <property name="password" value="*******" />

        <property name="baseEnvironmentProperties">
               <map>
                        <entry key="com.sun.jndi.ldap.connect.timeout" 
value="3000" />
                        <entry key="com.sun.jndi.ldap.read.timeout" 
value="3000" />

                        <entry key="java.naming.security.authentication" 
value="simple" />
               </map>
        </property>
</bean>

<bean id="attributeRepository" 
class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
      <property name="contextSource" ref="contextSource" />
      <property name="baseDN" value="ou=People,o=iit.edu,o=iit.edu" />
      <property name="requireAllQueryAttributes" value="true" />

      <property name="queryAttributeMapping">
             <map>
                     <entry key="uid" value="uid" />
             </map>
      </property>
      <property name="resultAttributeMapping">
             <map>
                     <entry key="uid" value="uid" />
                     <entry key="Name" value="cn" />
                     <entry key="email" value="mail" />
             </map>
      </property>
</bean>

Reply via email to