The Simplest Way to Make Longhorn and SAML Work Like They Should
Integrating longhorn and saml links your Kubernetes block storage UI to your central identity provider. This setup lets engineers manage persistent volumes using their daily company login credentials. Longhorn runs inside Kubernetes and provides distributed block storage for stateful containers. It includes a web dashboard for creating snapshots, restoring backups, and watching disk health. Out of the box, this dashboard does not check user identities on its own. Pairing it with SAML adds a cen
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Integrating longhorn and saml links your Kubernetes block storage UI to your central identity provider. This setup lets engineers manage persistent volumes using their daily company login credentials.
Longhorn runs inside Kubernetes and provides distributed block storage for stateful containers. It includes a web dashboard for creating snapshots, restoring backups, and watching disk health. Out of the box, this dashboard does not check user identities on its own. Pairing it with SAML adds a central login check before anyone views or changes storage.
How longhorn and saml handle login and permissions
Longhorn relies on external Kubernetes ingress controllers or cluster management tools to handle SAML logins. When an engineer opens the storage dashboard, the ingress layer redirects them to the identity provider. The identity provider checks the user and sends back a signed SAML assertion. That assertion contains the user email and group memberships.
Once the login check passes, the ingress controller forwards the request to the Longhorn UI service. If you manage the cluster through Rancher, Rancher handles the SAML assertion and maps cluster roles. Users with admin roles can create volumes, delete snapshots, and change replica counts. Users with read-only roles can view volume health and node disk usage without changing settings.
Data flows between the user browser, the ingress controller, and the storage manager pods. The SAML exchange happens at the edge before traffic reaches the internal storage service. Inside the cluster, Longhorn uses Kubernetes service accounts to talk to the API server.
Common failure modes and how to scope roles
Many teams expose the Longhorn dashboard using a single shared basic auth password. When five engineers share one password, audit logs cannot show who deleted a production volume. If one person leaves the team, you must rotate that password for everyone.
Broad group mappings cause another common failure in SAML setups. Teams often map a general engineering group straight to full cluster admin permissions. That gives every developer the power to wipe out persistent storage volumes by mistake. Unlogged changes in the storage UI also make incident recovery much harder.
To fix this, scope your SAML group attributes to narrow Kubernetes RBAC roles. Give most developers read-only roles so they can check volume status during an outage. Limit volume deletion and backup target changes to a small platform engineering group. You should also keep the storage UI on a private network path.
SAML 2.0 + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Protecting storage operations and sensitive volume data
Securing the web dashboard is only half of the storage security puzzle. Engineers also interact with persistent volumes through kubectl commands and database clients. Even if the dashboard checks SAML assertions, direct cluster connections might bypass those checks.
Platform teams must align web dashboard roles with command-line cluster permissions. Every volume mount, snapshot restore, and database query should tie back to one verified user. In environments with sensitive customer data, storage volumes hold emails, phone numbers, and card numbers. Controlling who can mount or inspect those volumes prevents data leaks across namespaces.
Review your identity provider group assignments every quarter to remove stale accounts. Keep SAML assertion lifetimes short so revoking a user stops their active storage sessions fast. Test your read-only role mappings in a staging cluster before rolling them out to production.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Does Longhorn support SAML logins on its own?
No, Longhorn does not have a built-in SAML client inside its core dashboard. You must place an ingress controller with an auth helper or Rancher in front of it.
How do we restrict who can delete Longhorn volumes?
Map your SAML groups to specific Kubernetes RBAC roles inside your cluster manager. Assign the read-only storage role to developers and keep admin roles for platform leads.
What happens to running volumes if the SAML provider goes down?
Running pods and attached storage volumes keep working with zero downtime during an identity outage. Only new user logins to the web management dashboard will fail until service returns.
Short role checks help teams work fast. Simple rules make each review clear. Good logs keep every team safe. Scoped keys stop bad changes early.
Teams test new role rules in staging first. Clear owner lists speed up each audit. Small role scopes cut down on risk. Regular log checks catch drift right away.
Related guides
In this post