Docs
Live demo

What is Principal

Principal is a self-hosted platform that manages access to databases, Kubernetes clusters and SSH hosts. You declare who gets which permissions. Principal creates native accounts and grants in each system, checks them for drift and records every change.

On this page

The problem#

Most teams hand out infrastructure access by hand. A DBA runs a few GRANT statements, an SRE adds a Kubernetes RoleBinding, someone sends the password over chat. Six months later nobody can say who still has write access to production. Disabling a person in SSO stops their sign-in to email, and their database roles and SSH accounts stay until someone finds them server by server.

What Principal does#

Take one rule: the acme/analytics group from GitLab gets the warehouse-read-only template on the warehouse PostgreSQL server.

  1. Grant. Anna joins the group in GitLab. The next sync adds her in Principal, and the rule creates a login role anna_lee with a generated password and runs GRANT CONNECT, GRANT USAGE and GRANT SELECT.
  2. Connect. Anna reveals the password on Your access and connects with psql straight to the server.
  3. Check. A DBA later runs GRANT INSERT for anna_lee by hand. The next drift check lists it under Out of sync. A drift check never revokes by itself: a person applies the rule or records the difference as expected.
  4. Revoke. Anna leaves the group. The next sync revokes the grants and drops the role, unless another rule still needs it.

The same loop covers MariaDB, ClickHouse, MongoDB, Kubernetes RBAC and SSH hosts, see Supported systems. A rule names a person, a group or a service account, and a rule for one person can be temporary. Every change goes to the audit log.

What it touches, and what it leaves alone#

  • Principal changes only the accounts it created, the accounts an administrator adopted, and Kubernetes RBAC objects with the principal.io/managed=true label. It lists every other account and never alters it.
  • A target can start in observe-only mode: Principal reads its accounts and writes nothing.
  • Every apply starts from a plan with the exact operations and their risk.

If Principal is down#

Principal runs beside your systems, not in front of them. A database client connects straight to the server with the role and password Principal created, so it keeps working and no query is dropped.

SSH certificates, kubectl tokens of a cluster that signs people in through Principal, and sessions of web applications behind the SSO gate last as long as what was already issued. New sign-ins, the console and the API, applies, revocations and drift checks wait until Principal returns.

What it needs to run#

A Kubernetes cluster, version 1.29 or newer, and a PostgreSQL server, version 15 or newer. One Helm chart installs Principal with OpenBao for secrets and Dex for sign-in. See Deployment and Prepare a target.

What Principal is not#

  • Not your directory. People and groups come from GitLab, GitHub, Google Workspace or LDAP, and Principal reads them without writing back.
  • Not a secrets vault. OpenBao inside Principal holds only target connections, connector tokens and the passwords Principal generates.
  • Not an access proxy. Database, SSH and kubectl traffic does not pass through Principal, so their queries and commands stay in the logs of each target.

Next steps#

↑ ↓ to moveEnter to openEsc to close