Skip to content

Refactor OpenidConnectUserInfoPresenter to use AuthnContextResolver#10614

Merged
jmhooper merged 3 commits intomainfrom
jmhooper-refactor-user-info-presenter
May 14, 2024
Merged

Refactor OpenidConnectUserInfoPresenter to use AuthnContextResolver#10614
jmhooper merged 3 commits intomainfrom
jmhooper-refactor-user-info-presenter

Conversation

@jmhooper
Copy link
Contributor

@jmhooper jmhooper commented May 13, 2024

The OpenidConnectUserInfoPresenter is responsible for building the user info hash. This is stored in the identity token and exposed at the user info endpoint as part of the OIDC protocol.

The OpenidConnectUserInfoPresenter is reponsible for looking at the parameters of the request to determine which attributes to include in the hash. This can include things like the level of service for identity proofing and the requested scopes.

Prior to this commit the OpenidConnectUserInfoPresenter was using the ServiceProviderIdentity#ial to determine whether identity proofing was performed. This approach does not work when using multiple vectors of trust determine the authentication context. The #ial column represents the level of service that was set when the identity was linked when the SP request was stored in the session. This could change with multiple vectors of trust if the state of the users account changes during the transaction.

This commit starts using the AuthnContextResolver to compute the level of service and set the attributes so that it matches the dynamic behavior of the rest of the application with multiple vectors of trust in play.

The `OpenidConnectUserInfoPresenter` is responsible for building the user info hash. This is stored in the identity token and exposed at the user info endpoint as part of the OIDC protocol.

The `OpenidConnectUserInfoPresenter` is reponsible for looking at the parameters of the request to determine which attributes to include in the hash. This can include things like the level of service for identity proofing and the requested scopes.

Prior to this commit the `OpenidConnectUserInfoPresenter` was using the `ServiceProviderIdentity#ial` to determine whether identity proofing was performed. This approach does not work when using multiple vectors of trust determin the authentication context. The `#ial` column represents the level of service that was set when the identity was linked when the SP request was stored in the session. This could change with multiple vectors of trust if the state of the users account changes during the transaction.

This commit starts using the `AuthnContextResolver` to compute the level of service and set the attributes so that it matches the dynamic behavior of the rest of the application with multiple vectors of trust in play.

[skip changelog]
@jmhooper jmhooper requested a review from a team May 13, 2024 18:42
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM makes sense!

@jmhooper jmhooper merged commit 5186c21 into main May 14, 2024
@jmhooper jmhooper deleted the jmhooper-refactor-user-info-presenter branch May 14, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants