Skip to content
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 issue: tenant is defaulting incorrectly based on the ordering of: opensearch_security.multitenancy.tenants.preferred #2019 #2163

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

RajatGupta02
Copy link
Contributor

Description

Fixes a bug where the tenant was defaulting incorrectly based on the ordering of opensearch_security.multitenancy.tenants.preferred, whereas it should be on the basis of default tenant.

Category

Bug fix

Why these changes are required?

Fix: #2019

What is the old behavior before changes and new behavior after changes?

Old behavior:
If opensearch_security.multitenancy.tenants.preferred: ["Global", "Private"] and default tenant is Private the user will be logged into Global tenant.
New behavior:
The user will be logged in as the default tenant (which is Private in the above example)

Issues Resolved

Fix: #2019

Testing

Manually tested the behavior

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.

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.46%. Comparing base (ded4012) to head (1962213).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2163   +/-   ##
=======================================
  Coverage   71.46%   71.46%           
=======================================
  Files          97       97           
  Lines        2649     2649           
  Branches      403      403           
=======================================
  Hits         1893     1893           
  Misses        641      641           
  Partials      115      115           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

… opensearch_security.multitenancy.tenants.preferred

Signed-off-by: Rajat Gupta <[email protected]>
Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this fix!

@cwperks
Copy link
Member

cwperks commented Jan 8, 2025

The workflow runs appear to be stuck and I don't have a way to cancel and re-run. Can you either push a small commit or force push the existing change?

@cwperks
Copy link
Member

cwperks commented Jan 8, 2025

The workflow runs appear to be stuck and I don't have a way to cancel and re-run. Can you either push a small commit or force push the existing change?

nvm, my Github was set to Try the new merge experience and I didn't see the option to Approve and run. I switched back to classic and I was able to approve running the CI checks.

@cwperks cwperks added the backport 2.x backport to 2.x branch label Jan 9, 2025
@DarshitChanpura DarshitChanpura merged commit bc2c444 into opensearch-project:main Jan 9, 2025
18 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 9, 2025
… opensearch_security.multitenancy.tenants.preferred (#2163)

(cherry picked from commit bc2c444)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
cwperks pushed a commit that referenced this pull request Jan 9, 2025
… opensearch_security.multitenancy.tenants.preferred (#2163) (#2165)

(cherry picked from commit bc2c444)
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>
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
5 participants