-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fix OIDC looping issue - too many redriects #1014
Conversation
@aoguan1990 Great contribution! Please sign the commit and add tests for the fix. |
Signed-off-by: Aozixuan, Priscilla, Guan <[email protected]> Signed-off-by: Aozixuan Priscilla Guan <[email protected]>
Signed-off-by: Aozixuan Priscilla Guan <[email protected]>
@cliu123 Unit test and commit issues are fixed. Please advice when we can resolve the integration test blocker. |
@aoguan1990 Thanks for resoving these issues! Could you please add tests for the fix? Without the fix, the test should fail. With the fix, the test should pass. |
I saw integration test failed on download 2.1 security artifacts. do we have 2.1 artifacts now?
|
@seraphjiang This is an known issue. 2.1.0 build failed, so the artifact hasn't been available yet. This PR needs to wait for the artifact. |
@opensearch-project/security Can we get a second review for this? |
@aoguan1990 @seraphjiang Thanks for the contribution! |
@aoguan1990 I know this was merged, but I do not see test modifications in the pull request, could you make another pull request to include them? |
Signed-off-by: Aozixuan Priscilla Guan <[email protected]> (cherry picked from commit 015dc3f)
@peternied Due to the technical challenge, our existing test framework does not include test cases for OIDC authentication. As per discussion with @seraphjiang and @zengyan-amazon, we can revisit the OIDC test case issue later. So closed the issue #990 for now. |
Signed-off-by: Aozixuan Priscilla Guan <[email protected]> (cherry picked from commit 015dc3f) Co-authored-by: Aozixuan Priscilla Guan <[email protected]>
Signed-off-by: Aozixuan Priscilla Guan <[email protected]> Signed-off-by: Vasile Negru <[email protected]>
Signed-off-by: Aozixuan Priscilla Guan [email protected]
Description
Customized error handling mechanism based on the error message for OIDC routing
Category
Bug fix
Why these changes are required?
Resolve redirect login looping issues when authentication failures detected.
What is the old behavior before changes and new behavior after changes?
Old Behavior:
Any exceptions caught during the OIDC authentication process causes redirecting login infinitely.
New Behavior:
If error message includes "authentication error": => return 401: unauthorized
Else: redirect to login
Issues Resolved
#990
Testing
unit testing and integration 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.