Skip to content

Use attest repo to compute expected measurements from image hashes#47

Draft
ameba23 wants to merge 9 commits into
mainfrom
peg/attest-integrate-incremental-00
Draft

Use attest repo to compute expected measurements from image hashes#47
ameba23 wants to merge 9 commits into
mainfrom
peg/attest-integrate-incremental-00

Conversation

@ameba23
Copy link
Copy Markdown
Collaborator

@ameba23 ameba23 commented Jun 3, 2026

WIP

This is a protocol breaking change as it changes the format of the wire message for attestation payload.

This is the first step towards integrating with the easy-tee/attest repo, and is based roughly on @Ruteri 's attest-integration-idea branch.

This adds platform metadata from the to the attestation payload which the attester produces and the verifier checks, and adds a new variant to the MeasurementRecord enum used by in the measurement policy for verification, which allows image hashes to be specified rather than a full set of measurements.

When verifying, if we have a policy which specifies image hashes rather than a full set of measurements, we we compute expected measurements using attest-measure's expected_dcap_registers function based on the platform metadata and image hashes.

There are still a lot of things missing from this PR, and currently some very similar types are duplicated between this repo's attestation crate and attest-types. There is a little bit of friction there with wanting to maintain compatibility with our current measurement policy JSON format (for the attestation type names) and some things which i just didn't get to yet. But potentially this can become a lot neater, and we can lean more on the functionality in the attest repo.

Related issue: #40
Paired PR in attest: Easy-TEE/attest#12

TODO:

  • Test on GCP deployment.
  • See what else we need to do to support Azure for portable measurements (where we have image hashes rather than PCRs in policy). As far as i can see, DcapImageHashes is DCAP specific because the azure measure function expects 256 bit hashes rather than 384. So probably we just need to document that Azure is not supported for portable image hashes.
  • Consider also bailing for 'Self-hosted' (non-GCP) 'portable' policies, as this is not fully tested. Or at least document that it is experimental.
  • Deduplicate types (AttestationType, AttestationEvidence / AttestationExchangeMessage) between attestation and attest. The issue is representing the NoAttestation case. Potentially we can use Option. Also potentially an issue with adding Nitro support in Add experimental support for AWS Nitro #45
  • Improve testing / consider approach to mock platform metadata
  • Consider dropping support for attestations encoded as Dstacks/ra-tls VersionedAttestationformat. Or at least document that these will not work with 'portable' measurement policies due to the missing platform metadata.
  • Check error handling logic related to missing mrtd / rtmr0 values returned from expected_dcap_registers.

@ameba23 ameba23 changed the title Use attest_measure repo to compute expected measurements from image hashes Use attest repo to compute expected measurements from image hashes Jun 3, 2026
@ameba23 ameba23 marked this pull request as draft June 3, 2026 11:04
@ameba23 ameba23 added the breaks protocol This is a protocol breaking change label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks protocol This is a protocol breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant