Skip to content

Credential rotation

Four credentials on this lane rotate, on four different clocks. Three rotate without operator involvement.

Credential Lifetime Rotated by Operator action
X.509-SVID 3600s The node's SPIRE agent, pushed over the Workload API None
Signing CA 24h The SPIRE server None
Platform trust bundle Governance change Control plane bootstrap Re-reconcile after a governance change
Node runtime credential 900s on renewal The control plane, on request xratu dataplane rotate

SVID rotation is pushed by the agent

The workload opens FetchX509SVID once and keeps it open. The agent sends a replacement before the current certificate expires, and the workload adopts what arrives.

sequenceDiagram
    participant A as SPIRE agent
    participant W as Workload API stream
    participant K as Kernel
    participant L as TLS listener
    K->>W: FetchX509SVID (server-streaming)
    A-->>W: SVID + trust bundle
    W-->>K: publish to the identity watch
    K->>L: new configuration in force
    Note over A,K: minutes pass
    A-->>W: replacement SVID
    W-->>K: publish, consumers woken
    K->>L: next connection uses the new certificate

The agent decides when to re-issue; the kernel adopts what it receives.

The agent also re-sends the full response for reasons other than issuing a new certificate, a trust bundle update among them. Material identical to the current SVID is dropped rather than published, so consumers are woken only by a change.

The listener stays up across a rotation

The kernel owns its own TLS accept loop rather than handing a fixed identity to the gRPC server at build time. A new certificate therefore takes effect without rebinding the listener.

Property Behaviour
When the swap applies Per connection: each accepted socket reads whatever configuration is current at that moment
Established connections Keep the configuration they negotiated with
Handshakes Run on their own tasks, so one slow or hostile peer cannot stall pending connections
Backpressure Accepting pauses at 128 queued completed handshakes rather than accumulating sockets

Established connections continue under the configuration they negotiated with.

When the Workload API stream breaks

The stream is long-lived. A SPIRE agent restart or upgrade ends it.

Reconnection is attempted indefinitely, at a bounded rate:

attempt 1     100ms
attempt 2     200ms
attempt 3     400ms
...
ceiling        30s

The Workload API is the runtime's only source of identity, so reconnection stops when nothing is consuming it, which is lane shutdown.

While the stream is broken the runtime keeps serving the certificate it holds and receives no replacements. The lane continues to work until that certificate expires. The 30-second ceiling is inside the 3600s SVID lifetime, so an agent that returns is found before expiry.

Observed Means Action
Lane healthy, agent pod restarting Stream broke, reconnect in backoff None; confirm the agent returns
Lane healthy, agent unavailable for minutes Serving a certificate that will not be replaced Restore the agent before the hour is out
Handshake failures after an agent outage longer than the SVID lifetime The certificate expired with no replacement Restore the agent; the workload re-obtains an identity when the stream reopens

Trust bundle rotation

The platform trust bundle rotates on governance change, not on a timer. Every runtime contract names one digest, and nodes pick up a new bundle asynchronously:

bundle rotates
  → node presents the new digest
  → runtime contract still names the old one
  → rejection, on every runtime, at once

accepted_trust_bundle_digests prevents this. The runtime accepts its provisioned digest plus any digest the ownership-refresh path has added, so both are admitted while the two ends disagree. See Trust bundles and revisions.

Signer rotation has an explicit window in the record:

rotation:
  rotation_id: rot-2026-03
  grace_start: 2026-03-01T00:00:00Z
  grace_end: 2026-03-08T00:00:00Z
  revocation_cutover: 2026-03-08T00:00:00Z
  overlap_signer_ids: ["cp-bootstrap-signer", "cp-bootstrap-signer-2"]

grace_start and grace_end are set together or the record is refused with TRUST_BUNDLE_ROTATION_WINDOW_INVALID. A compromised signer remains accepted until revocation_cutover passes, after which resolving the active bundle fails with TRUST_BUNDLE_SIGNER_REVOKED.

Rotating a node's runtime credential

This rotation renews a platform credential, not a workload certificate:

xratu dataplane rotate

The node's seed at /var/lib/xratu/identity/xratud.bootstrap.json identifies which registration is renewing, a new runtime credential is issued with a 900-second TTL, and the operation is recorded under reason code RUNTIME_IDENTITY_ROTATE.

Verify it against the registration rather than the command's exit status:

xratu dataplane status

Rotation replaces the runtime credential alone. The node keeps its workload identity, its trust bundle and its enrollment.

Symptoms with a different cause

Symptom Cause Fix
A workload holds no SVID Attestation failure: the registration entry does not match its selectors, or the agent cannot attest to the server See Node attestation
The kernel rejects a caller holding a valid certificate Both ends hold valid certificates naming different workloads Correct what the control plane provisioned
A node is compromised Rotation issues a new credential to the same identity xratu dataplane revoke, then remove its registration entry from SPIRE. See Provisioned versus held