fix: Use IAM Sign Blob API for GCS signed URLs on GKE with Workload Identity#195
Draft
morgan-wowk wants to merge 1 commit intomasterfrom
Draft
fix: Use IAM Sign Blob API for GCS signed URLs on GKE with Workload Identity#195morgan-wowk wants to merge 1 commit intomasterfrom
morgan-wowk wants to merge 1 commit intomasterfrom
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Collaborator
|
top-notch |
7d4412c to
cc4d02b
Compare
The signed URL implementation was broken on GKE because Workload Identity credentials (compute_engine.Credentials) are token-based and have no private key, so generate_signed_url() would fail with "you need a private key to sign credentials". Fix this by using the IAM Sign Blob API via google.auth.iam.Signer, which lets the service account sign on its own behalf without a JSON key file. This avoids credential leak risk and maintenance overhead of rotating SA keys. Requires roles/iam.serviceAccountTokenCreator to be granted to the oasis-backend SA on itself — see the paired terraform-the-cloud change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cc4d02b to
e7afe64
Compare
Ark-kun
approved these changes
Apr 3, 2026
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.

The signed URL implementation was broken on GKE because Workload Identity credentials (compute_engine.Credentials) are token-based and have no private key, so generate_signed_url() would fail with "you need a private key to sign credentials".
Fix this by using the IAM Sign Blob API via google.auth.iam.Signer, which lets the service account sign on its own behalf without a JSON key file. This avoids credential leak risk and maintenance overhead of rotating SA keys.
Requires iam.serviceAccounts.signBlob to be granted to the service account on itself — see the paired terraform-the-cloud change which adds a minimal org-scoped custom role containing only that permission.