Repository navigation
Conversation
ameba23
commented
Oct 27, 2026
| reqwest = { workspace = true } | ||
| serde = "1.0.228" | ||
| serde_json = "1.0.145" | ||
| sha2 = "0.11.0" |
Collaborator
Author
There was a problem hiding this comment.
This was already in the lockfile
There was a problem hiding this comment.
🔵 Needs a closer look
Security-sensitive instance authorization needs human confirmation of GCP provenance guarantees and passing Rust regression tests.
1 open issue
What changed in this PR
Adds optional GCP instance restrictions to attestation verification by matching the quote’s MR_OWNER against the encoded project number, zone, and instance ID, while preserving existing verification checks.
Changes:
- Adds validated instance identities and canonical PZID hashing.
- Enforces the allowlist in synchronous and asynchronous verification.
- Adds mock-quote support, regression tests, fixtures, and usage documentation.
| File | Description |
|---|---|
| crates/mock-tdx/src/lib.rs | Supports caller-specified MR_OWNER in mock quotes. |
| crates/attestation/test-assets/gcp-tdx-identity-1793093343786079228.json | Records fixture identity and verification metadata. |
| crates/attestation/test-assets/gcp-tdx-host-registry-1793093343786079228.json | Stores host-registry fixture data. |
| crates/attestation/test-assets/gcp-tdx-collateral-1793093343786079228.yaml | Supplies collateral for real-quote regression tests. |
| crates/attestation/src/lib.rs | Adds the allowlist builder option and enforcement. |
| crates/attestation/src/gcp/provenance.rs | Adds mismatch errors and verifier integration tests. |
| crates/attestation/src/gcp/mod.rs | Exports instance identity types and verification helper. |
| crates/attestation/src/gcp/identity.rs | Implements identity validation, hashing, matching, and tests. |
| crates/attestation/README.md | Documents configuration and allowlist behavior. |
| crates/attestation/Cargo.toml | Adds the SHA-384 hashing dependency. |
| Cargo.lock | Records the attestation crate’s hashing dependency. |
Review effort: Balanced
ameba23
force-pushed
the
peg/gcp-provenance-mr-owner-check
branch
from
October 28, 2026 10:00
57a6a55 to
7c3fc79
Compare
ameba23
force-pushed
the
peg/gcp-provenance-mr-owner-check
branch
from
October 29, 2026 10:38
7c3fc79 to
57a6a55
Compare
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.

Google Cloud provenance encodes project number, zone and instance ID in the TDX quote MR_OWNER value as documented here:
https://docs.cloud.google.com/confidential-computing/confidential-vm/docs/tdx-provenance
This PR adds an optional additional check for GCP attestation verification to make sure the
MR_OWNERvalue in the quote matches a given Google cloud project number, zone and instance ID.It tests PZID encoding (Google project, zone, instance ID encoding) against fixtures from Googles Go provenance verification implementation.
It tests MR_OWNER checks against a supplied fixture from a GCP deployment with a known project, zone and instance ID.
This is a very basic check, but in followup PRs we could:
This does not break the existing library API.