Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: documented configuring the portlet container to convey the password attribute

...

The user attribute "password" is populated with the end user's cached password when a caching security context is used and off-by-default support for conveying those cached passwords via the JSR-168 user attribute API is turned on.

Enabling conveyance of passwords as user attributes

Configuring uPortal to cache the password at login

This is accomplished in security.properties. Rather than documenting how to do this here, this topic should be treated in the prior manual section on caching security contexts.

Configuring uPortal's portlet container to convey the password

In portletContainerContext.xml, enhance the existing declaration:

Code Block
xml
xml
titleuserInfoService declaration in portletContainerContext.xml

<bean id="userInfoService" class="org.jasig.portal.portlet.container.services.MergingUserInfoService">
    <property name="userInfoServices">
        <list>
            <ref bean="personDirectoryUserInfoService"/>
            <ref bean="casTicketUserInfoService"/>
        </list>
    </property>
</bean>

to additionally reference the cached password service:

Code Block
xml
xml
titleuserInfoService declaration modified to reference the cached password service in portletContainerContext.xml

<bean id="userInfoService" class="org.jasig.portal.portlet.container.services.MergingUserInfoService">
    <property name="userInfoServices">
        <list>
            <ref bean="personDirectoryUserInfoService"/>
            <ref bean="casTicketUserInfoService"/>
            <ref bean="cachedPasswordUserInfoService"/>
        </list>
    </property>
</bean>

Of course, that reference needs to point at a bean declaration, so introduce a bean like this:

Code Block
xml
xml
titleintroduce a cachedPasswordUserInfoService declaration in portletContainerContext.xml

<bean id="cachedPasswordUserInfoService"  class="org.jasig.portal.portlet.container.services.CachedPasswordUserInfoService.java">
    <property name="portalRequestUtils" ref="portalRequestUtils" />
    <property name="userInstanceManager" ref="userInstanceManager" />
    <property name="portletWindowRegistry" ref="portletWindowRegistry" />
    <property name="portletEntityRegistry" ref="portletEntityRegistry" />
    <property name="portletDefinitionRegistry" ref="portletDefinitionRegistry" />
    <property name="passwordKey" value="password"/>
</bean>

Consuming the attributes once available

Code Block
xml
xml
titleDeclaring password user attribute in portlet.xml
<user-attribute>
  <description>Specially treated user attribute name that will be 
populated with the end user's cached password, if available</description>
  <name>password</name>
</user-attribute>

...