Skip to content

Users should be keyed on a generic identifier, not on email #36

Description

@wistefan

Is your feature request related to a problem? Please describe.
The consent manager currently treats a user's email address as the de facto primary key for natural persons: it is the value used to look a user up, to decide whether two UserIdentifier records belong to the same person, and to attach a participant's record to an existing account.

This only works when every user is on-boarded by a participant that knows the users' email. In cases of external IDPs(as introduced in #34 / #35 ) this is not guaranteed. When users are authenticated via EUDI Wallet ARF PID, an email does not exist. While the current email-field is unverified and can be misused to store a generic id, a clean identifier would be preferable.

Describe the solution you'd like
Since the existing UserIdentifier.identifier today holds a participant-internal ID supplied by the participant, I would like to:

  • rename UserIdentifier.identifier to something that clarifies the participant-scope of the id, f.e. internalId, participantInternalId, instead of being a global person identifier
  • put the global key on User instead of UserIdentifier - ensures one row per person, instead of on row per person&participant
  • introduce User.identifier as a unique, global user identifier - the identifier can be an email/did/id-string
  • migration path: fill the new identifier field with the existing email

The newly invented identifier should be written:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions