Skip to content

tdx: always attach measurement and ACPI digests for verifier choice#769

Merged
kvinwang merged 1 commit into
masterfrom
refactor/unify-tdx-attestation
Jul 12, 2026
Merged

tdx: always attach measurement and ACPI digests for verifier choice#769
kvinwang merged 1 commit into
masterfrom
refactor/unify-tdx-attestation

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Summary

  • Always attach vm_config.tdx_measurement when the OS image provides measurement material, even if the resolved tdx_attestation_variant is legacy.
  • Always keep the three RTMR0 ACPI digest events (with marker payloads) in the stripped TDX event log exposed via Attest / RA-TLS, regardless of variant.
  • Document that tdx_attestation_variant only records the VMM/KMS-resolved scheme (for key release / fail-closed gates); verifiers can flip the flag on the request vm_config and choose lite or legacy independently.

This makes the same TDX boot evidence usable under either verification path. Boot/QEMU/hardware measurement was already identical; the only gaps were optional measurement material and event-log stripping.

Out of scope (intentionally unchanged)

  • Verifier dispatch still follows the caller's vm_config.tdx_attestation_variant.
  • Guest fail-closed check against requirements.tdx_measure_acpi_tables still uses the resolved variant.
  • Lite remains subject to image materials and memory-size constraints in dstack-mr.

Test plan

  • cargo test -p dstack-attest -p dstack-vmm --all-features
  • Confirm a legacy-resolved TDX VM carries tdx_measurement when the image has measurement.tdx.cbor / sha256sum.txt
  • Confirm Attest/RA-TLS event log retains ACPI DATA digests for both lite and legacy boots
  • Confirm a third-party verifier can override tdx_attestation_variant to lite / legacy and pass both paths on the same evidence (where memory + materials allow lite)

Carry tdx_measurement whenever the image provides it and always keep
RTMR0 ACPI digest events in the exposed event log, so a verifier can
independently pick lite or legacy for any TDX boot. tdx_attestation_variant
still records only the VMM/KMS-resolved scheme for key release.
Copilot AI review requested due to automatic review settings July 12, 2026 04:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts TDX evidence handling so that the same boot evidence can be verified via either the legacy or lite verification path, independent of the VMM/KMS-resolved tdx_attestation_variant.

Changes:

  • Always attach vm_config.tdx_measurement when the OS image provides TDX measurement material, even if the resolved tdx_attestation_variant is legacy.
  • Always retain the three RTMR0 “ACPI DATA” digest events (with marker payloads) in the stripped TDX event log returned via Attest / RA-TLS, regardless of variant.
  • Update public docs/comments to clarify that tdx_attestation_variant records the resolved scheme for the boot, while verifiers may choose their own verification path by supplying their own vm_config.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
vmm/src/app.rs Attaches tdx_measurement whenever available for TDX boots; updates tests to reflect new behavior.
dstack-types/src/lib.rs Clarifies TdxAttestationVariant semantics and updates VmConfig.tdx_measurement field docs.
dstack-attest/src/v1.rs Makes stripping behavior always retain RTMR0 ACPI digest events by using lite-style stripping regardless of config.
dstack-attest/src/attestation.rs Ensures ACPI DATA marker payloads are retained in the stripped event log string regardless of config; updates tests accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kvinwang
kvinwang merged commit 44f48e8 into master Jul 12, 2026
16 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.

2 participants