Skip to content

Accept dstack-mr-gcp measurements format#49

Open
ameba23 wants to merge 4 commits into
mainfrom
peg/accept-dstack-mr-gcp-measurements-format
Open

Accept dstack-mr-gcp measurements format#49
ameba23 wants to merge 4 commits into
mainfrom
peg/accept-dstack-mr-gcp-measurements-format

Conversation

@ameba23

@ameba23 ameba23 commented Jun 15, 2026

Copy link
Copy Markdown

This adds support for the JSON measurements format output by dstack-mr-gcp, tested against a observed output from flashbots/dstack-mr-gcp@ed23e96

The existing measurements format is still supported.

ameba23 and others added 4 commits June 15, 2026 10:01
…verse-proxy into peg/accept-dstack-mr-gcp-measurements-format

* 'gcp-msrmts-format-encoding' of github.com:Ruteri/cvm-reverse-proxy:
  Adjusts to use standard encoding
MeasurementID: fmt.Sprintf("dstack-mr-gcp-%d-%d", mrtdIdx, rtmr0Idx),
AttestationType: "dcap-tdx",
Measurements: measurements.M{
0: {Expected: mrtd, ValidationOpt: measurements.Enforce},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's fine to not support optional measurements for dstack-mr format, for two reasons:

  1. this is a very temporary fix and the current usage does not need it
  2. if someone is using dstack-mr specifically, they get all of the values and should enforce all of the values semantically

If someone needs to ignore a specific measurement register, there's no good way of doing it in dstack-mr format and I'd argue it's a better idea to not allow ignoring measurements in this format.

@Ruteri Ruteri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

utACK. maxGCPMeasurementContainers can probably be removed, up to you.

}

m = &MultiMeasurements{}
return NewFromBytes(data)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

m *MultiMeasurements in return is never set, the old constructor worked a bit differently. I'd suggest to either keep to a single function, or remove the named return (making NewFromBytes a member function is an option but could be weird).

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