# nirmalagra/superset-saml-sso-integration architecture

> Architecture diagram of the GitHub repository nirmalagra/superset-saml-sso-integration, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nirmalagra/superset-saml-sso-integration
- Repository: https://github.com/nirmalagra/superset-saml-sso-integration

## Overview

This repository adds SAML single sign-on to Apache Superset. A user enters through the custom authentication view, which redirects to the SAML login route; the login manager handles SAML responses, finds or registers the Superset user, assigns roles, and establishes a session. Logout clears the session and initiates SAML logout. Configuration selects the custom security manager. The README documents compatibility with Azure ADFS and other SAML providers; details of settings.json and the omitted SAML initialization are not shown in the excerpts.

Main entry points: [`app/auth_saml.py`](https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/auth_saml.py) (SAML Login Manager), [`app/superset_config.py`](https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/superset_config.py) (Superset Configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Superset Configuration"]
  node_superset_config["Superset Configuration<br/>[superset_config.py]"]
end

subgraph group_saml["SAML Authentication"]
  node_auth_view["Auth View<br/>[auth_saml.py]"]
  node_login_manager["SAML Login Manager<br/>[auth_saml.py]"]
end

subgraph group_identity["User Identity"]
  node_security_manager["Custom Security Manager<br/>[auth_saml.py]"]
  node_user_store[("Superset User Store")]
end

node_user(("User"))
node_saml_provider["SAML Provider"]

node_user -->|"requests login"| node_auth_view
node_auth_view -->|"redirects to route"| node_login_manager
node_login_manager -.->|"starts SAML login"| node_saml_provider
node_saml_provider -.->|"returns SAML response"| node_login_manager
node_login_manager -->|"queries and updates"| node_user_store
node_login_manager -->|"registers users and roles"| node_security_manager
node_login_manager -->|"establishes session"| node_user
node_superset_config -->|"selects manager"| node_security_manager

click node_auth_view "https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/auth_saml.py"
click node_login_manager "https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/auth_saml.py"
click node_security_manager "https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/auth_saml.py"
click node_superset_config "https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/superset_config.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_superset_config,node_user toneBlue
class node_auth_view,node_login_manager toneAmber
class node_security_manager,node_user_store toneMint
class node_saml_provider toneIndigo
```

## Components

### Superset Configuration

- [Superset Configuration](https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/superset_config.py): `app/superset_config.py`

### SAML Authentication

- [Auth View](https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/auth_saml.py): `app/auth_saml.py`
- [SAML Login Manager](https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/auth_saml.py): `app/auth_saml.py`

### User Identity

- [Custom Security Manager](https://github.com/nirmalagra/superset-saml-sso-integration/blob/main/app/auth_saml.py): `app/auth_saml.py`
- **Superset User Store**

### Other components

- **User**
- **SAML Provider**

## Connections

- User → Auth View: requests login (evidence: `app/auth_saml.py`)
- Auth View → SAML Login Manager: redirects to route (evidence: `app/auth_saml.py`)
- SAML Login Manager → SAML Provider: starts SAML login (evidence: `README.md`)
- SAML Provider → SAML Login Manager: returns SAML response (evidence: `README.md`)
- SAML Login Manager → Superset User Store: queries and updates (evidence: `app/auth_saml.py`)
- SAML Login Manager → Custom Security Manager: registers users and roles (evidence: `app/auth_saml.py`)
- SAML Login Manager → User: establishes session (evidence: `app/auth_saml.py`)
- Superset Configuration → Custom Security Manager: selects manager (evidence: `app/superset_config.py`)
