Skip to content
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

DM-41186: Add new route for CADC token metadata #877

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Conversation

rra
Copy link
Member

@rra rra commented Oct 13, 2023

CADC software uses an authentication component designed for use with OpenID Connect that takes a token from the Authorization header and sends it to an endpoint, expecting to get back the validated JWT claims. Since it treats the token as opaque, we can use this with our regular tokens as long as we provide an endpoint that returns user metadata in the expected format.

Add /auth/cadc/userinfo as that endpoint, temporarily. Put CADC in the URL because the return format is specific to the current needs of the CADC auth code. In particular, it requires sub to be a UUID (to allow username changes), which we generate based on an optional configuration parameter and the UID of the user using the UUID v5 algorithm.

@rra rra requested a review from cbanek October 13, 2023 20:32
CADC software uses an authentication component designed for use with
OpenID Connect that takes a token from the Authorization header and
sends it to an endpoint, expecting to get back the validated JWT
claims. Since it treats the token as opaque, we can use this with
our regular tokens as long as we provide an endpoint that returns
user metadata in the expected format.

Add /auth/cadc/userinfo as that endpoint, temporarily. Put CADC in
the URL because the return format is specific to the current needs
of the CADC auth code. In particular, it requires sub to be a UUID
(to allow username changes), which we generate based on an optional
configuration parameter and the UID of the user using the UUID v5
algorithm.
@rra rra enabled auto-merge October 25, 2023 21:44
@rra rra merged commit 96428d3 into main Oct 25, 2023
5 checks passed
@rra rra deleted the tickets/DM-41186 branch October 25, 2023 21:53
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.

None yet

2 participants