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

How to achieve multitenancy in superset using single instance #23306

Closed
santoshmallah opened this issue Mar 8, 2023 · 9 comments
Closed

How to achieve multitenancy in superset using single instance #23306

santoshmallah opened this issue Mar 8, 2023 · 9 comments
Labels
#bug Bug report

Comments

@santoshmallah
Copy link

santoshmallah commented Mar 8, 2023

How do we have different database connections having separate metadatabase connections per tenant?

Example:-
Tenant-1: Database-1
Tenant-2: Database-2

If user login is of tenant-1
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2:// dbusername:dbpassword@localhost/ Database-1'
else if user login is of tenant-2
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2:// dbusername:dbpassword@localhost/ Database-2'

Therefore the user is login and belongs to whichever tenant SQLALCHEMY_DATABASE_URI database connection to be changed to according to that tenant

  • browser type and version: Chrom
  • superset version: 2.0.1
  • python version: 3.8.0
  • node.js version: 16.14.2
@santoshmallah santoshmallah added the #bug Bug report label Mar 8, 2023
@raxit-technosouls
Copy link

I have similar use case, any advise how to handle?

@sslankesh
Copy link

I too have similar usecase.
Our problem is we cannot keep data of two clients in single database.
So row level security is out of question for us.
Only option is to have separate database schemas.

@busyboy77
Copy link

Vote++

@k31thchan
Copy link

I guess it is more like feature request?

@williamsdb
Copy link

Yes, when I first asked I assumed it was possible but it seems not.

@aldipee
Copy link

aldipee commented Mar 1, 2024

Any update on this?

@rusackas
Copy link
Member

rusackas commented Mar 1, 2024

No update here, and I'd say it's not likely as a core feature. Closing this since it's not a bug, but a feature request. Typically, if people need multiple tenants, they spin up multiple instances (e.g. in Preset, we call these Workspaces). It is possible to do so, though non-trivial, and again not likely to be a Superset feature in the near future. If anyone is truly interested in implementing this, however, we'd be open to a SIP (Superset Improvement Proposal) and can provide more information on that process if needed.

@rusackas rusackas closed this as completed Mar 1, 2024
@busyboy77
Copy link

We can sponsor this achievement ( with certain conditions ). Please share the way forward. Thank you

@rusackas
Copy link
Member

rusackas commented Mar 4, 2024

@busyboy77 this would be a large enough change that people will have myriad security concerns and want to thoroughly review/discuss any architectural/permissions changes. You can submit a SIP if you'd like to propose a technical approach for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

8 participants