Skip to content

fix: implement GcpTdx and NitroEnclave support in V1 attestation#10

Merged
kvinwang merged 2 commits intomasterfrom
fix/v1-gcptdx-nitro-attestation
Apr 13, 2026
Merged

fix: implement GcpTdx and NitroEnclave support in V1 attestation#10
kvinwang merged 2 commits intomasterfrom
fix/v1-gcptdx-nitro-attestation

Conversation

@kvinwang
Copy link
Copy Markdown
Collaborator

Summary

  • The upstream merge left V1 AttestationV1::decode_app_info_ex and verify_with_time with bail!() stubs for GcpTdx and NitroEnclave, since upstream only has empty placeholders for these platforms
  • Added full GcpTdx implementation: TPM PCR-based MR computation for decode_app_info, TDX + TPM dual verification with PCR replay for verify_with_time
  • Added full NitroEnclave implementation: NSM PCR-based MR computation for decode_app_info, COSE signature + cert chain verification for verify_with_time
  • All callers (guest-agent, KMS, verifier, ra-rpc) use into_v1() and were broken on GcpTdx/NitroEnclave without this fix

Test plan

  • cargo check --all-features passes
  • cargo clippy passes
  • Deployed nginx demo on GCP TDX VM with KMS key provider — confirmed GcpTdx attestation and key provisioning work end-to-end

The upstream merge left V1 AttestationV1's decode_app_info_ex and
verify_with_time with bail!() stubs for GcpTdx and NitroEnclave,
since upstream only has empty placeholders for these platforms.

This commit adds full implementations:

- decode_app_info_ex: GcpTdx uses TPM PCR-based MR computation,
  NitroEnclave uses NSM PCR-based MR computation
- verify_with_time: GcpTdx performs TDX quote + TPM quote verification
  with PCR replay, NitroEnclave performs COSE signature + cert chain
  verification

All callers (guest-agent, KMS, verifier, ra-rpc) use into_v1() and
were broken on these platforms without this fix.
The test requires vsock kernel support which is not available in
GitHub Actions runners.
@kvinwang kvinwang merged commit 603c6ee into master Apr 13, 2026
8 checks passed
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