Summary
ZeroID's data model includes a public_key_pem field and a required_attestation field in the identity record, but neither hardware key confinement nor attestation document verification are implemented. The proposed NHI IAM standard mandates that high-trust agent identities bind their private key to hardware (HSM, TEE/enclave, or cloud KMS) and present a verifiable attestation document as part of the token request, with the attestation bound into the issued token.
Problem
Without hardware attestation:
- Software key extraction risk: Agent private keys stored in process memory or on disk can be exfiltrated without detection. Compromised keys allow silent impersonation indefinitely (until manual discovery and revocation).
- No proof of execution environment: ZeroID can verify what an agent claims to be, but not where it is running. A cloned agent image, a compromised container, or a supply-chain-attacked model weight has the same identity as a legitimate agent.
- Compliance gap: The proposed standard (and EU AI Act Article 9 accountability requirements) require evidence that agent credentials are bound to hardware roots of trust for high-assurance workloads. The
required_attestation field exists but is not enforced.
- DPoP / channel binding gap: The forward-secret channel work (see companion issue) is significantly weakened if the key used for DPoP proofs is software-extractable — hardware confinement closes the loop.
Proposed Implementation
1. Attestation document types
Support three hardware attestation mechanisms:
| Mechanism |
Attestation Document Format |
Target Environment |
| AWS Nitro Enclaves |
Nitro attestation document (CBOR/COSE) |
EC2 / ECS / Lambda |
| Azure Confidential VMs / Managed HSM |
Azure Attestation JWT (MAA) |
Azure |
| GCP Confidential VMs / Cloud HSM |
Google Cloud Attestation JWT |
GCP |
| TPM 2.0 |
TPM quote + PCR values (JSON envelope) |
On-prem / bare metal |
| YubiHSM / SoftHSM (dev) |
PKCS#11 key handle proof |
Development / CI |
2. Token request extension
Extend the token request (all grant types that can carry a public key) to accept an attestation document:
{
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": "<signed JWT>",
"public_key": "<base64url DER or PEM>",
"attestation": {
"type": "aws_nitro",
"document": "<base64url-encoded Nitro attestation document>",
"nonce": "<challenge nonce from ZeroID>"
}
}
Challenge-response flow:
- Agent calls
GET /oauth2/attestation/challenge → receives a nonce (short-lived, 30s TTL).
- Agent generates or retrieves its hardware-confined key pair.
- Agent requests attestation from the hardware (nonce is bound into the attestation document).
- Agent submits token request with attestation document.
- ZeroID verifies: attestation document signature → nonce matches → public key in attestation matches supplied public key → key was generated inside the hardware boundary.
3. Attestation verification
Implement attestation verifiers for each supported mechanism:
- Nitro: verify COSE_Sign1 against AWS root CA; extract
public_key from user data field; verify nonce.
- Azure MAA: verify JWT against MAA JWKS; extract
x-ms-runtime.keys; verify nonce in nonce claim.
- GCP: verify JWT against Google Trust Services; extract key from
submods.container.gce.instance_id context + key material.
- TPM: verify quote signature against endorsement key certificate chain; verify PCR values against expected golden values (configurable per identity).
4. Token binding
When attestation is verified at issuance, add the following claims to the issued JWT:
{
"cnf": {
"x25519": "<base64url public key>"
},
"hwattest": {
"type": "aws_nitro",
"pcr0": "<base64url PCR0 value>",
"enclave_image_digest": "sha256:...",
"verified_at": 1744000000
}
}
hwattest.type indicates the attestation mechanism.
hwattest.pcr0 (or equivalent) binds the token to a specific firmware/software measurement.
- Enforcement points can reject tokens where
hwattest.enclave_image_digest does not match an approved image list.
5. Trust level gating
Extend the trust level policy:
| Trust Level |
Key Requirement |
standard |
Software key (current behavior) |
elevated |
Software key + DPoP proof |
high |
Hardware-confined key + verified attestation document |
Identity records with required_attestation: true (already in the data model) MUST present a valid attestation document; token issuance fails otherwise.
6. Approved image / PCR policy
Add a new AttestationPolicy resource type that administrators can configure per project:
attestation_policy:
type: aws_nitro
approved_pcr0:
- "sha384:abc123..."
approved_enclave_image_digests:
- "sha256:def456..."
max_token_ttl: 3600
ZeroID enforces this policy at issuance: tokens are only issued if the attestation document's measurements match an approved entry.
7. CAE signal: attestation drift
Add a attestation_drift CAE signal type emitted when:
- A re-attestation check (on token renewal) shows a different PCR value than the original token's
hwattest claims.
- The approved image list is updated and an outstanding token's
hwattest.enclave_image_digest is no longer in the approved list.
8. SDK changes
HighflameClient(attestation=NitroAttestation()) / equivalent for each SDK language
- SDK handles challenge-response, attestation generation, and key material retrieval transparently
- PKCS#11 interface for YubiHSM/SoftHSM in development environments
Acceptance Criteria
References
Summary
ZeroID's data model includes a
public_key_pemfield and arequired_attestationfield in the identity record, but neither hardware key confinement nor attestation document verification are implemented. The proposed NHI IAM standard mandates that high-trust agent identities bind their private key to hardware (HSM, TEE/enclave, or cloud KMS) and present a verifiable attestation document as part of the token request, with the attestation bound into the issued token.Problem
Without hardware attestation:
required_attestationfield exists but is not enforced.Proposed Implementation
1. Attestation document types
Support three hardware attestation mechanisms:
2. Token request extension
Extend the token request (all grant types that can carry a public key) to accept an attestation document:
{ "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer", "assertion": "<signed JWT>", "public_key": "<base64url DER or PEM>", "attestation": { "type": "aws_nitro", "document": "<base64url-encoded Nitro attestation document>", "nonce": "<challenge nonce from ZeroID>" } }Challenge-response flow:
GET /oauth2/attestation/challenge→ receives a nonce (short-lived, 30s TTL).3. Attestation verification
Implement attestation verifiers for each supported mechanism:
public_keyfrom user data field; verify nonce.x-ms-runtime.keys; verify nonce innonceclaim.submods.container.gce.instance_idcontext + key material.4. Token binding
When attestation is verified at issuance, add the following claims to the issued JWT:
{ "cnf": { "x25519": "<base64url public key>" }, "hwattest": { "type": "aws_nitro", "pcr0": "<base64url PCR0 value>", "enclave_image_digest": "sha256:...", "verified_at": 1744000000 } }hwattest.typeindicates the attestation mechanism.hwattest.pcr0(or equivalent) binds the token to a specific firmware/software measurement.hwattest.enclave_image_digestdoes not match an approved image list.5. Trust level gating
Extend the trust level policy:
standardelevatedhighIdentity records with
required_attestation: true(already in the data model) MUST present a valid attestation document; token issuance fails otherwise.6. Approved image / PCR policy
Add a new
AttestationPolicyresource type that administrators can configure per project:ZeroID enforces this policy at issuance: tokens are only issued if the attestation document's measurements match an approved entry.
7. CAE signal: attestation drift
Add a
attestation_driftCAE signal type emitted when:hwattestclaims.hwattest.enclave_image_digestis no longer in the approved list.8. SDK changes
HighflameClient(attestation=NitroAttestation())/ equivalent for each SDK languageAcceptance Criteria
GET /oauth2/attestation/challenge)hwattestclaim added to issued tokens when attestation is verifiedrequired_attestation: trueenforced at issuanceAttestationPolicyresource type defined, stored, and enforcedattestation_driftCAE signal implementedGET /oauth2/introspectresponse includeshwattestclaimsReferences
required_attestationandpublic_key_pemfields