Model and limits#
Temporary access is a personal rule with an expiry, so preview, apply and drift work normally. Group rules (400 policy.ttl_not_allowed) and Deckhouse targets reject TTL. TTL cannot be added or removed later: delete the rule to end early (Give temporary access).
Principal has no approval flow: external bots grant access via POST /grants. Templates can set max_ttl (cap, default 30 days) and default_ttl (suggestion, not auto-applied).
Accounts and native expiry#
Databases and Kubernetes create a separate temporary account (boris.jit.3f2a) so the person’s usual account, password and sessions stay untouched under one-rule-per-target.
| Target | Account | Native lock |
|---|---|---|
PostgreSQL, ClickHouse |
Temporary role |
VALID UNTIL. ClickHouse drift catches manual edits. |
Kubernetes |
Temporary ServiceAccount |
Token matches expiry (10-minute minimum). Deleting ServiceAccount revokes immediately. |
SSH |
Usual rule (no second) |
Certificate expires no later than rule. |
Applications |
Usual rule (no second) |
Sign-in and token refresh refused at expiry. |
MariaDB, MongoDB |
Temporary account |
None: access persists while target is unreachable. |
What happens at the expiry#
At expiry, applies return 409 (“This access has expired”) and no credentials or SSH certificates issue. On managed targets Principal runs Delete: revokes access, ends sessions where allowed, drops the temporary account and logs “Temporary access ended”.
- Offline target: retries automatically (backoff up to 1 hour), shown in Needs attention.
- PostgreSQL ownership: owned objects transfer to the person’s Principal-created usual role (or wait for an admin if none exists).
- Extending: moves expiry within 30 days and
max_ttl. PostgreSQL and ClickHouse applyVALID UNTIL(needs apply permission, skipped with unapplied edits). Issued Kubernetes tokens keep their old end until rotated.