Skip to content

Add AWS EC2 NitroTPM attestation and guest OS support#753

Draft
h4x3rotab wants to merge 3 commits into
masterfrom
aws-attestation-platform-spec
Draft

Add AWS EC2 NitroTPM attestation and guest OS support#753
h4x3rotab wants to merge 3 commits into
masterfrom
aws-attestation-platform-spec

Conversation

@h4x3rotab

@h4x3rotab h4x3rotab commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the complete AWS EC2 NitroTPM platform path under the account-admin-untrusted threat model. This PR now combines the former dstack#753 implementation with the Yocto image changes from Dstack-TEE/meta-dstack#79.

Attestation and key release

  • parse and verify AWS NitroTPM Attestation Documents against the AWS NitroTPM PKI;
  • replay PCR14 launch measurements and use PCR23 only for runtime telemetry;
  • bind boot PCRs, OS image hash, measured config/app identity, freshness, and recipient keys;
  • support AWS-aware KMS, verifier, RA-TLS, auth-simple, auth-eth, guest-agent, and SDK flows;
  • expose canonical AWS platform details without depending on AWS KMS.

Guest OS

  • add the dstack-aws Yocto kernel feature with built-in NVMe, ENA, UEFI/GPT, serial-console, and TPM CRB support;
  • add tpm2-tss to the dstack guest recipe build dependencies;
  • keep AWS image/release helpers under os/yocto/tools/aws/ and formal documentation under docs/.

Operations and documentation

  • add production verifier, reproducibility, image hardening, AMI promotion, and EC2 live-smoke documentation/tooling;
  • adapt release-manifest generation to the unified dstack monorepo (--repo) rather than separate dstack/meta-dstack checkouts.

Validation

  • cargo test -p dstack-attest aws_nitro_tpm
  • cargo test -p dstack-kms aws_nitro_tpm
  • cargo test -p dstack-verifier aws
  • cargo test -p dstack-guest-agent -p dstack-guest-agent-simulator -p ra-tls -p tpm-attest -p tpm-qvl
  • npm run test:run and npm run lint in dstack/kms/auth-simple
  • bash -n/shellcheck through prek run --all-files
  • reuse lint
  • the original branch also recorded a live EC2 smoke test against its promoted Attestable AMI

forge test --ffi was not rerun locally because Foundry is not installed in this environment; CI covers the Foundry suite.

Comment thread dstack/dstack-attest/src/aws_nitro_tpm.rs Fixed
@h4x3rotab h4x3rotab force-pushed the aws-attestation-platform-spec branch 6 times, most recently from d6fb1cd to 504e342 Compare July 8, 2026 03:48
@h4x3rotab h4x3rotab force-pushed the aws-attestation-platform-spec branch from 504e342 to 420ea41 Compare July 8, 2026 22:32
Adds the AWS EC2 NitroTPM platform path for dstack under the
account-admin-untrusted threat model, integrated the same way AMD SEV-SNP is
rather than with AWS-specific contract/auth/systemd surface.

- NitroTPM attestation-document parsing, verification against the AWS Nitro
  PKI, PCR replay, PCR14 launch measurement and PCR23 runtime measurement, and
  platform-specific verifier/API output.
- Reuses the on-chain authorization contract unchanged: a verified NitroTPM
  attestation has no TDX/SNP-style TCB surface, so the KMS and verifier
  normalize it to tcbStatus="UpToDate" (the same way SEV-SNP normalizes its own
  status) and it passes the standard gate. No AWS-specific on-chain fields.
- Optional allowed_attestation_modes kms.toml allowlist for SNP-style
  per-platform operator control (empty allows every verified mode).
- Attested recipient-key handling for app-key release without relying on AWS
  KMS; freshness/replay policy checks and RA-TLS endpoint identity verification.
- auth-simple and auth-eth policy support, production verifier runbook,
  reproducibility manifests, AMI promotion + EC2 live-smoke helpers, and
  committed AWS live-smoke evidence.
- App trust model matches TDX/SEV-SNP: app code (init_script, pre_launch_script,
  docker-compose) is measured into the on-chain-whitelisted identity and
  replayed into non-resettable PCR14, so no compose filter or device sandbox is
  used.

Rebased onto master (squashed); integrates with the tdx-measurement-attestation
changes in #742.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kvinwang kvinwang force-pushed the aws-attestation-platform-spec branch from 420ea41 to 41f9b7e Compare July 13, 2026 04:14
@kvinwang kvinwang changed the title [codex] Add AWS NitroTPM attestation platform support Add AWS EC2 NitroTPM attestation and guest OS support Jul 13, 2026
@kvinwang kvinwang force-pushed the aws-attestation-platform-spec branch from 41f9b7e to 41a4aa1 Compare July 13, 2026 04:16
Comment thread dstack/dstack-attest/src/aws_nitro_tpm.rs Fixed
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.

3 participants