Fix OIDC looping issue - too many redriects#1014
Fix OIDC looping issue - too many redriects#1014cliu123 merged 2 commits intoopensearch-project:mainfrom
Conversation
|
@aoguan1990 Great contribution! Please sign the commit and add tests for the fix. |
Signed-off-by: Aozixuan, Priscilla, Guan <aozixuanguan1990@gmail.com> Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
@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 <aoguan@amazon.com> (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 <aoguan@amazon.com> Signed-off-by: Vasile Negru <vasile@eosfintek.com>
Signed-off-by: Aozixuan Priscilla Guan aoguan@amazon.com
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.