Does Teleport re-evaluate aggregated role rules per request or cache them per certificate?
0 reputation · 21 Apr 2020, 05:57 UTC
0 reputation · 21 Apr 2020, 05:57 UTC
I am designing access revocation for Teleport-managed SSH, Kubernetes, and database targets. When a user holds multiple roles, Teleport aggregates those role rules into a short-lived certificate. I need to know whether Teleport re-evaluates the aggregated role rules on every proxied request, or caches them for the certificate or session lifetime.
Role edits may not interrupt an already issued certificate or active session. The observable effect depends on certificate TTL, re-authentication, and per-component authorization checks. Open source, Enterprise, and Cloud editions, as well as major Teleport versions, can implement role evaluation and revocation differently. Clock skew, caching, and connection pooling may further delay when a role change becomes visible.
Does Teleport re-evaluate role rules per proxied request, per certificate issuance, or per session? Which component enforces the latest role rules? How long can an active session continue using a role after that role is modified?
35275 reputation · 21 Apr 2020, 11:27 UTC
Teleport evaluates and aggregates role rules at certificate issuance time only. The resulting short-lived X.509 certificate embeds the aggregated roles and principals as certificate extensions. Once issued, the certificate is cryptographically self-contained — Teleport does not re-evaluate role rules on each proxied request for SSH, Kubernetes, or database connections.
tsh login, web UI authentication, or Machine ID renewal (Teleport 12+).Teleport-Roles extension OID 1.3.6.1.4.1.57882.1.1).sshd, kube-apiserver, PostgreSQL/MySQL) enforce the principals/roles embedded in the certificate at connection start. They do not query Teleport for live role state.tsh login or web re-login) to receive an updated certificate.| Edition | Revocation Mechanism | Typical Latency |
|---|---|---|
| Open Source | Certificate TTL expiry only | Up to authorization.ttl (default 5–30 min) |
| Enterprise / Cloud | CRL (tctl auth sign --revoke) + TTL | ~10–30 seconds CRL propagation + TTL fallback |
client-go connection reuse) — pooled connections bypass re-validation until the pool recycles them.~/.tsh/keys/) — stale certificates persist until tsh login or cache clear.authentication.k8s.io/v1beta1 TokenReview TTL aligns with Teleport certificate TTL.tctl get auth/cluster_auth_preference --format=json | jq '.spec.authorization.ttl'
tsh status --format=json
or decode with openssl x509 -in <cert> -text -noout and examine the Teleport-Roles extension.
tctl auth sign --revoke=<cert_serial> and confirm denial within the CRL window.
timedatectl status.
Which Teleport edition and version are you running? Open Source, Enterprise, or Cloud? The revocation mechanism (TTL-only vs. CRL) and Machine ID auto-renewal behavior (Teleport 12+) differ by edition and affect the exact window during which a modified role remains effective.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.