opensearch-project / security-dashboards-plugin

🔐 Manage your internal users, roles, access control, and audit logs from OpenSearch Dashboards
https://opensearch.org/docs/latest/security-plugin/index/
Apache License 2.0
66 stars 147 forks source link

[BUG] Tenancy should be automatically switched to user's default tenant when the user does not have access to the tenant read from a cookie #1983

Open DarshitChanpura opened 1 month ago

DarshitChanpura commented 1 month ago

What is the bug? The tenant doesn't switch to default Private when logging in as a different user who doesn't have permission to the tenant.

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Launch opensearch-dashboards.
  2. Login as admin and create a new user.
  3. Switch to global tenant on admin user.
  4. Log out as admin and log-in as the new user.
  5. Click on Switch tenant from user information menu and see error

What is the expected behavior? Tenant should switch to a default when currently logged in user doesn't have permission to the tenant stored in the cookie.

Do you have any screenshots?

https://github.com/opensearch-project/security-dashboards-plugin/assets/35282393/7385302b-51fa-4aa4-9e94-9475580e2f32

scrawfor99 commented 1 month ago

[Triage] Hi @DarshitChanpura thanks for filing this issue. Nice catch! This should be hopefully fairly straightforward.