Skip to content

feat(google): sign GCS V4 POST policies - #1150

Merged
Xuanwo merged 1 commit into
mainfrom
xuanwo/gcs-v4-post-policy
Nov 30, 2026
Merged

Xuanwo merged 1 commit into
mainfrom
xuanwo/gcs-v4-post-policy

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 30, 2026

Copy link
Copy Markdown
Member

Closes #1103

Cloud Storage browser uploads use a signed POST policy. RequestSigner::sign_post_policy signs the standard Base64 encoding of the caller's UTF-8 JSON through a local service-account key or IAM signBlob. post_policy_signing_fields exposes the algorithm, credential, and signing date for the policy conditions, including the signing identity resolved through the issuing VM metadata source. The caller sets the policy conditions and expiration, chooses the upload URL, and builds the multipart form from SignedPostPolicy::into_fields. Cloud Storage signing contract

Protocol verification

  • Local RSA signing matches all five authentication fields in Google's POST Policy Simple conformance case. OpenSSL independently reproduces its RSA PKCS#1 v1.5 SHA-256 signature. Google conformance vector and test key
  • An injected IAM transport replays the conformance signature and checks the endpoint, bearer authorization, and Base64 request payload. The VM case uses synthetic credentials and a separate OpenSSL signature for a UTF-8 policy with whitespace. It verifies the issuing metadata transport and the returned form fields.

@Xuanwo
Xuanwo merged commit 26dee05 into main Nov 30, 2026
34 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/gcs-v4-post-policy branch November 30, 2026 11:02
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.

feat(google): support GCS Signed POST Policy V4

2 participants