Secretless workload identity is only as strong as the evidence used to decide which workload gets which credential, and that decision is called attestation. When a platform issues a short-lived certificate or token to a process without a pre-shared secret, something has to prove that the process runs on a genuine node, in the expected account, cluster, image and namespace. Get that step wrong and short-lived credentials are simply handed to whoever asks first. This guide explains node and workload attestation in depth: the RATS model, cloud instance identity documents, Kubernetes token attestation, TPM-backed proof of residency, confidential computing evidence and how SPIRE combines them. It is written for platform engineers, identity architects and security reviewers designing or auditing workload identity. For SPIFFE IDs, SVIDs and federation basics, read the SPIFFE and SPIRE Guide first: this page goes deeper on the attestation layer only.
Key takeaways
- Attestation replaces the bootstrap secret with verifiable evidence about where and what a workload is, but it moves the trust question to the evidence source, so you must know exactly what each attestor proves.
- Node and workload attestation are two different checks. Node attestation proves the host (instance, VM, cluster node, TPM); workload attestation proves which process on that host is calling, usually from kernel and orchestrator metadata.
- Cloud identity documents prove the instance, not the code. Any process that can reach the metadata endpoint can fetch them, so first-use rules, metadata hardening and selector precision matter.
- Hardware roots of trust raise the bar. TPM DevID proof of residency and confidential computing measurements bind identity to a genuine device or a measured image, at the cost of provisioning and reference value management.
- A compromised node defeats workload attestation. Root on the host can impersonate any workload there, so scope registrations narrowly, keep nodes hardened and treat attestation failures and duplicate attempts as security events.
What attestation is: the RATS model
The IETF Remote ATtestation procedureS (RATS) architecture, RFC 9334 (Informational, January 2023), gives the vocabulary most modern designs use, even where the implementation predates it.
- Attester: the entity producing Evidence about itself, for example a VM, a TPM-equipped server or an enclave.
- Verifier: appraises Evidence against an appraisal policy and produces Attestation Results.
- Relying Party: consumes Attestation Results to make an authorisation decision, for example a SPIRE Server deciding to issue an SVID or a key management service deciding to release a key.
- Endorser and Reference Value Provider: typically the hardware manufacturer (endorsing the TPM or CPU) and the software supplier or your build system (publishing known-good measurements).
RFC 9334 describes two topologies. In the Passport model the Attester obtains an Attestation Result and presents it to Relying Parties; in the Background-Check model the Attester sends Evidence through the Relying Party, which forwards it to a Verifier. It also names three freshness mechanisms: signed timestamps (needs a trustworthy clock), nonces from the appraiser, and epoch identifiers. Freshness is the property most often missing from home-grown schemes: an identity document captured once and replayed later is not attestation.
The IETF WIMSE architecture draft (draft-ietf-wimse-arch-08, a working group Internet-Draft dated 6 July 2026, checked 27 October 2026; drafts change) lists attestation as one of several ways to provision workload credentials, alongside direct provisioning, bootstrap credentials and agent-assisted provisioning, and cites both RFC 9334 and SPIRE as examples. See the WIMSE Workload Identity Architecture Guide.
Node attestation methods compared
Node attestation answers "is this a host I trust, and which one is it?". The table uses SPIRE server NodeAttestor plugins as concrete reference points because their documentation states precisely what each one verifies.
| Method (SPIRE plugin) | Evidence presented | What it proves | Main weakness |
|---|---|---|---|
AWS instance identity document (aws_iid) | Signed EC2 instance identity document from IMDS | Account, region, instance ID, AMI; selectors for IAM role, security groups and tags | Any process on the instance can fetch the document; relies on first-use semantics |
GCP instance identity token (gcp_iit) | RS256 JWT issued by Compute Engine metadata, verified against Google public certificates | Project and instance; plugin requires a projectid_allow_list | Same metadata reachability issue; one project should not serve several trust domains |
Azure IMDS attested document (azure_imds) | PKCS#7 signed document with vmId, subscriptionId, nonce and expiry | Tenant, subscription and VM; no managed identity needed | Metadata reachability; tenants must be explicitly configured |
Azure managed identity token (azure_msi, older) | Signed managed identity token | Tenant and principal ID | Ties node identity to a managed identity that other code on the VM can also use |
Kubernetes projected token (k8s_psat) | Projected service account token validated with the TokenReview API | Cluster, namespace, service account, pod and node UID | Trust rests on the cluster API server and on who can create pods with that service account |
TPM DevID (tpm_devid) | LDevID certificate plus TPM proof of possession and proof of residency | The key lives in a genuine TPM whose endorsement certificate chains to a manufacturer CA | Out-of-band DevID provisioning; some firmware TPMs lack an EK certificate |
X.509 proof of possession (x509pop) | Pre-provisioned certificate and signature challenge | Possession of a private key issued by your PKI | Only as strong as how and where that key is stored |
Join token (join_token) | Pre-shared, one-time-use token | Someone with server access generated it | A bootstrap secret: suitable for labs and edge cases, not as a fleet default |
Cloud instance identity documents in detail
- AWS: the EC2 instance identity document is a JSON document with fields including
accountId,instanceId,imageId,instanceType,region,pendingTimeandprivateIp. AWS states it is generated when the instance is launched, stopped and started, or restarted. The SPIREaws_iidplugin also offers an anti-tampering check that the root volume has not been detached before attestation (disabled only withskip_block_device). - Azure: the attested data endpoint is
/metadata/attested/documenton 169.254.169.254, requires theMetadata: trueheader, and accepts an optional 10-digitnonce. Microsoft's validation steps are to build the certificate chain, check the SAN matches the cloud's IMDS domain (for example*.metadata.azure.com), decode the signed JSON and compare the nonce. Microsoft advises against pinning intermediate certificates. - Google Cloud: each instance can request a JWT describing itself; Google signs it with RS256 and the verifier checks it against Google's public OAuth2 certificates. An instance can only obtain its own token.
The common limit is that these documents are reachable by any process on the instance, and the metadata service itself is unauthenticated. SPIRE's cloud attestors therefore apply Trust On First Use: per the SPIRE documentation, attestation for a given node may occur only once and later attempts are rejected. If other code attests first, the real agent fails to start and both agent and server log it, and the project says such cases should be investigated as possible security incidents. Harden metadata access as well: see the EC2 Instance Metadata Service Hardening Guide and the Cloud Instance Metadata Services Compared Guide.
TPM-backed attestation
The SPIRE tpm_devid attestor issues two challenges: proof of possession of the private key behind the DevID certificate (which must chain to your devid_ca_path), and proof of residency that the key was generated in and resides in a TPM whose endorsement certificate chains to a manufacturer CA in endorsement_ca_path. The resulting agent ID is derived from the certificate fingerprint. The SPIRE TPM deployment walkthrough adds practical constraints: TPM 2.0 is required, the resource manager device /dev/tpmrm0 is preferred over /dev/tpm0 because the raw device allows one client at a time, the agent account needs access (typically through the tss group), and some firmware TPMs ship without an endorsement certificate, in which case this attestor cannot be used. Check that before you buy or roll out.
Proof of residency is not the same as boot integrity. Measured boot (PCR values compared with reference values) and runtime integrity measurement are what tools such as Keylime add: Keylime describes itself as TPM-based remote boot attestation and runtime integrity measurement, with agent, registrar, verifier and tenant components and an agent revocation mechanism when attestation fails. For device identity foundations see the IoT Device Identity with TPM and DICE Guide.
Confidential computing evidence
Trusted execution environments produce hardware-signed evidence about the code loaded into an isolated environment. AWS Nitro Enclaves is a well-documented example: the enclave requests an attestation document from the Nitro Hypervisor containing measurements, with PCR0 (enclave image), PCR1 (kernel and bootstrap), PCR2 (application), PCR3 (IAM role of the parent instance), PCR4 (parent instance ID) and PCR8 (image signing certificate). AWS KMS can consume the document directly for Decrypt, GenerateDataKey and GenerateRandom, so a key is released only to a measured enclave. AWS recommends combining PCR3 and PCR8 for flexibility, and notes that enclaves started in debug mode produce all-zero PCRs that cannot be used for cryptographic attestation. Reference values change with every rebuild, so measurement publication must be part of the build pipeline. See the Confidential Computing Guide and the Confidential AI and GPU Enclaves Guide.
Workload attestation: proving which process is calling
Once a node is trusted, an on-host agent identifies the calling process, usually over a Unix domain socket where the kernel reports the caller's PID, and gathers selectors about it. The server issues an identity only if the selectors match a registration entry.
| Attestor | Typical selectors | Strength | Caveat |
|---|---|---|---|
Kubernetes (k8s) | k8s:ns, k8s:sa, k8s:pod-label, k8s:pod-image, k8s:container-image | Uses cgroup membership to find the pod, then queries the kubelet | Authoritative only against unprivileged workloads; labels are mutable by anyone who can edit the pod spec |
| Kubernetes with Sigstore | k8s:image-signature-subject, k8s:image-signature-issuer, k8s:image-attestations | Binds identity to a verified image signer, not just an image name | Requires signing discipline; maintain skipped_images carefully |
Unix (unix) | unix:uid, unix:user, unix:gid, path and SHA-256 with discover_workload_path | Simple on VMs and bare metal | UID alone is weak; binary hash needs the agent to read /proc/<pid>/exe |
| Container runtimes | Image ID, container labels | Works outside Kubernetes | Same mutability concerns as labels |
- Combine selectors: a registration matching only
k8s:ns:paymentsgrants the identity to every pod in the namespace. Combine namespace, service account and a signed image or image digest. - Verify the kubelet: the SPIRE
k8sattestor verifies the kubelet certificate by default;skip_kubelet_verificationand anonymous kubelet authentication are discouraged in production by the project documentation. - Know the trust ceiling: SPIRE's own security note states that a process with root on the node can change cgroup membership and access the agent's credentials. Workload attestation does not protect against a compromised node, which is why container escape (MITRE ATT&CK T1611 Escape to Host) is a direct identity threat.
- Service account token hygiene: Kubernetes projected tokens expire and the kubelet rotates them, while legacy Secret-based tokens do not expire. Remove legacy tokens before relying on token-based attestation. See the Kubernetes Service Account Token Guide.
Choosing an attestation design
| Situation | Recommended evidence | Why |
|---|---|---|
| Cloud VMs, single provider, standard risk | Provider identity document plus first-use enforcement and IMDS hardening | No provisioning effort, signed by the platform |
| Kubernetes, managed or self-run | Projected service account token for nodes; namespace, service account and image signature selectors for workloads | Uses cluster-native, short-lived evidence |
| On-premises servers, regulated data | TPM DevID plus measured boot appraisal | Binds identity to genuine hardware and known boot state |
| Key release for sensitive data or models | Confidential computing evidence appraised by the key service | Identity tied to a measured image, not just a host |
| Edge, lab or air-gapped bootstrap | One-time join token or x509pop with short validity | Practical where nothing better exists; plan to migrate |
- Small organisations: use the managed workload identity built into your cloud or CI platform and focus on precise trust policies (see the Workload Identity Federation Guide). Running a separate attestation stack is rarely justified for a handful of services.
- Large and multi-cloud estates: a single issuer with pluggable attestors gives one identity format across providers, but its server becomes tier 0 infrastructure, with the same protection as a root CA.
- Trade-off: stronger evidence (TPM, measurements) costs provisioning, reference value upkeep and failure handling. Decide per trust domain, not per application.
Implementation roadmap
- Inventory bootstrap secrets: list every place a workload gets its first credential today (static keys in images, environment variables, join tokens, CI variables). This is the attack surface attestation should remove. See the Secrets Zero Problem Guide.
- Define trust domains and naming: one trust domain per security boundary, never shared across production and non-production, and for GCP not more than one trust domain per project.
- Pick node attestors per platform: cloud documents for cloud VMs, projected tokens for clusters, TPM where hardware assurance is required. Configure allow lists explicitly (
projectid_allow_list, tenants, clusters and service account allow lists); ink8s_psatan empty clusters map authorises nothing, which is the safe default. - Write registration entries narrowly: require at least two independent selectors, include image signature or digest for production, and review entries in code review like firewall rules.
- Pilot in parallel: issue attested identities alongside existing secrets for one service, verify consumers accept them, monitor attestation logs, then remove the static secret.
- Harden the hosts: enforce IMDSv2 or equivalent, block metadata access from containers that do not need it, restrict privileged pods, keep the agent socket readable only by intended workloads.
- Plan failure and rollback: set SVID lifetimes and the agent
availability_target(minimum 24 hours in SPIRE) so a server outage does not stop services; keep the previous secret path available during the pilot window, disabled but not deleted. - Retire bootstrap secrets: revoke the old keys, scan images and repositories to confirm they are gone, and alert on any reappearance.
Detection and measurement
- Attestation failures: log and alert on rejected node attestation, especially repeated first-use rejections, which the SPIRE documentation treats as possible incidents.
- Unexpected selectors: alert on new registration entries, wildcard or single-selector entries, and changes to allow lists.
- Metadata abuse: monitor for credential retrieval from instance metadata by unexpected processes (MITRE ATT&CK T1552.005 Cloud Instance Metadata API) and for cloud credentials used from outside their instance (T1078.004 Cloud Accounts).
- Measurement drift: for TPM and enclave attestation, alert when PCR values no longer match published reference values, and track how many nodes run debug or unmeasured images.
| Metric | What good looks like |
|---|---|
| Share of production workloads obtaining their first credential by attestation | Rising quarter on quarter, target above 90% for in-scope platforms |
| Registration entries with fewer than two selectors | Zero in production trust domains |
| Static bootstrap secrets remaining in images and CI variables | Trending to zero, each with an owner and retirement date |
| Unexplained attestation failures investigated within 24 hours | 100% |
| Nodes attested with hardware evidence where policy requires it | 100% of the regulated tier |
Framework mapping
| Framework | Reference | How attestation supports it |
|---|---|---|
| NIST SP 800-53 Rev. 5 | IA-3 Device Identification and Authentication; IA-3(4) Device Attestation | Node attestation identifies and authenticates hosts before issuing credentials |
| NIST SP 800-53 Rev. 5 | IA-9 Service Identification and Authentication; IA-5 Authenticator Management | Workload identities replace static service credentials |
| NIST SP 800-53 Rev. 5 | SI-7 Software, Firmware, and Information Integrity; SI-7(9) Verify Boot Process; SI-7(15) Code Authentication | Measured boot, enclave measurements and image signature selectors |
| NIST SP 800-53 Rev. 5 | CM-14 Signed Components; SR-11 Component Authenticity | Signed images and manufacturer-endorsed TPMs |
| NIST CSF 2.0 | PR.AA-01, PR.AA-03 | Identities for services and hardware are managed and authenticated |
| ISO/IEC 27001:2022 Annex A | 5.17 Authentication information; 8.5 Secure authentication | Removes shared bootstrap secrets from authentication |
| MITRE ATT&CK | T1552.005, T1078.004, T1528, T1611 | Techniques that attestation and host hardening reduce |
Common failure patterns
- Treating metadata as proof of identity: instance metadata is reachable by any process, and server-side request forgery can reach it from outside. The Capital One Breach 2019 shows what happens when metadata-delivered role credentials are reachable through a forged request. Attestation designs must assume the document can be read by hostile code.
- Namespace-only registrations: one selector means any pod an attacker can schedule in that namespace receives the identity.
- Join tokens as the permanent default: a one-time token convenient for a pilot becomes a long-lived bootstrap secret in automation scripts.
- Disabled safety checks:
skip_kubelet_verification,skip_block_deviceor anonymous kubelet auth left on after troubleshooting. - Debug enclaves in production: all-zero PCRs mean no meaningful measurement, yet policies written loosely may still release secrets.
- Ignoring first-use rejections: an agent that fails to start because the node already attested is a signal, not a nuisance to fix by deleting the agent entry.
Where identity fits
Attestation is the start of a non-human identity's life cycle, not the whole of it. The issued identity still needs least-privilege authorisation, ownership, logging and decommissioning when the workload is retired. Static credentials that remain beside attested identities keep the old risk alive, which is why retirement of bootstrap secrets is part of the roadmap. See the Cloud Workload Identity Guide and the Non-Human Identity (NHI) Guide.
Practitioner checklist
- List every bootstrap secret currently used to give workloads their first credential, with an owner.
- Document for each attestor what it proves and what it does not, using the RFC 9334 roles.
- Configure explicit allow lists for accounts, projects, tenants, clusters and service accounts.
- Require at least two selectors per registration, including a signed image or digest in production.
- Enforce metadata hardening and block metadata access from containers that do not need it.
- Alert on attestation failures, duplicate first-use attempts and registration changes.
- Use TPM or confidential computing evidence for the tiers where policy demands hardware assurance, and publish reference values from the build pipeline.
- Protect the identity server as tier 0 and test outage behaviour against your availability target.
- Retire static secrets once attested identities are proven, and scan to confirm they are gone.
Standards and references
- IETF: RFC 9334 Remote ATtestation procedureS (RATS) Architecture
- IETF: Workload Identity in a Multi System Environment (WIMSE) Architecture (Internet-Draft)
- SPIFFE project: SPIRE Server NodeAttestor aws_iid
- SPIFFE project: SPIRE Server NodeAttestor tpm_devid
- SPIFFE project: SPIRE Agent WorkloadAttestor k8s
- Microsoft Learn: Azure Instance Metadata Service
- AWS: Cryptographic attestation in AWS Nitro Enclaves
- Keylime: Documentation
Related NHI Mgmt Group resources: SPIFFE and SPIRE Guide · WIMSE Workload Identity Architecture Guide · Secrets Zero Problem Guide · Confidential Computing Guide · Kubernetes NHI Security Guide