Introducing a new way to review your PRs.

Read the announcement

getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.

View on GitHub

20 documents · Updated Nov 11, 2026

docs / authentication-providers

Authentication providers

Redash accepts several forms of identity and turns each successful login into a user session for one organization. Local accounts use Redash passwords. External providers use a trusted identity from Google, LDAP, SAML, OpenID Connect, a JWT, or a front-end proxy. The parent page, Identity, access, and tenancy, explains what Redash does with that identity after login. The backend HTTP API describes request access, while configuration and organizations describes the settings that define provider and organization behavior.

Authentication model

Shared user identity

Every provider resolves a person to an email address within the current organization. Redash reuses an existing user when that email matches. It can create a new user for an accepted external identity and place that user in the organization’s default group. A disabled user cannot complete this path. redash/…/__init__.py• L273-300.

References: redash/…/__init__.py• L273-300 redash/…/users.py• L77-117

Interactive login

The login page presents only the providers that the deployment and current organization allow. A local password form is controlled per organization. Google, OpenID Connect, LDAP, and remote-user entry points use deployment settings. SAML and JWT use organization settings. Invitation, password reset, and email verification pages reuse the same provider choices. redash/…/authentication.py• L31-117, redash/…/authentication.py• L189-236.

The normal result is a session that sends the user to a safe in-application path. Redash rejects unsafe external redirects before it returns the user to the requested page. redash/…/__init__.py• L303-374.

References: redash/…/authentication.py• L31-117 redash/…/authentication.py• L189-236 redash/…/__init__.py• L217-238 redash/…/__init__.py• L303-374

Request authentication

Requests can also identify a user without the login page. The request loader first handles the configured API credential mode. When JWT login is enabled and no API identity was found, it checks the configured JWT source. A normal session remains the main identity for browser use. redash/…/__init__.py• L45-76.

The request path is separate from provider buttons. It supports API access and lets an external identity system establish a browser session through a cookie or header. redash/…/__init__.py• L154-200.

References: redash/…/__init__.py• L45-76 redash/…/__init__.py• L154-200

Provider types

Local account authentication

Local account authentication checks an email and password against a user in the current organization. It supports password reset, invitation acceptance, and email verification. The organization setting auth_password_login_enabled controls the password form and reset flow. redash/…/authentication.py• L145-165, redash/…/authentication.py• L176-205, redash/…/account.py• L14-41.

This provider is the fallback for organizations that manage accounts inside Redash. It does not create a user from an unknown login because the email must already match a local account.

References: redash/…/authentication.py• L145-165 redash/…/authentication.py• L192-205 redash/…/account.py• L14-41

JWT authentication

JWT authentication accepts a signed JSON Web Token from an HTTP header or cookie. Redash validates the token with the configured algorithms, issuer, audience, and public key source. The token must contain an email claim. That email selects or creates the user in the current organization. redash/…/__init__.py• L165-200, redash/…/jwt_auth.py• L38-82.

JWT is a request-level provider rather than a login-page redirect. An invalid token is rejected. A token without an email claim cannot identify a Redash user. redash/…/__init__.py• L177-193.

References: redash/…/__init__.py• L165-200 redash/…/jwt_auth.py• L38-82 redash/…/organization.py• L38-44

Google OAuth authentication

Google OAuth sends the user to Google and then checks the returned profile. A public organization accepts any Google email. A private organization accepts an email from its allowed Google domains or an email that already belongs to the organization. redash/…/google_oauth.py• L16-29.

After profile checks pass, Redash uses the Google name, email, and profile image to find or create the organization user. In multi-organization mode, the selected organization travels through the OAuth round trip so the callback applies the result to the right tenant. redash/…/google_oauth.py• L82-145.

References: redash/…/google_oauth.py• L16-29 redash/…/google_oauth.py• L67-145 redash/…/organizations.py• L38-48

OpenID Connect authentication

OpenID Connect authentication sends the user to a configured identity provider and uses its discovery metadata and returned identity token to establish the Redash user. Redash requires the openid, email, and profile scopes. It can use the provider’s user-information endpoint when the token does not include an email. redash/…/oidc.py• L20-27, redash/…/oidc.py• L46-66, redash/…/oidc.py• L74-108.

The deployment enables OpenID Connect when its client and issuer settings are present. A private organization accepts only configured OIDC email domains or users already in that organization. The callback also requires an email and rejects an explicitly unverified email. An accepted identity uses the shared user creation and session path. redash/…/oidc.py• L30-43, redash/…/oidc.py• L110-172, redash/…/__init__.py• L150-155.

