Auto-create userid (login with email address)#16
Open
peter- wants to merge 1 commit intoGEANT:masterfrom
Open
Conversation
Re-instantiate functionality that was available in earlier `selfregister` versions, partially using old code still in use in an older deployment (``createUserId()`, `createUniqueUserId()`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the updated README for a quick intro!
Re-instantiate functionality that was available in earlier
selfregisterversions, partially using old code still in use in an older deployment (createUserId(),createUniqueUserId()).Note that the function
createUniqueUserId()included here currenly contains 3 implementations (2 of which are commented out), with comments detailing their pros and cons:The main issue here is that most IDPs will at some point have to support identifiers that prohibit identifier re-assignment from one subject to another (currently in SAML those are persistent NameIDs,
subject-idandpairwise-id, plus the older attributeseduPersonTargetedIdandeduPersonUniqueId) -- not being able to support such identifiers will severly limit the usefulness of an IDP.Now, uniqueness among existing entries in the backend storage is trivial (and already included in selfregister code), but uniqueness across time and including previously deleted userids is much harder. So a simplistic implementation was chosen that is time-based, assuming that values generated later will never be identical to values generated earlier, even if those earlier records have meanwhile been deleted.
(Another option would have been to re-think the account deletion process, merely marking deleted accounts as inactive and only keeping the
useridaround, but no other data. This seems much more involved, though, and so has been left as a suggestion for later changes.)Before merging the above situation (3 implementations, one of which even has its own configuration parameter in the Class's constructor, also commented out here) should be cleaned up, I guess.
Defaults have all been left unchanged, though, so this new (or merely revived) functionality is fully optional.
Btw, if this approach (of avoiding userids altogether, from a subject's perspective) becomes more popular something should probably be done here to make changing the displayed strings easier: Currenty one has to create a custom module with a custom theme, duplicating most of the templates included in the selfregister module, only in order to reference a custom distionary that then says "Email address" instead of "UserID" throughout the registration process (UI, emails).