Skip to content

Fix openid redirect issue to use base_redirect_url when nextUrl is absent #1282

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

Merged
merged 2 commits into from
Dec 27, 2022

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Dec 23, 2022

Signed-off-by: Craig Perkins [email protected]

Description

Fixes an issue on openid login that redirects to / when a opensearch_security.openid.base_redirect_url is present and a nextUrl query param is absent. opensearch_security.openid.base_redirect_url is configured in opensearch_dashboards.yml and often matches the server.basePath which is the root url for OSD. On successful login, the user should be routed to the redirect url if nextUrl is absent.

Category

[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]

Bug fix

Issues Resolved

#1098

Testing

Adds 2 new unit tests to test when request.query.nextUrl is present and when it is absent to use the config.openid?.base_redirect_url

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

@cwperks cwperks requested a review from a team December 23, 2022 15:57
@codecov-commenter
Copy link

Codecov Report

Merging #1282 (7b713a8) into main (75a7248) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1282   +/-   ##
=======================================
  Coverage   71.78%   71.78%           
=======================================
  Files          88       88           
  Lines        2027     2027           
  Branches      274      274           
=======================================
  Hits         1455     1455           
  Misses        509      509           
  Partials       63       63           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@RyanL1997 RyanL1997 merged commit db1fbb9 into opensearch-project:main Dec 27, 2022
@RyanL1997
Copy link
Collaborator

@cwperks Should this one be backported?

@cwperks
Copy link
Member Author

cwperks commented Dec 27, 2022

@RyanL1997 Yes! This can be backported to 2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants