Person Directory Service Overwriting username attribute

Knowledge Base: Academus
Updated: July 18, 2007
Should I overwrite the username person attribute in the Person Directory Service?

Generally, this is not a good idea. The username attribute gets set automatically by the uPortal framework when a user logs in and is generally all lower case. If the Person Directory Service is configured to map attribute username and one of the directory sources stores its usernames in mixed case, you can get into trouble with groups and permissions and other application related data.

Academus 2.0 does ship with this mapping by default and should be removed. In PersonDirs.xml, remove any and all mappings to username.

In order do be able to remove the username mapping, you will also need to apply the PersonDirectoryServiceImplPatch-04-23-2007.jar patch. To install this patch:

  • Backup the $TOMCAT_HOME/webapps/portal/WEB-INF/classes/net/unicon/portal/common/PersonDirectoryServiceImpl*class classes.
  • Unjar the PersonDirectoryServiceImplPatch-04-23-2007.jar patch in the $TOMCAT_HOME/webapps/portal/WEB-INF/classes directory.

If by chance any usernames are stored in the database with mixed case, after you remove this mapping they will no longer be referenced. If this is the case, apply the following sql statements to migrate the username data in the system.



update UP_GROUP_MEMBERSHIP set MEMBER_KEY = LOWER(MEMBER_KEY);
update ASSESSMENT_RESULT set USER_NAME = LOWER(USER_NAME);
update CHAT_USERS set USER_NAME = LOWER(USER_NAME);
update CALENDAR set USER_NAME = LOWER(USER_NAME);
update CHANNEL_PREFERENCE set USER_NAME = LOWER(USER_NAME);
update GRADEBOOK_SCORE set USER_NAME = LOWER(USER_NAME);
update PORTAL_PRINC_MAP set USER_NAME = LOWER(USER_NAME);
update NOTEPAD set USER_NAME = LOWER(USER_NAME);
update USER_ACTIVATION set USER_NAME = LOWER(USER_NAME);
update MEMBERSHIP set USER_NAME = LOWER(USER_NAME);
update UPC_FORM_DATA set USER_NAME = LOWER(USER_NAME);
update UPC_FORM_FORM set USER_NAME = LOWER(USER_NAME);
update UPC_SURVEY_SURVEY set USER_NAME = LOWER(USER_NAME);
update UP_PERSON_DIR set USER_NAME = LOWER(USER_NAME);
update PERSON_DIR_ATTR set USER_NAME = LOWER(USER_NAME);
update PERSON_DIR_METADATA set USER_NAME = LOWER(USER_NAME);

AttachmentSize
PersonDirectoryServiceImplPatch-04-23-2007.jar11.92 KB