Skip to content

feat(experiments): hardware TEE attestation experiment runner#357

Merged
imran-siddique merged 1 commit into
mainfrom
feat/hardware-attestation-experiment
Jun 26, 2026
Merged

feat(experiments): hardware TEE attestation experiment runner#357
imran-siddique merged 1 commit into
mainfrom
feat/hardware-attestation-experiment

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

What

Adds experiments/claim-hw-attestation/ — the experiment that exercises the real hardware TEE path, so everything is ready to run the moment a confidential VM is available.

Every other experiment runs software-only (attestation_assurance: none). This one:

  • P1 detects a real provider (sev-snp / tdx / tpm), never software-only
  • P2 confirms report.report_data equals the gateway-supplied nonce
  • P3 confirms the measurement is a real value, not the dev placeholder
  • P4 confirms a different nonce yields different report_data (freshness)
  • P5 runs the provider-specific verifier over the raw hardware evidence
  • P6 builds a full TRACE Claim from the real report and verifies it end to end (schema, Ed25519 signature, TEE key binding)

Safe everywhere

On a host with no TEE it prints SKIP and exits 0 — verified on this (non-TEE) machine. CI scope (ruff check src/ tests/, mypy src/, pytest tests/unit) is untouched, so nothing new can break the build. experiments/ is not in the lint scope (same as the other runners).

Uses the real APIs

Drives detect/get_attestation_report (cmcp_runtime.tee), generate_trace_claim (cmcp_runtime.audit), and verify_trace_claim + the per-provider verify_*_measurement functions (cmcp_verify). It reproduces the gateway's actual nonce construction (JWK thumbprint ‖ salt, per startup.py) so the verifier's key-binding check passes on hardware.

What still needs the vendor services (not just hardware)

P5 verifies format + measurement + nonce binding but not the silicon cert chain. AMD KDS (VCEK/VLEK), Intel DCAP (quote signature/TCB), and TPM EK chain validation appear under unverified_fields until wired into cmcp_verify. Documented in the README as the last hardware-dependent step.

Docs

experiments/claim-hw-attestation/README.md: hardware options (Azure DCasv5/DCesv6, GCP n2d/c3), the deploy → config → run → verify sequence, sample cmcp-config.yaml, expected output, and the cert-chain caveat. experiments/README.md index updated.

🤖 Generated with Claude Code

Adds experiments/claim-hw-attestation: the one experiment that exercises the real
hardware path (genuine attestation report, nonce binding, raw-evidence
verification, end-to-end TRACE Claim verification) instead of software-only mode.

Safe everywhere: SKIPs with exit 0 when no TEE is detected, so CI and dev hosts
pass. Produces results only on a confidential VM (SEV-SNP / TDX / TPM). README
documents the Azure/GCP deploy -> config -> run -> verify sequence and the
cert-chain appraisal (AMD KDS / Intel DCAP / TPM EK) that remains as the last
hardware-dependent step.

Uses the gateway's real nonce construction (JWK thumbprint || salt) so the
verifier's key-binding check passes on hardware.
@imran-siddique imran-siddique merged commit 1d1bf99 into main Jun 26, 2026
12 checks passed
@imran-siddique imran-siddique deleted the feat/hardware-attestation-experiment branch June 26, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant