-
1. Re: Storing User Profile in LDAP
artmunro Aug 31, 2010 11:55 AM (in response to artmunro)Anyone have any idea on how to do this? I have tried to add additional attributes to IDM configurations but does not seem to change anything
thoughts out there?
-
2. Re: Storing User Profile in LDAP
artmunro Aug 31, 2010 7:00 PM (in response to artmunro)Ok I think im getting closer...
http://community.jboss.org/message/535583#535583 Aslan has posted a sample create profile
OrganizationService service = (OrganizationService) PortalContainer.getInstance().getComponentInstanceOfType(OrganizationService.class);
...
UserProfile profile = service.getUserProfileHandler().createUserProfileInstance(userid);profile.setAttribute("position", request.getParameter(FIELD_POSITION));profile.setAttribute("phone", request.getParameter(FIELD_PHONE));service.getUserProfileHandler().saveUserProfile(profile, false);So now I know the right area of code to search... NEXT
http://community.jboss.org/message/537061#537061 Interacting with IDM Picketlink Sean was able to add and map attribute Employer
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());<attribute>
<name>user.employer</name>
<mapping>company</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>SO NOW...
what are the attribute names/mappings that will work for the remainder fields
ANY help??
-
3. Re: Storing User Profile in LDAP
javaspack Aug 31, 2010 7:35 PM (in response to artmunro)The only information I found was from an old jboss-portal page:
[http://docs.jboss.org/jbportal/v2.7.0/javadoc-bundle/common/constant-values.html]
The section that is important is the P3PConstants. All the values on the right hand side appear to work for mapping to AD.
I found them by going into AD and adding a bunch of values to an AD user and then generating an LDIF to show what fields they actually mapped to.
These are the attributes I used (where 'name' is the GateIn property, and 'mapping' is the corresponding AD value)
<attribute>
<name>user.employer</name>
<mapping>company</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.department</name>
<mapping>department</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.business-info.postal.street</name>
<mapping>streetAddress</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.business-info.postal.city</name>
<mapping>l</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.business-info.postal.stateprov</name>
<mapping>st</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.business-info.postal.country</name>
<mapping>co</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.business-info.postal.postalcode</name>
<mapping>postalCode</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.business-info.telecom.telephone.number</name>
<mapping>telephoneNumber</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>
<attribute>
<name>user.jobtitle</name>
<mapping>title</mapping>
<type>text</type>
<isRequired>false</isRequired>
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
<isUnique>true</isUnique>
</attribute>