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

[BUG] Dashboard login problem - global_tenant getting displayed in custom tenants if Global tenant is disabled #1248

Closed
deepak-rsystems opened this issue Dec 8, 2022 · 3 comments · Fixed by #1277
Labels
bug Something isn't working good first issue Good for newcomers triaged

Comments

@deepak-rsystems
Copy link

What is the bug?
Dashboard login has a problem that if we give access to global_tenant for some user/role, then global_tenant is getting displayed in custom tenants if Global tenant is disabled.

How can one reproduce the bug?
Pre-requisites:

  1. We have a custom tenant "cadm"
  2. We have disabled "Global" and "Private" tenants

Steps to reproduce the behavior:

  1. Go to Dashboard
  2. Click on Single Sign-on
  3. See that user is logged in to global_tenant by default:

global-tenant-issue-1

  1. Once the user selects the custom tenant "cadm", then the global_tenant automatically gets removed from custom tenant drop down:

global-tenant-issue-2

What is the expected behavior?
We should not see global_tenant in custom tenants drop down if Global tenant is disabled from multi tenancy configuration.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Opensearch version 2.4.0

@deepak-rsystems deepak-rsystems added bug Something isn't working untriaged labels Dec 8, 2022
@cwperks cwperks added good first issue Good for newcomers triaged and removed untriaged labels Dec 12, 2022
@cwperks
Copy link
Member

cwperks commented Dec 12, 2022

[Triage] @deepak-rsystems Thank you for filing this issue. We would gladly accept a PR.

@RyanL1997 can you outline the steps you took to try reproducing this issue?

@RyanL1997
Copy link
Collaborator

@deepak-rsystems Thanks for filing this issue, and I have reproduced this behavior and there will be a fix or further information provided soon.

@RyanL1997
Copy link
Collaborator

RyanL1997 commented Dec 20, 2022

Update: I have confirmed with @cliu123 that this is a expected behavior. If the user has enabled multi-tenancy but disabled both 'Global' and 'Private' tenants, it will use this global_tenant as a temporary custom tenants before choosing/creating a custom tenants. Otherwise, it will make no difference with disabling multi-tenancy. If the user doesn't have any other custom tenant without global_tenant, it will return this error:
{"statusCode":400,"error":"Bad Request","message":"No available tenant for current user, please reach out to your system administrator"}
However, for solving this confusion, I have implemented the above fix for user who has already have their own custom tenants so that this global_tenant label won't appear in the custom tenants selection list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers triaged
Projects
None yet
3 participants