Docs
Live demo

Targets

A target is one managed system: database server, Kubernetes cluster or SSH host. Service-account rights, Managed vs. Observe mode, ownership boundaries and Kubernetes behavior.

On this page

Target service accounts#

Principal connects with its own target account (secrets stay in OpenBao, never Principal’s database). Setup commands: Prepare a target. Private targets connect through a shared SSH tunnel using a Principal-generated key.

Engine Account needs
PostgreSQL
CREATEROLE, object ownership via inherited role or WITH GRANT OPTION, pg_signal_backend to end sessions.
MySQL / MariaDB
Server-wide SELECT on mysql.*, CREATE USER, GRANT OPTION, SHOW DATABASES, PROCESS, CONNECTION ADMIN (SUPER before 10.5.2), plus target privileges WITH GRANT OPTION.
ClickHouse
Access management and rule privileges WITH GRANT OPTION on every replica, plus CLUSTER and REMOTE on clusters.
MongoDB
userAdminAnyDatabase and readAnyDatabase in admin.
Kubernetes
Kubeconfig bound to cluster-admin.
SSH host
Passwordless sudo or root with organization SSH key. Host key pinned on creation.

PostgreSQL, MariaDB and MongoDB verify rights before apply (MariaDB enforces the uniform server-wide list on every target). Kubernetes checks namespace and ClusterRole reads only, so missing RBAC surfaces at apply (group-token rules check on creation).

Managed and observe-only#

Swipe the screenshot sideways to see all of it, or tap it to open it full size.

Resources lists targets first, then SSH tunnels and SSH keys.
  1. View and filters: Engine, Status, Mode, Connection (direct or through an SSH tunnel).
  2. Search by name or host.
  3. Status: Healthy, Offline, or a warning from the last check.
  4. Mode: Managed targets get changes from Principal. Observe targets are read only.
  5. Last discovery: when Principal last read the accounts and objects of the target.
Mode Behavior
Managed
Reads target, plans and applies rules, fixes drift, allows adoption.
Observe only
Read-only: rules can only be deleted. No adoption, drift fixes or rotation. Manage it asks confirmation first.

Start production targets in Observe to review discovery, then switch to Managed to adopt (Bring a database under management).

What Observe leaves on the target#

Deleting a rule, temporary expiry, removing a person, Unadopt, deleting a connector (Delete the users too), deleting the target or retrying failed deletion removes state only in Principal. Accounts keep target access, and Principal logs and notifies Access left on a target in Observe (Activity → Security). Issued credentials, Dex sign-in and SSO gates keep working.

On observe-only Kubernetes clusters: SSO gates and Ingress annotations stay unchanged, revoked app sessions last up to 7 days, removed groups keep cluster sign-in, and Protect new Ingresses turns off before Observe. SSO-gated apps block deleting the client, app or cluster until you click Manage it (Dex-only apps delete normally).

What Principal changes on a target#

Scope Principal changes
Created accounts
Lifecycle and permissions.
Adopted accounts
Permissions only, never the account.
Kubernetes RBAC
Objects labeled principal.io/managed=true for this target. Unlabeled bindings stay outside drift, except Principal-managed adopted accounts whose overlapping unapplied bindings are cleaned on apply.

Kubernetes extras#

Feature Behavior
Principal sign-in
Default kubeconfigs use Dex with Principal groups. Otherwise short-lived ServiceAccount tokens (Credentials).
Web apps
Discovered Ingresses use SSO gate or a Dex OAuth client.
Protect new Ingresses
Closes new Ingresses at creation. Fails open after 5 seconds if unreachable (closed next discovery, up to 1 hour) so deploys proceed.
Orphaned apps
Missing Ingresses mark Ingress not found, keeping rules and Dex clients until deleted.
One cluster, one target
Identified by kube-system: duplicates refused across all organizations.

Manage#

Resources · Target details · Add a target · Targets API · SSH tunnels API · SSH keys API

↑ ↓ to moveEnter to openEsc to close