Node attestation¶
A node's identity on the kernel control lane is a certificate, and the question attestation answers is who is allowed to receive one. The control plane names the identity, an attestation step decides which workload matches that name, and the certificate issued to it is what the far end compares against.
Identities are declared before they are issued¶
The SPIFFE ID for each end of the lane comes from one function, used by three layers:
node spiffe://xratu/dataplane/<dataplane_node_id>
project runtime spiffe://xratu/workspace/<workspace_uuid>/runtime/<runtime_instance_id>
| Layer | Uses the name to |
|---|---|
| Control plane | Write runtime_trust.expected_peer_identity and runtime_trust.runtime_workload_identity when a runtime is deployed |
| Data plane | Derive the registration entries that tell the identity provider which workload gets which name |
| Kernel | Compare the verified peer certificate against the name it was provisioned with |
A second definition produces a workload whose certificate names one identity
and whose runtime contract expects another, which the kernel reports as
peer_identity_rejected.
Two attestation steps¶
Attestation happens twice on the path from a pod to a certificate, and the two steps answer different questions.
flowchart TB
N["Node joins the cluster"] -->|"node attestation<br/>k8s_psat"| A["SPIRE agent<br/>gets a node identity"]
A -->|"workload attestation<br/>k8s selectors"| W["xratud / project runtime<br/>gets its SVID"]
W --> T["mTLS on the control lane<br/>peer certificate carries the SPIFFE ID"]
Node attestation proves which node an agent runs on. The agent presents a projected Kubernetes service account token, and the server admits it only from the service account the trust domain allows:
NodeAttestor "k8s_psat" {
plugin_data {
clusters = {
"xratu" = {
service_account_allow_list = ["spire-system:spire-agent"]
}
}
}
}
The allow list admits one service account, so node identities are issued to the agent alone.
Workload attestation proves which workload on that node is asking. The agent inspects the calling process against the Kubernetes API and matches it to a registration entry by selector. Each node gets one entry:
{
"spiffe_id": "spiffe://xratu/dataplane/xratu-dataplane-0",
"parent_id": "spiffe://xratu/spire/agent/k8s/xratu-dataplane-0",
"selectors": [
"k8s:ns:xratu-dataplane",
"k8s:sa:xratud",
"k8s:pod-name:xratu-dataplane-0"
],
"x509_svid_ttl": 3600
}
All three selectors must match. The pod name pins the entry to one StatefulSet member.
Why project runtimes get their own service account¶
Runtime pods are attested by the same selector mechanism, so each project runtime is rendered with a distinct service account. The agent tells workloads apart by selector alone, so a distinct service account gives each runtime a selector set that matches only it.
The runtime pod carries its expected name as an annotation, and the registration entries for runtimes are derived from the rendered manifests rather than recomputed:
| Entry field | Read from |
|---|---|
| SPIFFE ID | The xratu.io/spiffe-id annotation on the rendered pod |
| Namespace | The rendered Deployment metadata |
| Service account | The rendered pod spec |
| DNS SANs | The rendered Service |
Derivation from the manifest keeps the certificate and the deployed object in agreement.
What the kernel does with the result¶
The kernel derives caller identity from the verified peer certificate, taking URI SAN first, then DNS SAN, then Common Name, and compares it against the provisioned value.
Admission runs in a fixed order once the TLS identity is proven:
| Checked | Rejects when |
|---|---|
| Protocol version | The caller speaks a version this kernel does not admit |
| Ownership lease | The caller does not hold the lease for this runtime |
| Fence epoch | The caller's epoch is behind a newer owner's |
| Expected caller identity | The peer certificate is not an accepted peer identity |
| Trust bundle digest and revision | The caller presents a bundle outside the accepted set |
| Startup and readiness state | The runtime has not reached a state that admits commands |
| Command allowlist | The operation is not a runtime.* operator command |
The lane carries runtime.* operator commands. Execution syscalls are
kernel-native and reach the kernel through its own syscall surface.
Enrollment is a separate proof¶
Node attestation and enrollment are different gates, and both happen as a node comes up.
| Proves | Issued by | Held at | |
|---|---|---|---|
| Enrollment | This node was invited into this pool of this organization | Control plane, against an invitation | /var/lib/xratu/identity/xratud.bootstrap.json |
| Attestation | This process is the workload that identity names | SPIRE, against a registration entry | The Workload API stream, never on disk |
Enrollment establishes that the control plane should talk to the node at all. Attestation establishes what certificate the node presents when it talks to a kernel. A node can be enrolled and still fail to obtain an SVID, which is an identity-lane failure rather than an enrollment one. See Invitations and enrollment for the first, and The SPIRE agent for the second.
What the environment still owns¶
The repository renders the substrate, derives registration intent, and implements both ends of the lane. Two things belong to whoever operates the identity provider:
- Node attestation policy. Which clusters and which service accounts may attest, beyond the allow list the rendered manifest ships with.
- Trust domain bootstrap and bundle distribution. Establishing the trust domain's root of trust in the first place.
The privileged reconciler that applies runtime registration entries must consume the derived intent. Recomputing identities independently produces a certificate naming a workload the runtime contract does not expect.