References: redash/…/oidc.py• L20-27 redash/…/oidc.py• L30-43 redash/…/oidc.py• L74-108 redash/…/oidc.py• L110-172 redash/…/__init__.py• L150-155 redash/…/organizations.py• L17-52

LDAP authentication

LDAP authentication checks submitted credentials against a directory. It searches for the user and reads the configured display-name and email fields. A successful directory identity is then matched to or created as a user in the current organization. redash/…/ldap_auth.py• L32-69, redash/…/ldap_auth.py• L72-100.

LDAP is enabled for the deployment. The organization password setting determines whether local password login remains available beside LDAP. redash/…/__init__.py• L187-199.

References: redash/…/ldap_auth.py• L32-69 redash/…/ldap_auth.py• L72-100 redash/…/__init__.py• L181-199

SAML authentication

SAML authentication connects Redash to an identity provider. The identity provider returns an assertion with the user email and name. Redash uses those values for just-in-time user creation and can refresh group assignments from the RedashGroups attribute. redash/…/saml_auth.py• L109-146.

Users can start at Redash or at the identity provider. Redash accepts both entry paths when SAML is enabled for the organization. The organization’s SAML metadata and service-provider settings define the trust relationship. redash/…/saml_auth.py• L24-106, redash/…/saml_auth.py• L149-178.

References: redash/…/saml_auth.py• L24-106 redash/…/saml_auth.py• L109-146 redash/…/saml_auth.py• L149-178 redash/…/organization.py• L14-24

Remote-user authentication

Remote-user authentication trusts a front-end system to place the user email in a configured HTTP header. Redash reads that header, then finds or creates the user in the current organization. The first successful request creates the Redash session. Later requests use that session. redash/…/remote_user_auth.py• L19-51, redash/…/__init__.py• L161-185.

This provider is safe only when a trusted front end strips or replaces the header before forwarding traffic. A direct client must not be able to set the header. redash/…/__init__.py• L167-179.

References: redash/…/remote_user_auth.py• L19-51 redash/…/__init__.py• L161-185

Provider selection

Login-page selection

The login page selects providers from two scopes of control. Deployment settings decide whether Google, OpenID Connect, LDAP, or remote-user support exists. Organization settings decide whether local passwords, SAML, or JWT are active. The provider endpoint checks its own setting again before it accepts a login. redash/…/authentication.py• L31-38, redash/…/authentication.py• L189-236, redash/…/oidc.py• L74-76, redash/…/saml_auth.py• L109-123, redash/…/remote_user_auth.py• L19-27.

The selection flow moves from the organization context to the provider, then to one shared user identity and session.

flowchart LR
    A[Login request] --> B[Resolve organization]
    B --> C[Show enabled providers]
    C --> D{Selected provider}
    D --> E[Local account]
    D --> F[Google OAuth]
    D --> G[OpenID Connect]
    D --> H[LDAP]
    D --> I[SAML]
    D --> J[Remote user]
    E --> K[Find or create permitted user]
    F --> K
    G --> K
    H --> K
    I --> K
    J --> K
    K --> L[Create session]

References: redash/…/authentication.py• L31-38 redash/…/authentication.py• L189-236 redash/…/__init__.py• L241-300 redash/…/oidc.py• L74-172 redash/…/saml_auth.py• L109-153 redash/…/remote_user_auth.py• L19-51

Request-level selection

Request authentication uses a fixed order rather than a user choice. Redash checks the configured API key or HMAC mode first. JWT is the next request provider when its organization setting is enabled and no earlier identity exists. Browser session loading then checks the session user against the current organization. redash/…/__init__.py• L45-76.

This order keeps API credentials from being replaced by a browser session and lets JWT act as an external request identity without changing the interactive login page. tests/test_authentication.py• L163-177, tests/test_authentication.py• L481-531.

References: redash/…/__init__.py• L45-76 redash/…/__init__.py• L109-162 tests/test_authentication.py• L163-177 tests/test_authentication.py• L481-531

Organization resolution

Organization context

Organization resolution chooses the tenant before provider checks run. In multi-organization mode, an organization slug normally comes from the request route. If the route has no slug, the resolver uses the request context or the default slug. The resolved organization becomes the scope for user lookup and user creation. redash/…/org_resolving.py• L9-24.

The provider flow therefore depends on a stable organization context. A valid identity in one organization does not by itself authorize that identity in another organization. redash/…/__init__.py• L45-60, redash/…/organizations.py• L30-36.

References: redash/…/org_resolving.py• L9-24 redash/…/__init__.py• L45-60 redash/…/organizations.py• L30-36

Organization-preserving redirects

Provider redirects must preserve the organization across external round trips. Google and OpenID Connect store the selected organization while the user is at the external provider. SAML builds its callback URL with the organization slug. The login handler also keeps the next path inside the Redash site. redash/…/google_oauth.py• L48-64, redash/…/google_oauth.py• L82-145, redash/…/oidc.py• L69-108, redash/…/oidc.py• L138-172, redash/…/saml_auth.py• L38-56, redash/…/__init__.py• L347-374.

This diagram shows how the request context remains attached while an external provider proves the identity.

sequenceDiagram
    participant U as User
    participant R as Redash
    participant P as External provider
    U->>R: Open organization login
    R->>R: Resolve organization
    R->>P: Start provider flow with return context
    P-->>R: Return identity assertion or profile
    R->>R: Check provider rules for organization
    R->>R: Find or create organization user
    R-->>U: Set session and redirect within organization

References: redash/…/google_oauth.py• L82-145 redash/…/oidc.py• L92-172 redash/…/saml_auth.py• L109-146 redash/…/__init__.py• L347-374

Change checklist

When these files or sections are changed, remember to consider these:

  • Provider enable flags and login-page visibility must stay aligned. A visible link must still reach an enabled provider endpoint.
  • Any change to the user identity claim must preserve the email contract used by local lookup and external user creation.
  • JWT claim or key changes must stay aligned with the system that signs tokens and with the configured header or cookie source.
  • Google domain rules must stay aligned with organization privacy and domain settings.
  • OpenID Connect issuer, discovery, scope, email, and verification rules must stay aligned with the external identity provider.
  • SAML attribute changes must preserve the email, name, and optional RedashGroups assertion contract.
  • Remote-user header changes must be applied to the trusted front end. The front end must remove client-supplied copies of the header.
  • Organization URL changes must update the callback and return paths for Google, OpenID Connect, and SAML.

Important failure modes

TriggerConsequenceGuard
The request has no valid organization slugProvider lookup runs without the intended tenant or redirects to the setup or root pathResolve the organization before login and use a valid organization URL
A local password is submitted while password login is disabledRedash rejects the form and password reset is unavailableKeep the organization password setting and login-page controls aligned
A JWT has an invalid signature or wrong issuer or audienceRedash refuses the request identityUse the configured signing keys and matching token claims
A Google user is outside the allowed domain in a private organizationGoogle login returns to the login page without a sessionConfigure allowed domains or pre-create the user in the organization
An OpenID Connect response fails validation or lacks an emailOpenID Connect login returns to the login page without a sessionKeep issuer discovery, client settings, scopes, claims, and redirect URLs in sync
A remote-user header is missing or supplied by an untrusted clientLogin cannot start, or a client could impersonate another emailRestrict access to the trusted front end and strip the header from client requests
A SAML response cannot be parsed or lacks the expected identity dataSAML login fails and returns to the login pageKeep metadata, certificates, callback URLs, and assertion attributes in sync
The matched user is disabledThe provider logs the request out or does not create a sessionRe-enable the user through organization administration

Key files

FileWhy to read it
redash/…/authentication.pyShows the browser login page, local password flow, provider visibility, and session endpoints.
redash/…/__init__.pyShows shared user loading, request-provider order, session creation, safe redirects, and provider registration.
redash/…/org_resolving.pyShows how each request gets its organization context.
redash/…/account.pyShows the local invitation, reset, and email verification link flow.
redash/…/google_oauth.pyShows Google profile checks and organization-aware OAuth completion.
redash/…/oidc.pyShows OpenID Connect discovery, callback validation, organization checks, and user session creation.
redash/…/jwt_auth.pyShows token key loading and signature and claim validation.
redash/…/ldap_auth.pyShows directory credential checks and identity mapping.
redash/…/saml_auth.pyShows SAML entry paths, assertion handling, and group sync.
redash/…/remote_user_auth.pyShows trusted-header login and its session handoff.
redash/…/organization.pyShows organization-scoped provider defaults and SAML and JWT controls.
redash/…/__init__.pyShows deployment-scoped controls for Google, OpenID Connect, LDAP, and remote-user authentication.
redash/…/organizations.pyShows organization identity and Google and OpenID Connect domain policy.
redash/…/users.pyShows the shared user record and disabled-user behavior.