On Wed, 4 Jun 2014, Nico Lang wrote:

here is my deployerConfigContext.xml <http://pastebin.com/GCvGFhB2> as u
tell me a add variable value to cas.properties

Nico,

When I deployed CAS with LDAP, I commented out the original UsernamePasswordCredentialsToPrincipalResolver bean and added the following instead:

  <bean 
class="org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver">
    <!-- The Principal resolver forms the credentials -->
    <property name="credentialsToPrincipalResolver">
      <bean 
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"
 />
    </property>
    <!-- The query made to find the Principal ID. "%u" will be replaced by the 
resolved Principal -->
    <property name="filter" value="(uid=%u)" />
    <!-- The attribute used to define the new Principal ID -->
    <property name="principalAttributeName" value="uid" />
    <property name="searchBase" value="ou=people,o=orst.edu" />
    <property name="contextSource" ref="contextSource" />
    <property name="attributeRepository">
      <ref bean="attributeRepository" />
    </property>
  </bean>

This is taken from the following wiki page:

  https://wiki.jasig.org/display/CASUM/Attributes

I'm not sure why the default UsernamePasswordCredentialsToPrincipalResolver isn't sufficient to populate the principal at least... But you could try this more advanced configuration that pulls attributes from LDAP.

        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