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

Validate bearer token through OIDC/OAuth endpoint #109

Closed
uniqueg opened this issue Sep 2, 2019 · 0 comments · Fixed by #111
Closed

Validate bearer token through OIDC/OAuth endpoint #109

uniqueg opened this issue Sep 2, 2019 · 0 comments · Fixed by #111
Assignees
Projects

Comments

@uniqueg
Copy link
Member

uniqueg commented Sep 2, 2019

Is your feature request related to a problem? Please describe.
Currently, when the security:authorization_required switch is set in the config file, the passed JSON Web Token (JWT) bearer token is base64-decoded and it's signature verified against an identity provider's (IdP) public key that is also hard-coded_ in the config file (under security:jwt:public_key). This is not a very flexible solution.

Describe the solution you'd like
A service call to an OIDC endpoint should be added that dynamically obtains a IdP's public key (otherwise keeping the current solution) via the https://[base-server-url]/jwks.json endpoint OR validates the token via the token introspection endpoint of the form https://[base-server-url]/token/introspect. The base-server-url can be obtained from a JWT by base64-decoding and extracting the iss claim.

Note that since the second solution (accessing the token introspection endpoint) may be more robust/safe, but usually requires a client secret, which right now we do not have and possibly do not want to have for every possible IdP (discussion point with ELIXIR Cloud & AAI group) this is currently not the preferred solution.

Describe alternatives you've considered
N/A

Additional context
The current handling of bearer tokens is done in wes_elixir/security/decorators.py, so this would be the entry point and likely the only file requiring modifications to implement the suggested changes.

@uniqueg uniqueg assigned uniqueg and unassigned uniqueg Sep 2, 2019
@koljaLanger koljaLanger self-assigned this Sep 2, 2019
@uniqueg uniqueg added this to To do in BH19 Japan Sep 2, 2019
@uniqueg uniqueg moved this from To do to In progress in BH19 Japan Sep 2, 2019
BH19 Japan automation moved this from In progress to Done Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
BH19 Japan
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants