Repository navigation
Superset - Clarification regarding support for multiple tenants #42373
Replies: 2 comments
|
This is essentially the same question you asked in discussion #42242, and the core answer hasn't changed: Superset does not have a native "active organizational context" concept that dynamically shows/hides dashboards based on a session-level tenant switch. However, you can get close by combining features you're already using. The gap you've identified is real: RLS filters data inside charts but doesn't control dashboard visibility. And What can work today:
Bottom line: There's no out-of-the-box session-level org context in Superset 6.0.0 (or later). The cleanest path is the embedded guest token approach, where your platform backend controls which dashboards and RLS rules each token grants. If embedding isn't an option, you'd need to build the context-switching logic in your application layer by dynamically managing role assignments via the API. As @rusackas mentioned in your earlier thread, multi-tenancy in open-source Superset is doable but non-trivial. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
In Apache Superset 6.x, multi-tenancy where a single user dynamically switches organization context is achieved through one of two proven architectures: Architecture 1: Embedded SDK with Scoped Guest Tokens (Recommended)If users access Superset embedded inside your host application portal, the host application manages the active organization context.
Architecture 2: Custom Security Manager with Dynamic Session Context (Standalone UI)If users log directly into the standalone Superset web interface:
# In superset_config.py
from flask import session
def get_active_tenant():
return session.get("active_tenant_id", "DEFAULT_ORG")
JINJA_CONTEXT_ADDONS = {
"current_tenant": get_active_tenant
}In your datasets, add a filter clause: organization_id = '{{ current_tenant() }}'
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I am using superste version 6.0.0 (ready to upgrade to later stable versions if needed) , is there a concept in superset which make the app to support multiple tenants ?
We have a platform where a single user can belong to and switch context between multiple client organizations (e.g., switching between Organization A and Organization B via a dropdown or application state).When a user is acting within the context of "Organization A", they should only see dashboards and data relevant to Organization A.
Out of 10available dashboards, 9 are global/common across all organizations.1 dashboard is hyper-specific to Organization A and should only be visible when the user's active context is set to Organization A.
What i looked into :
RLS is enabled so only the specific customer data at a time the charts and dashboards would be showing , when user chages between multiple customer , but as said some dashboards are specifically made for a customer organization - so in that case when the user is in that context only i need him to see that dashbord or chart. (The RLS is already enabled.)
I looked into using User Group-based Access Control and DASHBOARD_RBAC. While I could create a static group/role per organization and assign users to them, it does not fully solve our problem because a single user belongs to multiple organizations at the same time.If we give them all roles statically, they see everything simultaneously, ruining the specific organizational context we need to isolate
.My Questions to the Community:Is there an out-of-the-box or native feature in Superset 6.0.0/ later versions that allows passing or setting an active organizational/customer context dynamically at the user session level?
All reactions