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.
- Grant. Anna joins the group in GitLab. The next sync adds her in Principal, and the rule creates a login role
anna_leewith a generated password and runsGRANT CONNECT,GRANT USAGEandGRANT SELECT. - Connect. Anna reveals the password on Your access and connects with
psqlstraight to the server. - Check. A DBA later runs
GRANT INSERTforanna_leeby 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. - 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=truelabel. 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
kubectltraffic does not pass through Principal, so their queries and commands stay in the logs of each target.
Next steps#
- How Principal works: the loop in detail.
- Quick start: the first identity provider, a test database and a rule.