-
Notifications
You must be signed in to change notification settings - Fork 531
9229 - enable OIDC bearer token API access #9230
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
Conversation
Replace the placeholder of static endpoint with retrieving the UserInfo endpoint URI from all know OIDC authentication providers and iterate over them. The access token might match for any of them. Also making the errors a bit more descriptive and adding logging.
Otherwise, BearerAccessToken.parse throws a ParseException since it expects the full HTTP Authorization header value.
|
I pushed a few commits fixing issues I ran into while testing here: https://github.com/vera/dataverse/commits/9229-api-oidc-access I ran into one more issue which I am not sure how to fix:
This line does not succeed in finding the correct user. If I understand correctly, it tries to look up an Is the OIDC user ID stored anywhere during user registration? |
Some fixes for 9229 - enable OIDC bearer token API access
| // This will need to be modified to provide mappings somehow for existing non-OIDC-users. | ||
| // TODO: If we keep the current login infrastructure alive, we should introduce a common static | ||
| // method in OIDCAuthProvider to create the identifier in both places. | ||
| AuthenticatedUser authUser = authSvc.getAuthenticatedUser(userInfo.getSubject().getValue()); |
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.
FWIW: Using authSvc.getAuthenticatedUserByEmail(userInfo.getEmail().toString()); should work. This isn't checking to see if the account was created using OIDC though.
|
sizing:
|
|
sizing:
|
|
Sizing:
|
|
Replaced by #9532. Thanks @johannes-darms |
What this PR does / why we need it:
We want to enable OIDC bearer token based access to the API for existing OIDC users.
TODOs:
Which issue(s) this PR closes:
Closes #9229
Special notes for your reviewer:
None yet.
Suggestions on how to test this:
None yet.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope.
Is there a release notes update needed for this change?:
Yes.
Additional documentation:
None yet.