-
Notifications
You must be signed in to change notification settings - Fork 42
feat: add JWT authorization #741
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #741 +/- ##
==========================================
- Coverage 60.04% 59.58% -0.46%
==========================================
Files 32 32
Lines 3599 3640 +41
==========================================
+ Hits 2161 2169 +8
- Misses 1438 1471 +33
🚀 New features to boost your workflow:
|
|
Hi @tomondre Could you also add in the description all the related PRs (REANA-db, client et...), please ? |
|
Regarding the failing checks, have a look at Tips for Git for the expected commit message style. You can run the tests locally before you push too if you want, e.g.: For the |
Uses JWT via Authlib and JWK's for verification
Uses JWT via Authlib and JWK's for verification
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.
Looks fine to me. I would like a deeper review by the REANA team :) @tiborsimko
|
|
||
| if not user: | ||
| return jsonify(message="User not signed in"), 401 | ||
| if token_required and not user.active_token: |
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.
The token_required should be refactored, as the user may not have access_token created when accessing the API with JWT token for the first time. This is preferred (see #727)
Uses JWT via Authlib and JWK's for verification
signin_requireddecorator to handle JWT bearer tokensidp_issuer,idp_subjectto map idp user ids to reana user idsThis change allows users to authenticate with JWT tokens issued by an external identity provider, with token validation performed against the provider's JWK set.
More information on our efforts and progress can be found in this issue