[SIP-152] User Groups for Simplified User and Role Management
Motivation
Currently, Apache Superset assigns roles directly to users, allowing for flexible but sometimes cumbersome permission management. As organizations scale, security management and role assignment become increasingly complex, particularly with large user bases. Managing roles at the individual user level leads to inefficiencies and inconsistencies, making access control difficult to maintain and audit.
User and role management challenges become particularly evident in the following situations:
- Applying permission changes to roles associated with a large user set, as these users are not explicitly grouped together.
- Assigning a new role to a large user set without a clear mechanism for bulk updates.
- Managing temporary or project-based access where users need time-limited permissions that must be revoked later.
- Handling employee transitions.
- Synchronizing users with an Identity Provider (IdP) where roles are handled as groups.
This SIP proposes the introduction of User Groups, which will allow multiple users to be grouped together while also associating multiple roles with the group. This will streamline permission management, making it easier to manage access control across different user sets. By introducing groups, administrators can efficiently assign and modify permissions at scale, reducing administrative overhead while improving security and compliance.
Proposed Change
Introduction of User Groups
- A Group is a new entity that contains multiple Users and multiple Roles.
- Users within a group inherit all roles assigned to that group.
- Users can still have roles assigned directly, ensuring backward compatibility.
- A user can belong to multiple groups.
- Groups will be managed via the UI and API.
Changes to Data Model

Code changes
Apache Superset relies on Flask-AppBuilder (FAB) for authentication and authorization, and it is more natural to introduce User Groups at the Flask-AppBuilder level because:
- Model Definitions: Superset's user and role models are defined in Flask-AppBuilder, making it the right place to introduce group models (ab_group, ab_group_user, and ab_group_role).
- API Permissions and Authorization: Permissions are asserted at the Flask-AppBuilder level before Superset handles the request. Introducing groups at this level ensures API permission checks work seamlessly across all FAB-based applications, including Superset.
- Centralized Role Management: Since Flask-AppBuilder already provides role-based access control (RBAC), implementing groups here allows a more consistent and maintainable approach across multiple projects that use FAB.
A POC is already started here: dpgaspar/Flask-AppBuilder#2305
However, changes will also be required at the Superset level to ensure proper integration:
-
Database Migration: Superset will need migration scripts to handle the new group-related tables and relationships.
-
Data Access Assertions: Superset applies additional data access checks beyond those enforced by Flask-AppBuilder. These will need updates to consider group-based role inheritance.
UI & API Enhancements: FAB's UI and API must be updated to allow users to manage groups and assign roles accordingly.
Ownership authorization:
We have the concept of ownership on dashboards, charts, datasets and alerts & reports. SIP-126 proposed introducing group based entity ownership. This SIP is a step forward on this direction while maintaining (and improving) the current datasource implicit access.
POC screenshots:
Groups menus access:

List of users now with groups:

List of Groups:

New or Changed Public Interfaces
Flask-AppBuilder will introduce new database models a new ModelView and the following permissions:
can list on UserGroupModelView
can add on UserGroupModelView
can edit on UserGroupModelView
can show on UserGroupModelView
can delete on UserGroupModelView
As well as the following REST APIs
- GET
/api/v1/security/groups/ - List groups
- GET
/api/v1/security/groups/<id> - Get group
- PUT
/api/v1/security/groups/<id> - Change group
- POST
/api/v1/security/groups/ - Add group
- DELETE
/api/v1/security/groups/<id> - Delete group
- POST `/api/v1/security/groups//users/ - Add user(s) to group
- DELETE `/api/v1/security/groups//users// - Remove user from group
- POST `/api/v1/security/groups//roles/ - Add role(s) to group
- DELETE `/api/v1/security/groups//roles// - Remove role from group
Apache Superset will need the following changes:
- A database migration that will create the new tables
- Add previously described new permissions to the admin roles
- Change security/manager methods that assert data access to include groups
A POC is already started here: #32121
New dependencies
No new dependencies will be added, Superset will require flask-appbuilder > 4.6.0.
Migration Plan and Compatibility
Implementation plan on 3 phases:
Phase1, backward compatible:
- Add Group entities to flask-appbuilder and release
- Bump flask-appbuilder on Superset and adapt datasource authorization
Phase2 SIP-126 (Breaking Superset 6.0)
- replace all owner references with the new Subject model that can be a User, Group or Role. This covers Dashboards, Charts, Datasets and Alerts & Reports.
- introduce the Viewer property to Dashboard and Chart entities (for Alerts & Reports having a Viewer is not very useful). During the migration we map all Dashboard RBAC roles as Viewers and remove the DASHBOARD_RBAC feature flag.
Phase 3 (Breaking Superset 6.0 or 7.0):
- Remove datasource access permissions. Map Roles that have implicit access to Dashboards and Charts to their respective Viewer property, and remove the implicit dashboard/chart access control logic. However, for Dashboards that are in Draft state we leave the Viewer property empty.
- Remove the "published" property from the Dashboard model, and remove the Draft/Published pill (good riddance!).
This proposed feature is backward compatible.
Rejected Alternatives
Keeping the current direct role assignment model but improving UI bulk assignment tools.
[SIP-152] User Groups for Simplified User and Role Management
Motivation
Currently, Apache Superset assigns roles directly to users, allowing for flexible but sometimes cumbersome permission management. As organizations scale, security management and role assignment become increasingly complex, particularly with large user bases. Managing roles at the individual user level leads to inefficiencies and inconsistencies, making access control difficult to maintain and audit.
User and role management challenges become particularly evident in the following situations:
This SIP proposes the introduction of User Groups, which will allow multiple users to be grouped together while also associating multiple roles with the group. This will streamline permission management, making it easier to manage access control across different user sets. By introducing groups, administrators can efficiently assign and modify permissions at scale, reducing administrative overhead while improving security and compliance.
Proposed Change
Introduction of User Groups
Changes to Data Model
Code changes
Apache Superset relies on Flask-AppBuilder (FAB) for authentication and authorization, and it is more natural to introduce User Groups at the Flask-AppBuilder level because:
A POC is already started here: dpgaspar/Flask-AppBuilder#2305
However, changes will also be required at the Superset level to ensure proper integration:
Database Migration: Superset will need migration scripts to handle the new group-related tables and relationships.
Data Access Assertions: Superset applies additional data access checks beyond those enforced by Flask-AppBuilder. These will need updates to consider group-based role inheritance.
UI & API Enhancements: FAB's UI and API must be updated to allow users to manage groups and assign roles accordingly.
Ownership authorization:
We have the concept of ownership on dashboards, charts, datasets and alerts & reports. SIP-126 proposed introducing group based entity ownership. This SIP is a step forward on this direction while maintaining (and improving) the current datasource implicit access.
POC screenshots:
Groups menus access:

List of users now with groups:

List of Groups:

New or Changed Public Interfaces
Flask-AppBuilder will introduce new database models a new ModelView and the following permissions:
can list on UserGroupModelViewcan add on UserGroupModelViewcan edit on UserGroupModelViewcan show on UserGroupModelViewcan delete on UserGroupModelViewAs well as the following REST APIs
/api/v1/security/groups/- List groups/api/v1/security/groups/<id>- Get group/api/v1/security/groups/<id>- Change group/api/v1/security/groups/- Add group/api/v1/security/groups/<id>- Delete groupApache Superset will need the following changes:
A POC is already started here: #32121
New dependencies
No new dependencies will be added, Superset will require flask-appbuilder > 4.6.0.
Migration Plan and Compatibility
Implementation plan on 3 phases:
Phase1, backward compatible:
Phase2 SIP-126 (Breaking Superset 6.0)
Phase 3 (Breaking Superset 6.0 or 7.0):
This proposed feature is backward compatible.
Rejected Alternatives
Keeping the current direct role assignment model but improving UI bulk assignment tools.