Perhaps this would help you:
http://www.ja-sig.org/wiki/display/CASC/CASifying+OpenCms
Regards,
Shi Yusen/Beijing Langhua Ltd.
在 2009-07-09四的 15:00 -0500,aruhi写道:
> Following is the extract from deployerConfigContext.xml :-
>
>
>
> ...
> <bean id="authenticationManager"
> class="org.jasig.cas.authentication.AuthenticationManagerImpl">
>
> <property name="credentialsToPrincipalResolvers">
> <list>
> <bean
>
> class="org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver">
> <!-- The Principal resolver form 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="(netID=%u)" />
>
> <!-- The attribute used to define the new Principal ID -->
>
> <property name="principalAttributeName" value="netID" />
>
> <property name="searchBase"
> value="ou=people,dc=xxx,dc=edu" />
> <property name="contextSource" ref="contextSource" />
>
> <property name="attributeRepository">
> <ref bean="attributeRepository" />
> </property>
> </bean>
> <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"
> scope="SearchControls.SUBTREE_SCOPE" lazy-init="true">
> <property name="filter"
> value="(netID=%u)" />
> <property name="searchBase"
> value="ou=people,dc=xxx,dc=edu" />
> <property name="contextSource"
> ref="contextSource" />
> </bean>
> </list>
> </property>
> </bean>
>
>
>
> <bean id="userDetailsService"
> class="org.springframework.security.userdetails.jdbc.JdbcDaoImpl">
> <property name="dataSource"><ref
> bean="dataSource"/></property>
> </bean>
>
>
> <bean id="attributeRepository"
> class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
> <property name="baseDN" value="ou=people,dc=xxx,dc=edu" />
> <property name="query" value="(netID={0})" />
> <property name="contextSource" ref="contextSource" />
> <property name="ldapAttributesToPortalAttributes">
> <map>
> <entry key="netID" value="netID" />
> <entry key="uin" value="uin" />
> <entry key="uid" value="uid" />
> <entry key="status" value="status" />
> </map>
> </property>
> </bean>
>
> ...
>
> <bean id="contextSource"
> class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
> <property name="urls">
> <list>
> <value>ldaps://operator.xxx.edu/</value>
> </list>
> </property>
> <property name="userName"
> value="cn=xxxxx,ou=dsa,dc=xxx,dc=edu" />
> <property name="password" value="xxxxxx" />
> <property name="baseEnvironmentProperties">
> <map>
> <entry>
> <key>
> <value>java.naming.security.authentication</value>
> </key>
> <value>simple</value>
> </entry>
> </map>
> </property>
> </bean>
> ...
>
>
>
>
>
> Few additional attributes are extracted as specified in bean
> 'attributeRepository'.
>
> I need to log in the cas server logs, the values extracted for these
> additional attributes for each user successfully authenticated user.
>
> How can I do that and in which class can such a log message be added ???
>
> Please advice.
>
> Thanks
> Aruhi
>
--
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