tdx: always attach measurement and ACPI digests for verifier choice#769
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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_measurementwhen the OS image provides TDX measurement material, even if the resolvedtdx_attestation_variantis 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_variantrecords the resolved scheme for the boot, while verifiers may choose their own verification path by supplying their ownvm_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vm_config.tdx_measurementwhen the OS image provides measurement material, even if the resolvedtdx_attestation_variantislegacy.tdx_attestation_variantonly records the VMM/KMS-resolved scheme (for key release / fail-closed gates); verifiers can flip the flag on the requestvm_configand 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)
vm_config.tdx_attestation_variant.requirements.tdx_measure_acpi_tablesstill uses the resolved variant.dstack-mr.Test plan
cargo test -p dstack-attest -p dstack-vmm --all-featurestdx_measurementwhen the image hasmeasurement.tdx.cbor/sha256sum.txttdx_attestation_varianttolite/legacyand pass both paths on the same evidence (where memory + materials allow lite)