attestation: redesign V1 with msgpack wire format and report_data payload#629
Merged
attestation: redesign V1 with msgpack wire format and report_data payload#629
Conversation
317c6dd to
ac6a3d0
Compare
68e62dc to
9799aa0
Compare
9799aa0 to
ae8a935
Compare
- Fix is_cbor_map_prefix to cover full CBOR map range (0xa0..=0xbf) - Remove SCALE Encode/Decode impls for VersionedAttestation to avoid consuming all remaining input on decode - Remove ambiguous 0x01 prefix fallback in from_bytes - Change to_bytes to return Result instead of panicking via or_panic - Add report_data_payload binding validation in verify_with_time
- Restore Encode/Decode impls for VersionedAttestation (needed by CertSigningRequestV2), with a 10 MiB size limit to prevent OOM on untrusted input - Add size check in from_bytes for direct callers - Document that VersionedAttestation must be the last field in SCALE containers due to the consume-all-remaining decode strategy - Fix prek formatting
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
AttestationV1as a direct platform/stack schema with adjacently-tagged serde enumsrmp-serde) instead of CBOR for V1 wire format, consistent with existing msgpack usage inra-tlsforAppInforeport_data_payloadinside a newDstackPodstack variant for dstack-k8sChanges
dstack-attest: newv1.rsmodule withAttestation/PlatformEvidence/StackEvidencetypes, msgpack serialization viato_vec_named0x80..=0x8f), map16 (0xde), map32 (0xdf)AttestationV1::with_report_data()method to deduplicate report_data patching across simulator and guest-agent testssize_hintin SCALEEncodeimpl to avoid double serializationEncode/Decoderestored with 10 MiB size limitTest plan
cargo test -p dstack-attest --all-features— 6 tests passcargo check -p dstack-attest -p ra-tls -p dstack-guest-agent -p dstack-guest-agent-simulator