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:
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
UserIdentifierrecords 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.identifiertoday holds a participant-internal ID supplied by the participant, I would like to:UserIdentifier.identifierto something that clarifies the participant-scope of the id, f.e.internalId,participantInternalId, instead of being a global person identifierUserinstead ofUserIdentifier- ensures one row per person, instead of on row per person&participantUser.identifieras a unique, global user identifier - the identifier can be an email/did/id-stringThe newly invented identifier should be written: