Apache Superset SSO and identity integration

A build guide for connecting self-hosted Superset to your identity provider, choosing between OAuth2, LDAP and remote user headers, and mapping directory groups to Superset roles safely.

On this page

Why Apache Superset SSO and identity integration needs planning before go-live

If local Superset accounts are still in use, the first goal is to stop creating them and send every login through your identity provider, so that access follows the same joiner, mover and leaver process as your other systems. Starting from that goal matters because a working login screen is the easy part. What decides whether access is governed is how identity groups become Superset roles through AUTH_ROLES_MAPPING, how a removed employee loses access to dashboards and data sources, how service accounts are handled, and what happens to the metadata database that stores users, roles and permissions.

The configuration is harder than it looks for three reasons. Superset is built on Flask-AppBuilder, so authentication settings in superset_config.py such as the auth type, registration behavior and user info mapping interact with each other, and a change that looks cosmetic can alter who is created on first login. Role mapping drifts over time: group names change in the identity provider, new groups appear, and nobody owns the mapping table, so users keep roles they should no longer have. Finally, teams often keep a local admin account as a fallback. That account is useful during an outage, but if it has no owner, no rotation and no alerting, it becomes the easiest way into the platform.

Before go-live, decide who owns the group-to-role mapping, how group changes are reviewed, which accounts are allowed to bypass SSO and how their use is logged, and how a deprovisioned user's sessions and roles are removed from the metadata database. Confirm each of these against your identity provider's documentation and your own environment, and test a leaver scenario end to end in staging. The Apache Superset configuration documentation is the reference for which authentication options your release supports.

Which Superset settings and identity sources are involved

Login to Superset touches the Flask-AppBuilder security manager, the metadata database, and whichever identity source you choose. Each part has its own settings, and a mistake in one of them usually shows up as a failed login or a user with the wrong access.

Flask-AppBuilder security manager

Superset is built on Flask-AppBuilder, and its security manager decides how users authenticate, which identity provider is called, and how users are created on first login. Most identity work happens in superset_config.py, where the authentication type and provider settings live. Check which security manager class your deployment loads, and confirm that any custom override still works after upgrades, since security manager code is one of the places where version changes can matter.

Configuration docs

Metadata database stores users and roles

Superset keeps user accounts, role assignments and group-derived roles in its metadata database, not in the identity provider. Even with SSO, a user must exist in that database before a role can be assigned, so the database is part of the login path. Plan for PostgreSQL or MySQL as the metadata store, and back it up before any identity change, because a bad role mapping is easier to recover from when you can restore prior state.

OAuth2 and OIDC providers

OAuth2 and OIDC providers such as Google and Azure handle the sign-in and return a token or profile to Superset. Confirm which claims your provider sends, such as email and group membership, because Superset can only map what it receives. Check the provider's app registration, redirect URI and whether group claims need an extra configuration step on the provider side before you test.

Custom OAuth2 servers with code flow

Superset supports custom OAuth2 servers that use the authorization code flow, which covers many self-hosted identity platforms. Confirm the server supports the code flow with the client settings Superset needs, and that it can return group or role information in a form you can map. Ask your identity team who owns the client secret, how it is rotated, and where it is stored, since it must be kept out of source control.

LDAP directories

LDAP lets Superset authenticate against a corporate directory and read group membership from it. Confirm the bind account, search base, user filter and group attribute with the directory team before testing, and use a read-only service account. Note that a directory outage or a changed group name can change what a user can do in Superset, so review group mappings whenever directory structure changes.

Remote user header path

The remote user header path trusts an identity value that a reverse proxy or gateway sets in an HTTP header. This is only safe when Superset is reachable solely through that proxy and clients cannot set the header themselves, so network controls are part of the design. Verify that direct access to the application port is blocked and that the proxy strips any incoming header before setting its own.

AUTH_ROLES_MAPPING and session prerequisites

AUTH_ROLES_MAPPING translates provider groups into Superset roles, so it defines what each user can access after login. Before any of this works, Superset requires a user-specified SECRET_KEY to start, and session settings protect the login cookie. Confirm that the mapping covers every group that should grant access, that unmatched users get a safe default, and that the secret key is set and rotated under a documented procedure.

Configuration docs

Choosing OAuth2/OIDC, LDAP or remote user headers

This table compares the three ways Superset can authenticate users against the situation that favors each one, the operational work it creates, and how group claims reach AUTH_ROLES_MAPPING. Read each row against your own identity estate, then decide whether local accounts stay as a break-glass path.

Decision factorOAuth2 or OIDCLDAPRemote user headers
Best fitModern IdP with OIDC or OAuth2 support, such as Google or Azure, or a custom OAuth2 server using the code flowDirectory-only estate where users and groups live in LDAP and no modern IdP federates themReverse proxy or gateway already authenticates users and forwards an identity header
Operational upkeepClient registration, redirect URIs and client secret rotation with the IdP teamBind account credentials, directory TLS certificates and search base or filter maintenanceProxy configuration and trust boundary maintenance; every change to the gateway affects Superset access
Main security riskMisconfigured redirect URIs or overly broad token scopesClear-text or unverified directory connections exposing bind credentialsHeader spoofing if any path reaches Superset without passing through the proxy
Group claims to AUTH_ROLES_MAPPINGGroups must be included as a token or userinfo claim; confirm the claim name and format with your IdPGroup membership is read from the directory; confirm the group attribute and search settings in your environmentGroups arrive as a header value; the proxy must set it from a trusted source only
Who must confirm detailsIdP administrator and Superset owner jointlyDirectory administrator and Superset ownerGateway team and Superset owner, with a spoofing test
Break-glass accountsKeep at least one local admin account with a strong password stored under dual controlKeep local admin for directory outages, separately from the bind accountKeep local admin; header-only login cannot recover from a gateway failure

How to configure Superset SSO step by step

This sequence takes a Superset instance from a default install to a state where users sign in through your identity provider, receive the Superset role that matches their group membership, and cannot create accounts on their own. Each step ends with a check so the next one starts from a verified state.

  1. Confirm the metadata database and secret key

    Before touching authentication, confirm that Superset runs on a production metadata database rather than the SQLite default or the Docker Compose PostgreSQL container, which the architecture documentation does not recommend for production. Use a PostgreSQL or MySQL version within the range the configuration documentation lists, and make sure a user-specified SECRET_KEY is set in superset_config.py, since Superset will not start without one. Done when the instance starts cleanly against the production database and the SECRET_KEY is stored in your secrets manager, not in the repository.

  2. Register Superset with the identity provider

    In your identity provider, create an application for Superset and set the redirect URI to the callback path your Superset URL uses for the chosen OAuth2 or OIDC flow, served over HTTPS. Note the client ID and client secret, and confirm which claims or group attributes the provider will send, because the role mapping in a later step depends on them. Done when the provider lists the application, the redirect URI matches your Superset address exactly, and you can see the group names that will be used for mapping.

  3. Configure the authentication type in superset_config.py

    Set AUTH_TYPE in superset_config.py to the method you chose (OAuth, LDAP, or remote user headers) and add the provider settings that method requires, such as the client credentials and discovery endpoint for OAuth2 or OIDC, or the server and search base for LDAP. Store secrets through environment variables or your secrets manager rather than in plain text. Confirm the exact keys against the configuration documentation for your Superset version, because provider-specific settings change between releases. Done when Superset restarts and the login page offers the provider button or LDAP prompt.

  4. Define AUTH_ROLES_MAPPING and the default role

    Map each identity provider group to the Superset role it should receive using AUTH_ROLES_MAPPING, and set AUTH_USER_REGISTRATION_ROLE so that users who match no group get a minimal role, ideally one with no data access. Keep the mapping table short and agree on it with the team that owns the directory groups, since every group name must match exactly. Done when the mapping file reviewed by security and the group names in the provider match one for one.

  5. Restrict self-registration

    Decide whether Superset may create accounts on first login, and if access must come only from directory membership, turn off self-registration so that only users who are assigned to a permitted group can get in. Review the other sign-in paths that remain enabled, including any local database login kept for break-glass access, and document who holds that account. Done when a sign-in attempt by a user outside all mapped groups is refused or lands in the minimal default role, as your policy requires.

  6. Test sign-in with a non-admin test user

    Create a test user in a mapped group in the identity provider, sign in to Superset with that account, and confirm it does not have administrator rights. Open the dataset and dashboard lists to see what the role allows, then try an action it should not allow, such as editing a role. Use an illustrative group such as analysts mapped to a standard role. Done when the test user signs in through the provider and the permissions match the mapped role's intended scope.

  7. Verify group-to-role results for each mapping

    Repeat the test for one account per mapped group and compare the role shown for each user in the Superset user list against the mapping file. Check that a user removed from a group loses the matching role after signing in again, and that a user in more than one group receives the combination you intended. Record the results and keep them with the change record. Done when every group produces the expected role in the user list and a group removal is reflected on the next login.

How SSO differs across single node, high availability and Kubernetes

A single-node Superset runs one web process on one host, so the identity configuration lives in one place: the Superset configuration file, usually superset_config.py. The application reads its authentication type, identity provider settings, role mapping and SECRET_KEY from that file at startup, and the callback URL registered with your identity provider points directly at that host. Because there is only one web process, session state and configuration cannot disagree, and most first integrations are built and tested this way.

  • Single config file: AUTH_TYPE, OAuth2 provider settings and AUTH_ROLES_MAPPING all sit in one file on one host.
  • Direct callback URL: the redirect URI registered with the provider matches the hostname users type into the browser.
  • Simple secret handling: one SECRET_KEY is set once and must still be supplied at startup.
  • Easy restart testing: a config change takes effect after a restart of the single process.
  • Limited blast radius: a misconfiguration affects one host, which makes rollback straightforward.

Before you rely on this model, confirm the exact callback path your chosen provider expects for Superset's OAuth2 flow in the configuration documentation, and test a full login, logout and group-to-role mapping for each test user.

Securing the identity path

Once Superset trusts an external identity provider, the login path becomes a security boundary in its own right. The controls below cover the secrets, mappings, endpoints and key material that decide whether that boundary holds when the identity provider, gateway or configuration changes.

Store client secrets and bind passwords outside config

OAuth2 client secrets and the LDAP bind password are credentials that can read user directories or impersonate the application. Keep them in your secrets manager or container secrets and inject them at startup rather than writing them into superset_config.py in source control. Check that the config file is readable only by the service account, that the bind account is read-only with the narrowest directory scope that still resolves group membership, and that rotation of these values is a documented runbook step.

Map unmapped users to a minimal role

Users who authenticate but match no entry in AUTH_ROLES_MAPPING should land in a role with almost no data access, not in a broad default. Review how your version assigns roles on first login and whether the default role is set explicitly. Test with a user who belongs to no mapped group and confirm they can sign in but see no dashboards, datasets or SQL Lab until an administrator grants access.

Configuration docs

Disable public self-registration

Self-registration lets any person who reaches the login page create an account, which then has whatever default role the configuration grants. Turn off public user registration in the authentication settings and rely on the identity provider to create and deprovision accounts. Confirm that a removed user in the directory cannot sign in again through an existing session or a cached account, and document who is allowed to create local accounts for break-glass access.

Keep local admin access for IdP outages

If the identity provider or LDAP server is down, an SSO-only setup can lock out every administrator. Plan at least one tested local administrator path, stored with a strong, offline credential and monitored for use. Verify that this path works in staging, that its use triggers an alert, and that the account is disabled again after the incident. Without this, recovery depends on the same system that failed.

Trust proxy headers only from the gateway

When Superset reads remote user headers set by a reverse proxy, any client that can reach the application directly can forge those headers and impersonate another user. Accept the headers only from the gateway's address, strip any incoming copies at the edge, and block direct access to the application port from outside the proxy network. Confirm this with a request sent straight to the container that includes a spoofed user header.

Enforce HTTPS on callback endpoints

OAuth2 and OIDC redirect URIs and the session cookies that follow them must travel over TLS, or authorization codes and session tokens can be intercepted. Register only https redirect URIs with the identity provider, set secure cookie flags on the Superset side, and confirm that HTTP requests redirect to HTTPS before reaching the login route. Check the exact callback path your version uses against the identity provider registration.

Rotate SECRET_KEY with PREVIOUS_SECRET_KEY

Superset requires a user-specified SECRET_KEY to start, and changing it without a plan invalidates existing sessions and encrypted values. Store the key in your secrets manager, and when rotating, set PREVIOUS_SECRET_KEY to the old value so existing data can be re-encrypted, then remove it once the migration is complete. Record the rotation date and owner, and test the procedure in staging before production.

Configuration docs

How a login travels from the browser to Superset roles

The login starts in the user's browser, which is sent to the identity provider or, for LDAP, to the directory the Superset web node queries. The identity provider authenticates the user and returns a token or group claims across the trust boundary, and Superset validates them on its web nodes. Superset then applies AUTH_ROLES_MAPPING to translate group names into local roles and writes the user and role records to the metadata database. Check that group names match exactly, that roles are re-evaluated on each login, and that the mapped roles grant only what the access model intends.

Login path from browser through identity provider to Superset role assignment.

How to test that Superset SSO works and fails safely

Test SSO before go-live by proving four things: each mapped group lands in the expected role, unmapped users get no more than a minimal role, a removed group membership stops granting access at the next login, and a failed identity provider does not leave the platform open. Start by recording the expected role set for every test user before any login is attempted. Write down the identity provider group, the AUTH_ROLES_MAPPING entry it should match, and the Superset roles the user should hold afterward. Then log in as each test user and compare the actual roles against that record. Repeat the check for an account in no mapped group, which should receive the lowest role you have defined or no access at all, depending on your configuration. Confirm the default role for first-time OAuth or LDAP users in your own configuration, because it is the setting most often left at a permissive value.

Next, test the changes that happen after login. Remove a test user from a mapped group in the identity provider, then log in again and confirm the Superset role set has shrunk to match. Be aware that roles are typically reassigned at login, so an existing session may keep old access until it expires; confirm the session lifetime in your environment and test it rather than assuming. Test the failure paths deliberately. Enter an expired or incorrect client secret in a non-production copy and confirm login fails closed with a clear error instead of creating an account. Stop the identity provider or block its network path and confirm what happens to existing sessions and new logins. Verify whether a local break-glass administrator account exists, can authenticate while the identity provider is down, and is limited to a named small group of people who can use it, with its use logged.

If you use remote user headers, treat header spoofing as a core test case. Send requests directly to the Superset web tier, bypassing the reverse proxy, with a forged remote user header, and confirm they are rejected. Confirm that only the proxy can reach the application port and that the proxy strips any client-supplied copy of the header before adding its own. Keep the results in a dated test report with each test user, expected roles, actual roles and pass or fail, and rerun the full set after any change to the identity provider, proxy or Superset configuration. Recheck these tests after each upgrade, since authentication code and configuration keys can change between versions, as described in the Superset configuration documentation.

What to monitor, back up and document after SSO goes live

This table lists the signals, recurring checks and records a team needs once Superset login runs through an identity provider. Read each row as a control to set up before go-live, with the owner and evidence an assessor would ask to see. The main takeaway is that SSO failures often surface as access problems weeks after a change, so expiry dates, group mappings and upgrade retests need named owners.

AreaWhat to doEvidence to keepWhere it usually fails
Failed logins and callback errorsAlert on spikes in failed sign-ins and OAuth or OIDC callback errors in Superset and proxy logs, and trace each to the identity provider or redirect URI settingAlert rules, log retention settings and a record of each triaged spikeErrors are logged in several places, so teams watch only the identity provider and miss Superset-side failures
Client secret and certificate expiryRecord the expiry date of each OAuth client secret, LDAP bind credential and TLS certificate, and set reminders well before expiryExpiry register with owner, renewal date and the config location of each secretA rotated secret is updated in the identity provider but not in the Superset configuration, so sign-in stops at the next renewal
Group mapping changesStore AUTH_ROLES_MAPPING and group definitions in version control and require review for each changeReviewed change history with approver and the identity provider group it referencesGroups are renamed or deleted in the directory, so users keep or lose roles without anyone reviewing the change
Metadata database backupBack up the metadata database that holds users, roles and role assignments on a schedule, and test restoresBackup schedule, restore test record and a dated export of role assignmentsTeams back up dashboards but not the database tables that store role and user state
Retest SSO on each upgradeFollow the staged upgrade process: back up the metadata database, run the upgrade in staging, check UPDATING.md for breaking changes, then repeat the login and role checksStaging test script, results for each login path and the UPDATING.md review notesUpgrades run in production first, and login or role behavior changes are found by users
Runbook: adding a groupConfirm the identity provider group, add the mapping, test with a sample account in staging, then promote the change to productionTicket with the requester, approver, mapping diff and the test account resultMappings are added directly in production with no test account or approval record
Runbook: revoking accessDisable or remove the user at the identity provider, confirm the user cannot sign in, then review and remove any local Superset accounts and direct role assignmentsRevocation ticket, sign-in test result and a dated review of local accountsLocal fallback accounts or cached sessions keep access after the directory account is disabled
Documentation setMaintain a short record of the identity flow, configuration keys, owners, escalation contacts and the list of known local accountsCurrent architecture note, owner list and a review date set by the teamThe record is written at go-live and not updated after the first change

Questions teams ask about Superset SSO and identity integration

How much extra effort does SSO add compared with the rest of a Superset rollout?

SSO is usually a bounded part of the rollout, but it sits on the critical path because nobody can log in without it. The effort depends on whether you use OAuth2 or OIDC, LDAP, or remote user headers, and on how much of your group model has to be translated into Superset roles through AUTH_ROLES_MAPPING. Most of the time goes to the identity provider side: app registration, redirect URIs, group claims and test accounts. The metadata database, cache and data source connections are separate workstreams with their own effort. Ask any partner to split the SSO line item from the rest of the quote so you can see what it covers.

How long does Superset SSO take with our identity provider and directory?

The duration is driven by your identity provider and directory, not by Superset itself. A single OIDC provider with a clean group structure is typically the shortest path, while LDAP with nested groups, several identity sources or an unclear group ownership model takes longer to map. Scheduling depends on how fast your identity team can register the application and approve group design. No duration figure has been established for this work here, so ask any partner to state the assumed IdP type, directory size and number of role mappings in the written scope, and to name what their estimate depends on.

What do we need from the identity provider and security team?

Plan for three inputs before build work starts:

  • An application or client registration in the identity provider, with redirect URIs for your Superset host and the agreed OAuth2 or OIDC flow (Superset supports the code flow for custom OAuth2 servers).
  • A group design that defines which directory groups should map to which Superset roles, who owns each group and who approves changes.
  • Test accounts in each role, plus a named contact who can change group membership during testing.

Security should also confirm how HTTPS is terminated, where the client secret is stored, and how SECRET_KEY is managed, since Superset requires a user-specified SECRET_KEY to start.

Can one internal engineer set up Superset SSO without outside help?

Yes, a capable engineer who knows Flask-based configuration and has admin access to the identity provider can usually do it alone, provided the group design is already agreed. The risk is less in the Superset configuration file than in the decisions around it: which claims to trust, how to map groups without granting admin by accident, and how to test failed logins and revoked users. A fixed-scope engagement can cover those decisions, the configuration, and a written test record your security team can review. Whichever route you pick, confirm who will maintain the mapping after go-live, because group changes will keep arriving.

Does SSO replace the need for a break-glass admin account?

No. SSO should not be your only way into Superset. If the identity provider is down, a group claim is misconfigured or a certificate expires, every user can be locked out at once. Keep a documented local recovery path that is restricted to a small set of named people, stored under your privileged access controls, and tested on a schedule. Confirm with your security team how that account is protected, how its use is logged and alerted, and how it is disabled once the incident is over. The exact recovery procedure depends on how your Superset instance and login backend are configured, so confirm it against your own deployment.

Can a Superset upgrade break login?

Yes, it can, which is why SSO settings belong in your upgrade test plan. Upgrades change the metadata database schema and can change configuration behavior, so the Superset upgrade process calls for a database backup, running superset db upgrade and superset init, and a staging test before production. Check UPDATING.md for breaking changes between your current and target versions. Include login tests in staging: OIDC redirect, group-to-role mapping, a user whose role should be removed and a break-glass login. Recent releases include 6.0.0 and 6.1.0, and 7.0.0 is in release candidate status, so confirm the target version you plan to run.

Which identity option should we choose: OAuth2, LDAP or remote user headers?

Choose based on what your organization already runs and how strictly you need to control access. OAuth2 and OIDC providers such as Google or Azure are the common choice for modern identity stacks, and Superset also supports custom OAuth2 servers using the code flow. LDAP suits organizations whose groups live in a directory, and remote user headers only make sense when a trusted reverse proxy has already authenticated the user and strips spoofed headers. Confirm your choice with your security team, since the header option depends heavily on the proxy setup. Each option needs its own group-mapping design and test plan.

How DeployOpen scopes and hands over Superset SSO work

The sequence below shows how an SSO and identity integration moves from an agreed written scope to a tested staging configuration and a handover your team can operate without us. Each step closes with a named output so you can check progress before the next one starts.

  1. Confirm the identity architecture and auth path

    DeployOpen reviews your identity provider, the protocol it supports (OAuth2 or OIDC, LDAP, or remote user headers from a reverse proxy), and where Superset will sit in your network. We confirm which login path fits your provider and whether users will also need a local fallback account. The output is a short architecture note that names the chosen path and the reasons for it. Confirm with your identity team which protocol and provider version they can support, because that choice drives every later step.

  2. Design the group-to-role mapping

    Together with your IAM and data governance owners, we map identity provider groups to Superset roles through AUTH_ROLES_MAPPING and decide which groups receive administrative, editor, and viewer access. The design also covers how role changes in the identity provider take effect at the next login and who owns each group. The output is a written mapping table that lists every group, its Superset role, and its owner. Ask your team to confirm group names exist in the identity provider before the mapping is frozen.

  3. Agree the test matrix and deliverables in writing

    Before any configuration work starts, DeployOpen and your team agree the written scope, the deliverables, and a test matrix covering login, logout, session expiry, group changes, denied access, and a break-glass admin path. The matrix states which identity provider accounts and browsers are in scope. The output is a signed scope document that serves as the basis for a fixed-scope quote. Ask any partner for this document before work begins, and confirm who approves changes to it.

  4. Configure Superset in a staging environment

    DeployOpen configures the authentication settings in a staging Superset that runs inside your infrastructure, using the same metadata database engine, secret handling, and HTTPS termination planned for production. Secrets are supplied through your own secret store rather than stored in configuration files. The output is a staging instance that logs in through your identity provider with the agreed mapping applied. Confirm that staging mirrors production closely enough that results will carry over.

  5. Run the agreed test matrix and fix findings

    We execute every case in the test matrix, record the observed result for each, and fix any configuration defect found, retesting until each case passes or is formally accepted as a known limitation. Negative tests confirm that users outside the mapped groups cannot reach restricted content and that deprovisioned accounts lose access. The output is a test evidence pack with dated results and a list of accepted limitations signed by your owner. Ask to see the raw results, not only a summary.

  6. Hand over configuration, runbooks, and evidence

    DeployOpen delivers the final configuration files, the group mapping table, operating runbooks for adding a group, rotating identity provider certificates or client secrets, and recovering from a lockout, plus the test evidence pack. Your team walks through the runbooks and performs one supervised change to prove they can operate the setup. The output is a signed handover record. Confirm which of your staff will own the integration after handover.

  7. Agree ongoing support on a retainer

    After handover, your team can run the integration alone or add ongoing support as a retainer, which covers identity provider changes, Superset upgrades that touch authentication, and periodic retesting of the test matrix. DeployOpen does not publish a price list, so the retainer scope and fee follow from a written quote based on the agreed deliverables. The output is a retainer agreement or a documented decision to operate without one. Ask any provider what the retainer covers, how changes are requested, and how quickly they respond in writing.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.