feat: storage wi - #172
Merged
Merged
Conversation
Replace Auth.signer/0 and the public private_key/1 with a single Auth.sign/1 returning raw signature bytes. Service account credentials still sign locally; metadata credentials now sign through iamcredentials signBlob, and gcloud user credentials can too when :storage_signer_account names the account to sign as. Signing moves from local cpu to a network call, so that one request retries on transient failures. Every other call keeps retry: false. BREAKING CHANGE: Arke.Utils.Gcp.Auth.signer/0 and private_key/1 are removed in favour of sign/1, which returns raw signature bytes rather than a PEM.
V2 is legacy. The signature is now hex over a canonical request, so the signer's email has to be known before there is a payload — hence Auth.signer_email/0 alongside sign/1, rather than a throwaway signature to read the email back off. Object paths are escaped per segment: URI.encode/1 left reserved characters like ? untouched, which V4 rejects as a mismatch.
:expires_in per call, config :arke, :signed_url_ttl as the default, one hour otherwise. Rejects anything past the v4 seven day ceiling here rather than letting GCS fail the request with an opaque error.
valid_data? accepted any entry with a future expiration, including one second away, so a browser could start a download and get a 403 partway through. Entries now need five minutes of life left. get_signed_url/2 also forwards opts, and treats an entry shorter than a requested :expires_in as a miss rather than silently handing back a shorter url.
Where the signing key comes from in each credential source, and the two config keys the new behaviour reads.
ErikFerrari
force-pushed
the
feat/storage-wi
branch
from
August 20, 2026 08:34
00288d8 to
314783f
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.
Uh oh!
There was an error while loading. Please reload this page.