agentsample

Version 8 by Sean_Brydon
on Jul 31, 2008 18:02.

compared with
Current by Sean_Brydon
on Jul 31, 2008 18:03.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (1)

View page history
Now, lets try to use the fetching features to add some additional user profile information to show in the showHttpheaders.jsp page. Go to the opensso console UI page, navigate to the agent configuration for the agent you created for the deployed sample application. After choosing that agent, in its configuration page, click on the Application tab, now click on the Profile Attributes Processing section, and in the label Profile Attribute Fetch Mode: for the property named com.sun.identity.agents.config.profile.attribute.fetch.mode choose either HTTP_COOKIE, or HTTP_HEADER or REQUEST_ATTRIBUTE as the mode. This will determine whether the user profile attributes we will next specify will be injected into headers or request attributes or as cookies. Now lets specify some user profile attributes. You can log into opensso console as one of the subjects you created, such as "chris" and see more attributes for the subject on the page and also can chage som eof the values. If interested you can find out more about the avilable attributes in a user profile by checking the opensso documentation. Some of the attributes that are stored for the subjects we created are things like the users first name and last name and email and these are available with under some attribute names, for example last name is available under the attribute "sn" and first name is available under the name "fn". So lets add some of these attributes into the fetching feature. Again in the Application tab page, in the Profile Attributes Processing section, and under the label Profile Attribute Fetch Mode: find the lable Profile Attribute Mapping: for the property named com.sun.identity.agents.config.profile.attribute.mapping and in the Map Key field enter +sn+ and in the Corresponding Map Value field enter LastName. Note the value you specify in the Corresponding Map Value field is the name under which the value will be avalable in the sample application and will show up in the sample application showHttpheaders.jsp page table. Then click Add to add the sn=LastName into the mappings. Now do the same thing for a couple more attributes, enter the key cn and value CUSTOM-Common-Name and click add, now enter the key MemberOf and value agentmember and click add, and now we will add an attribute which is not available to demonstate that it will be passed but will have no value injected into it, so now now enter the key ou and value organiz and click add.
Now BE SURE to click SAVE to save these changes.
This image below shows what you should enter into Profile Attributes Processing section.
!fetch.gif!
Now wait a moment for the agent to receive a notification of this change in the agent's configuration. then go back to the sample application and click on the showHttpheaders.jsp page and you will see values for LastName, CUSTOM-Common-Name, agentmember, and organiz listed in the table under Request Attributes. This shows that the agent injected these values under the names we specified for this feature.

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact