Skip to content

Add GCP provenance MR_OWNER check for project, zone and instance id - #108

Open
ameba23 wants to merge 2 commits into
mainfrom
peg/gcp-provenance-mr-owner-check
Open

ameba23 wants to merge 2 commits into
mainfrom
peg/gcp-provenance-mr-owner-check

Conversation

@ameba23

@ameba23 ameba23 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

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_OWNER value 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:

  • Add this to the measurement policy structure rather than an attestation verifier builder option
  • Make it possible to check only project number or zone, by including instance ID in the metadata as part of the attestation payload. This is likely what we need, but more complicated to implement, so i propose it for a followup.

This does not break the existing library API.

reqwest = { workspace = true }
serde = "1.0.228"
serde_json = "1.0.145"
sha2 = "0.11.0"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was already in the lockfile

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 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

Comment thread crates/attestation/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Security-sensitive attestation authorization changes warrant human review and confirmation that the cryptographic integration tests pass.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@ameba23
ameba23 added this pull request to stack #111 October 28, 2026 09:59
@ameba23
ameba23 force-pushed the peg/gcp-provenance-mr-owner-check branch from 57a6a55 to 7c3fc79 Compare October 28, 2026 10:00

@alexhulbert alexhulbert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this looks great! 👍

@ameba23
ameba23 force-pushed the peg/gcp-provenance-mr-owner-check branch from 7c3fc79 to 57a6a55 Compare October 29, 2026 10:38
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.

3 participants