-
Notifications
You must be signed in to change notification settings - Fork 159
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
Add JWT authentication type to MultipleAuthentication #2107
Add JWT authentication type to MultipleAuthentication #2107
Conversation
Signed-off-by: merlinz01 <[email protected]>
5375372
to
804422a
Compare
Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: merlinz01 <[email protected]>
At this point what I am seeing is that the session cookie is being lost (deleted) when the browser requests |
The request for The logic here
decides that the request needs authenticated. This line
is then called, which deletes the auth cookie. I assume this is not the desired behavior, and it seems like it would cause problems even without my changes. Any input? |
Signed-off-by: merlinz01 <[email protected]>
OK, I think I fixed the endless loop of the page refreshing with the above commit. |
Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: merlinz01 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2107 +/- ##
==========================================
+ Coverage 71.40% 71.46% +0.05%
==========================================
Files 97 97
Lines 2651 2649 -2
Branches 404 411 +7
==========================================
Hits 1893 1893
+ Misses 642 641 -1
+ Partials 116 115 -1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: merlinz01 <[email protected]>
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.
Left two minor comments, but otherwise thanks for the contribution @merlinz01 ! We can also get this merged first and follow up, since it has been a while, sorry for the delay in review
Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: merlinz01 <[email protected]>
@merlinz01 Can you check the integTest failure?
|
Signed-off-by: merlinz01 <[email protected]>
Try it now. |
All CI Checks green now. Thank you @merlinz01. @derek-ho Can you review again? |
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.
LGTM
* Add JWT authentication type to MultipleAuthentication Signed-off-by: merlinz01 <[email protected]> * clarify comments in AuthenticationType.authHandler Signed-off-by: merlinz01 <[email protected]> * collect additional auth headers from all multi-auth handlers Signed-off-by: merlinz01 <[email protected]> * implement MultipleAuthentication.getCookie Signed-off-by: merlinz01 <[email protected]> * Add test for multiauth with JWT Signed-off-by: merlinz01 <[email protected]> * add explanatory comments in login page Signed-off-by: merlinz01 <[email protected]> * remove logging of JWT in test Signed-off-by: merlinz01 <[email protected]> * add check for empty auth options list in login page Signed-off-by: merlinz01 <[email protected]> * Add comments about getCookie method Signed-off-by: merlinz01 <[email protected]> * remove unneeded comment Signed-off-by: merlinz01 <[email protected]> * Don't load sample data in JWT multiauth test Signed-off-by: merlinz01 <[email protected]> * remove sample data code and unneeded promise handling Signed-off-by: merlinz01 <[email protected]> * update test for missing JWT Signed-off-by: merlinz01 <[email protected]> * ensure JWT signing key consistency Signed-off-by: merlinz01 <[email protected]> --------- Signed-off-by: merlinz01 <[email protected]> Co-authored-by: Derek Ho <[email protected]> (cherry picked from commit 252d8fb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add JWT authentication type to MultipleAuthentication * clarify comments in AuthenticationType.authHandler * collect additional auth headers from all multi-auth handlers * implement MultipleAuthentication.getCookie * Add test for multiauth with JWT * add explanatory comments in login page * remove logging of JWT in test * add check for empty auth options list in login page * Add comments about getCookie method * remove unneeded comment * Don't load sample data in JWT multiauth test * remove sample data code and unneeded promise handling * update test for missing JWT * ensure JWT signing key consistency --------- (cherry picked from commit 252d8fb) Signed-off-by: merlinz01 <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Derek Ho <[email protected]>
Thanks for your assistance! 🎉 🚀 👍 |
Description
Allows JWT to be included in a multiple-authentication configuration.
Category
Enhancement
Why these changes are required?
Previously one cannot use basic auth and JWT auth together
What is the old behavior before changes and new behavior after changes?
OSD error when basic auth and JWT auth are configured
Issues Resolved
#1814
Testing
[Please provide details of testing done: unit testing, integration testing and manual testing]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.