Accept dstack-mr-gcp measurements format#49
Open
ameba23 wants to merge 4 commits into
Open
Conversation
…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
Ruteri
reviewed
Jun 16, 2026
| MeasurementID: fmt.Sprintf("dstack-mr-gcp-%d-%d", mrtdIdx, rtmr0Idx), | ||
| AttestationType: "dcap-tdx", | ||
| Measurements: measurements.M{ | ||
| 0: {Expected: mrtd, ValidationOpt: measurements.Enforce}, |
Collaborator
There was a problem hiding this comment.
I think it's fine to not support optional measurements for dstack-mr format, for two reasons:
- this is a very temporary fix and the current usage does not need it
- 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
approved these changes
Jun 16, 2026
Ruteri
left a comment
Collaborator
There was a problem hiding this comment.
utACK. maxGCPMeasurementContainers can probably be removed, up to you.
Ruteri
requested changes
Jun 16, 2026
| } | ||
|
|
||
| m = &MultiMeasurements{} | ||
| return NewFromBytes(data) |
Collaborator
There was a problem hiding this comment.
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).
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.
This adds support for the JSON measurements format output by
dstack-mr-gcp, tested against a observed output from flashbots/dstack-mr-gcp@ed23e96The existing measurements format is still supported.