How Principal works

Written for the platform team that will run it. Declare who gets which permissions on which targets. Principal previews the exact diff, applies native engine roles directly, and verifies hourly that live state still matches.

Want the executive overview? Overview →

1 / 7
  1. One group, one template, two live servers.
  2. Apply executes native SQL roles and grants.
  3. Platform team now holds SELECT on billing-prod.
  4. Every rule starts as a clean who-what-where binding.
  5. Group membership syncs read-only from GitLab.
  6. Templates keep permission sets reusable across targets.
  7. Preview confirms SELECT on public tables before apply.

Three identity types, one control plane

Humans, automated workloads, and AI agents — governed by one rule model and one audit stream.

  • Engineers

    SSO, passkeys, zero-ticket self-service

    Launch SSO-gated apps, reveal rotated DB passwords (every view logged), grab Dex kubeconfigs, and mint 8-hour SSH certs.

    Your access ↗
  • Service accounts

    CI jobs, pods, and backends

    Trade GitLab CI, GitHub Actions, or pod JWTs at Dex (RFC 8693) for short-lived access — zero static secrets in config.

    Token exchange ↗
  • AI agents

    Claude Code, Cursor, built-in MCP

    Scoped prn_agt_ tokens on /api/v2/mcp — capped by the human owner’s permissions and logged under their name.

    MCP for AI agents ↗

Corporate IdP in front. Bundled Dex inside.

Keep your existing identity provider for login. Principal runs Dex inside your cluster to gate internal web apps and Kubernetes with zero external SaaS hop.

Sign-in & token flow
  • Auto-lock new IngressesClosed by default. Every newly created Ingress lands behind SSO automatically, skipping ACME and system routes.
  • Instant session cut-offNo lingering browser cookies. Leaving a group or deleting a rule terminates open web app sessions immediately. Applications ↗
  • Branded login & step-upPasskeys and TOTP built in. Forces fresh verification before password reveals or production applies. Sign-in page ↗
  • Zero-secret CI accessRFC 8693 token exchange. Pipelines swap platform JWTs for short-lived app credentials on the fly. Token exchange ↗

Beside the data path, never inside it

Applications, poolers, and engineers connect straight to databases and hosts. Restarting Principal drops zero live traffic.

Your infrastructure
  • Zero database proxyNative wire speed. Apps, PgBouncer, and IDEs talk directly to targets — zero proxy hop, zero added latency.
  • 100% self-hostedOne Helm chart, ~15 minutes. API, workers, Dex, and OpenBao run entirely inside your VPC. Deployment docs ↗
  • Zero-risk rolloutRead-only Observe first. Inventory existing roles without writing a byte, then adopt accounts with passwords untouched.
  • Native roles + Dex SSORight mechanism per target. Native grants for databases and SSH; bundled Dex SSO for clusters and web apps. Principal vs Teleport →

Eleven safeguards built for production

Everything waiting on a human

Drift findings and halted directory syncs land in one prioritized queue.

One shortcut to any blast radius

Hit Ctrl K to pull a person’s groups, rules, targets, and drift in two keystrokes.

No surprise connection drops

Flags changes that will bounce active database sessions before you click apply.

Grants that self-destruct on time

15-minute to 30-day TTLs via UI or POST /api/v2/grants, plus DB-native expiry.

Silence intentional manual grants

Acknowledge deliberate out-of-band roles so drift alerts stay high-signal.

Evidence straight from live state

90-day PDF, CSV, and JSON packs mapped straight to audit controls.

  • PostgreSQLRoles, memberships, default privileges
    SELECTUSAGECONNECT
  • MariaDBUsers on databases and tables
    SELECTALTEREXECUTE
  • ClickHouseUsers and roles via ON CLUSTER
    SELECTINSERTALTER
  • MongoDBUsers and built-in roles
    readreadWritedbAdmin
  • Kubernetes & AppsRBAC, Dex OIDC, Ingress SSO
    RBACOIDC
  • OpenSSH8h user certs, sudo, bastions
    principalssudo

Real engine roles, zero wrappers

Native SQL grants, MongoDB roles, K8s RBAC, Ingress SSO, and 8-hour SSH certs.

Exact SQL before anything runs

Review every statement and risk score — apply aborts if target state shifted underneath.

Alerts only when action is needed

Route drift, access requests, and sync failures to Slack or email with deep links.

Adopt live accounts with zero downtime

Bring existing app and engineer logins under rules while leaving passwords intact.

Halt cleanly mid-apply

Stop after the current statement — finished steps stay intact, and re-preview shows the rest.

Test it on one database in 15 minutes

Walk through the Helm chart, zero-write Observe mode, and bundled Dex SSO with an engineer.

Talk to an engineer.

Share your stack and we’ll set up a technical walkthrough with an engineer.

* Required fields

Your contact details