-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add JWT authentication type to MultipleAuthentication #2107
Add JWT authentication type to MultipleAuthentication #2107
Conversation
Signed-off-by: merlinz01 <na@notaccessible.xyz>
5375372
to
804422a
Compare
Signed-off-by: merlinz01 <na@notaccessible.xyz>
Signed-off-by: merlinz01 <na@notaccessible.xyz>
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 <na@notaccessible.xyz>
OK, I think I fixed the endless loop of the page refreshing with the above commit. |
Signed-off-by: merlinz01 <na@notaccessible.xyz>
Signed-off-by: merlinz01 <na@notaccessible.xyz>
Signed-off-by: merlinz01 <na@notaccessible.xyz>
Signed-off-by: merlinz01 <na@notaccessible.xyz>
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 <na@notaccessible.xyz>
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 <na@notaccessible.xyz>
Signed-off-by: merlinz01 <na@notaccessible.xyz>
Signed-off-by: merlinz01 <na@notaccessible.xyz>
@merlinz01 Can you check the integTest failure?
|
Signed-off-by: merlinz01 <na@notaccessible.xyz>
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 <na@notaccessible.xyz> * clarify comments in AuthenticationType.authHandler Signed-off-by: merlinz01 <na@notaccessible.xyz> * collect additional auth headers from all multi-auth handlers Signed-off-by: merlinz01 <na@notaccessible.xyz> * implement MultipleAuthentication.getCookie Signed-off-by: merlinz01 <na@notaccessible.xyz> * Add test for multiauth with JWT Signed-off-by: merlinz01 <na@notaccessible.xyz> * add explanatory comments in login page Signed-off-by: merlinz01 <na@notaccessible.xyz> * remove logging of JWT in test Signed-off-by: merlinz01 <na@notaccessible.xyz> * add check for empty auth options list in login page Signed-off-by: merlinz01 <na@notaccessible.xyz> * Add comments about getCookie method Signed-off-by: merlinz01 <na@notaccessible.xyz> * remove unneeded comment Signed-off-by: merlinz01 <na@notaccessible.xyz> * Don't load sample data in JWT multiauth test Signed-off-by: merlinz01 <na@notaccessible.xyz> * remove sample data code and unneeded promise handling Signed-off-by: merlinz01 <na@notaccessible.xyz> * update test for missing JWT Signed-off-by: merlinz01 <na@notaccessible.xyz> * ensure JWT signing key consistency Signed-off-by: merlinz01 <na@notaccessible.xyz> --------- Signed-off-by: merlinz01 <na@notaccessible.xyz> Co-authored-by: Derek Ho <dxho@amazon.com> (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 <na@notaccessible.xyz> 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 <dxho@amazon.com>
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.