Adding display name attribute, updated UDS libraries
Updated UDS services libraries to newer uds-person-client-java 2.0, and the 1.2 uds data model that includes access to preferred name. Also added displayName attribute to UWUserDetails that should be picked up from Shibboleth displayName header.
Also setting UwframeSession to use displayName as displayName if it's non-null, else using fullName for displayName as it used to do.
When constructing displayName from a UDS Person, it prefers the name.preferredFirstName(). if that is null, falls back to firstName. Either is prepended to last name for the displayName property if using UDS Person integration.
I bumped it to 1.8.0-SNAPSHOT from 1.7.1-SNAPSHOT, since I don't think it's a breaking change. However, since it does change the artifacts it imports (the UDS ones), it might break something after all. However again, I see promises in the comments and ReadMe about new features that should be available in the 2.0 release that I wasn't prepared to add yet. So advice on the versioning would be appreciated.
Tapping @bjsousa and @paul.erickson and @andrew-summers on this MR, since I see commits from all of you in the history.
Merge request reports
Activity
Forgot to add that I need access to the displayName in the Enrollment Tools project (to answer the 'Why?' for this MR. ) The user's Preferred Name is coming over from Shib as displayName.
Edited by bhill6@wisc.eduBuild finished. Tests PASSED. Build results available at: https://ia-builds.doit.wisc.edu:8443/job/uw-spring-security-master-pull-requests/95/
Well, now I'm thinking that I overstated the significance of the expectations for 2.0, since I'm now only finding one mention in the comments for:
* @deprecated use {@link LocalUserDetailsLoader} instead, to be removed in 2.0
That seemed more prominent as I was putting this MR together (since I was trying to decide whether I needed to implement displayName for local logins as well, and probably re-read it a few times). On that, I decided not to, since there was a greater risk of breaking backward compatibility in regard to the local user data format.
Upon more consideration of the versioning of this -- should it be 2.0 due to the fact that it may require a change to the libraries a project will need to import or exclude in order to use this? (due to new versions of the UDS ones, which may have their own exclusion requirements, depending on what else is imported).
I had thoughts both ways on that last week. What do you think? Is that a breaking version?
I'd say this PR is worthy of 2.0. We could also use this as an opportunity to complete the deprecation of LocalUserDetailsAttributeMapper in the same release. I guess the question there would be how likely is it that someone will want to get displayName for a UDS person and not want to redo their demo users. It's not a big deal, but it can take some time if you have a lot of them.
That sounds good, so I'll add another commit before we merge this.
Removing the old LocalUserDetailsAttributeMapper will make it a lot easier to add displayName to supported local user properties, since adding a JSON attribute won't break anything the way that trying to add another comma-separated property to a .properties file attribute would.
One other thought that I had while working on this is that we should open a conversation with Middleware again to discover changes in the standard-ish Shib attribute naming scheme. I was kind of surprised that they added 'displayName' instead of 'cn' when I asked for user's preferred name. I'm still not entirely sure if cn (aka fullName on the UWUserDetails user) and 'givenName' are supposed to be 'legal' names or preferred names. That can wait, though.
I like this plan.
To your last point, Ryan L. from Middleware said that Shib's standard name attributes (including cn and displayName) always contain preferred name, not legal name. But I agree with you that it could be clearer or at least better documented, so that we don't need to ask someone directly to get the answer.
added 1 commit
- 3dd59973 - Removed deprecated property list format for local users, bumped version to 2.0
Build finished. Tests PASSED. Build results available at: https://ia-builds.doit.wisc.edu:8443/job/uw-spring-security-master-pull-requests/96/
@bjsousa Okay, give this a look again. I removed the deprecated property file format code. Also bumped to 2.0.
Just one small addition, which would be to remove
edu.wisc.uwss.local.userDetailsLoader.enabled=true
from sample-war. Other than that, cut and print!I'll update the wiki accordingly.
added 1 commit
- 68d1b288 - removed deprecated property reference from sample.war properties