Skip to content

Trust bundles and revisions

Two different things are called a trust bundle. One is the set of X.509 roots a workload validates certificates against. The other is a signed governance record naming which platform documents and signers are in force.

Platform trust bundle SPIFFE trust bundle
Contract bootstrap.trust.xratu/v1 X.509 roots for the trust domain
Authored by Control plane, at bootstrap The SPIRE server's CA
Identified by bundle_revision and bundle_digest The certificates themselves
Distributed by Control plane records and runtime contracts The Workload API stream
Rotates on Governance change, signer rotation ca_ttl, daily by default

The SPIFFE bundle arrives with the SVID and is covered by The SPIRE agent.

What the record holds

{
  "contract_version": "bootstrap.trust.xratu/v1",
  "metadata": { "name": "default", "description": "" },
  "spec": {
    "documents": [
      { "contract_kind": "controlplane.bootstrap.xratu", "document_hash": "sha256:..." },
      { "contract_kind": "dataplane.bootstrap.xratu",   "document_hash": "sha256:..." },
      { "contract_kind": "bootstrap.root_tenancy.xratu", "document_hash": "sha256:..." }
    ],
    "policy_snapshot_digest": "sha256:...",
    "bundle_revision": "bundle-3f9a1c72be04",
    "bundle_digest": "sha256:...",
    "previous_bundle_revision": "",
    "signer_set_revision": "cp-bootstrap-signer",
    "root_keys": ["signer://cp-bootstrap-signer"],
    "intermediate_keys": [],
    "valid_from": "1970-01-01T00:00:00Z",
    "valid_until": "9999-12-31T23:59:59Z",
    "compromised_signer_ids": [],
    "rotation": {
      "rotation_id": "",
      "grace_start": "",
      "grace_end": "",
      "revocation_cutover": "",
      "overlap_signer_ids": []
    },
    "signer": { "id": "cp-bootstrap-signer", "signature_alg": "none", "signature": "" }
  }
}
Field Meaning
documents The bootstrap documents the bundle attests, each by hash
policy_snapshot_digest The policy snapshot in force when the bundle was authored
bundle_revision The human-readable revision, derived as bundle- plus the first 12 characters of the policy snapshot digest
bundle_digest sha256: over the control-plane, data-plane and root-tenancy document hashes, the policy snapshot digest and the signer id, joined
previous_bundle_revision The revision this one replaced, empty on the first
compromised_signer_ids Signers that must no longer be honoured after the revocation cutover
rotation The window during which two signer sets are both acceptable

The revision is derived from the policy snapshot digest rather than counted, so the same governance state produces the same revision. A revision that did not change means the governance state did not change.

Where the revision is checked

The bundle's revision and digest are projected into three places, and each one fails closed without them.

flowchart TB
  B["Active bootstrap trust bundle<br/>bundle_revision + bundle_digest"]
  B --> R["Control-plane readiness<br/>finalization invariants"]
  B --> D["Node discovery<br/>what a joining node is told"]
  B --> T["runtime_trust<br/>on every deployed runtime"]
  T --> K["Kernel admission<br/>compares the caller's digest"]

Readiness. A finalized control plane refuses to report ready without active trust lifecycle metadata:

curl -fsS "${CP_CLI_ENDPOINT}/v1/system/health/readiness" | jq '.finalization'
{
  "bootstrap_finalized": true,
  "cp_instance_uuid": "cp-9f2c1d...",
  "cp_identity_revision": "1",
  "locked_db_backend": "postgres",
  "locked_store_profile": "durable",
  "policy_revision": "...",
  "policy_source_spec_digest": "sha256:...",
  "active_trust_bundle_revision": "bundle-3f9a1c72be04",
  "active_trust_bundle_digest": "sha256:..."
}

A missing revision or digest returns 503 with finalized control-plane runtime requires active trust lifecycle metadata.

Discovery. A node asking where it stands is told the same pair, and discovery refuses until the tenant's bootstrap authority has one:

TRUST_BUNDLE_UNAVAILABLE   tenant bootstrap authority trust bundle is unavailable

Runtime trust. Every deployed runtime carries the boundary it was provisioned against:

{
  "contract_version": "kernel.runtime_trust.v1",
  "trust_bundle_digest": "sha256:...",
  "trust_bundle_revision": "bundle-3f9a1c72be04",
  "expected_peer_identity": "spiffe://xratu/dataplane/xratu-dataplane-0",
  "runtime_workload_identity": "spiffe://xratu/workspace/<workspace_uuid>/runtime/<runtime_instance_id>",
  "accepted_trust_bundle_digests": [],
  "accepted_peer_identities": []
}

Why the accepted sets exist

Both digest and peer identity are sets rather than single values. Each covers a transition during which two values are legitimately in circulation.

accepted_trust_bundle_digests. Bundles rotate, and a node picks up a new one asynchronously. For a window, a legitimate caller presents a digest the runtime contract has not caught up to. Accepting only the current digest rejects every runtime at once for the length of that window.

accepted_peer_identities. During an ownership handover the displaced owner is retained briefly. Fencing rejects it on ownership grounds as stale_fence. Dropping its identity as well would produce a peer-identity failure instead.

A freshly deployed runtime has both sets empty: it is created against the bundle active at that moment, so its provisioned digest is the only one in circulation for it. The ownership-refresh path widens the set when it re-points the boundary.

Enforcement is switched on by provisioning

expected_peer_identity is optional in the contract. While it is absent the kernel admits callers on certificate validity alone.

expected_peer_identity set    → the kernel compares the peer certificate against it
expected_peer_identity empty  → any certificate the CA signed is admitted

On a platform whose bootstrap authority has not been reconciled, deploy omits the trust document and the runtime starts with the check off. Run xratu bootstrap reconcile before deploying runtimes. See Bootstrap reconcile.

Rotation and revocation

The rotation block is validated as a unit whenever the active bundle is resolved:

Condition Reason code
No active bootstrap trust bundle contract TRUST_BUNDLE_ACTIVE_CONTRACT_MISSING
Active contract present but its revision or required fields are missing TRUST_BUNDLE_ACTIVE_DOCUMENT_MISSING
bundle_digest is not sha256: plus 64 hex characters TRUST_BUNDLE_DIGEST_INVALID
grace_start set without grace_end, or the window is inverted or unparseable TRUST_BUNDLE_ROTATION_WINDOW_INVALID
The active signer is listed in compromised_signer_ids and the cutover has passed TRUST_BUNDLE_SIGNER_REVOKED

grace_start and grace_end are set together or not at all. A window with one end set is refused with TRUST_BUNDLE_ROTATION_WINDOW_INVALID.

A signer listed in compromised_signer_ids stays accepted until revocation_cutover passes, and is refused from that moment. The interval between the two is the window in which the replacement reaches every node.

What this means on day 0

The bundle is created by bootstrap and is a prerequisite for a finalized control plane reporting ready. Readiness failing on trust lifecycle metadata means bootstrap is still outstanding, and completing it is the fix. See Finalization invariants and fail-closed startup.