Looks like I found a partial answer. The 'name' attribute needs to match some constant from the P3PConstants class
(http://docs.jboss.org/jbportal/v2.7.0/javadoc-bundle/common/constant-values.html). Even though the docs is from v2.7, it still appears to work.
However, looking at the 3 default mappings, they don't use those constants. Based on what I'm using, the name 'firstName' should be 'user.name.given' and not just firstName. Do those 3 default mappings not work?
Based on this, I'm not sure I understand how the whole attribute/mapping is supposed to work.
I'm affraid that management portlet displays only hardcoded attributes defined in the UserProfile interface. Attributes that you map in the configuration should be available using the API:
PortalContainer container = PortalContainer.getInstance(); OrganizationService orgService = (OrganizationService) container.getComponentInstanceOfType(OrganizationService.class); UserHandler userHandler = orgService.getUserHandler(); User user = userHandler.findUserByName(request.getUserPrincipal().getName()); UserProfileHandler profileHandler = orgService.getUserProfileHandler(); UserProfile profile = profileHandler.findUserProfileByName(user.getUserName());
Maybe I'm not being clear, which I often do.
I am trying to modify the picketlink-idm-ad-sso-ro-config.xml so that I can retrieve additional user data from Active Directory.
In this file, under
there is a user attribute defined:
So, using that example, I added one of my own:
I was unable to get this to work until I set <name> to be user.employer. Now it works just like I want. This value shows up when I edit the user profile, but it won't let me change it in the Admin UI. I have to change it in AD. However, any value that I don't define in the attributes CAN be changed in the admin UI.
This allows me to use AD as the main repository where user data is stored across applications (very good), while allowing me to modify portal specific properties, or those I don't want to retrieve from AD with the Admin UI.
I have tested this and can find no problems with it. I have used several of the constants from the P3PConstants class, and in each case it gets my data from AD.
Howerver, based on your response Boleslaw, this shouldn't work? The fact that is does is great. My only problem was finding that constants file to figure out what value I should be using.
Any chance you figured out what the additional attribute names are? Please see my posting...
Im also mapped to LDAP and want to store all the user info in the LDAP