-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide unique, consistent user identifier for repeated authentication attempts #376
Merged
Conversation
This file contains 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
esune
changed the title
Provide unique user identifier for authentication attempts
Provide unique, consistent user identifier for repeated authentication attempts
Oct 20, 2023
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
esune
reviewed
Nov 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just a question regarding the new models
…d ReqAttrDict Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
esune
approved these changes
Nov 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
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.
When authenticating with VC-AuthN, there are currently two options for generating a
subject_identifier
for the authenticated user:The first option is only available IF the VCs used to authenticate provide a unique identifier: this would be configured in the proof-configuration to be used as
sub
, and would be passed along to the relying party that initiated the authentication request.The issue with this pattern when integrating VC-AuthN into an AIM system such as Keycloak is that, unless a unique user identifier is generated by VC-AuthN, it will not be possible to associate roles to the user account in the AIM system as every authentication attempt will appear as a new user trying to access the system.
Proposed solution:
Rather than generating a new random user identifier for every authentication attempt, VC-AuthN would generate a consistent user identifier by hashing a canonicalized version of the JSON containing the claims obtained from the proof-request.
Possible library to canonicalize JSON: https://pypi.org/project/canonicaljson/
The underlying Pyop library will generate a new value for the
sub
if non is provided. A couple of places we could look at plugging-in the generation of the subject identifier value: