Repository navigation
docs(storage): warn about V2 signed URL query parameter behavior - #15430
Closed
sahusneha2004 wants to merge 1 commit into
Closed
sahusneha2004 wants to merge 1 commit into
sahusneha2004 wants to merge 1 commit into
Conversation
Document in Storage#signUrl, Storage.SignUrlOption#withV2Signature, and Blob#signUrl Javadocs that V2 Signed URLs do not include query parameters in signature computation, so query parameters can be added, removed, or altered after signing, and recommend withV4Signature() instead. [Generated-by: AI]
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Javadoc documentation in Blob.java and Storage.java to add warning messages regarding the default use of V2 signing in signUrl. It explains that V2 signed URLs do not use query parameters to compute the signature, allowing them to be altered after signing, and recommends using V4 signing instead. There are no review comments to address, and the changes look good.
sahusneha2004
marked this pull request as ready for review
December 4, 2026 05:58
sahusneha2004
marked this pull request as draft
December 4, 2026 06:21
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.
Problem
Storage.SignUrlOption.withV2Signature(),Storage.signUrl(...), andBlob.signUrl(...)Javadocs did not include a warning explaining how V2 Signed URLs handle query parameters (unlikeSignUrlOption.withQueryParams(...)), even though V2 signing is the default when neitherwithV2Signature()norwithV4Signature()is passed.Changes
Storage.SignUrlOption.withV2Signature()inStorage.javanoting that query parameters are not used to compute a V2 signature (so they can be added, removed, or altered after signing) and recommendingwithV4Signature()instead, along with@seelinks to Canonical Requests and the V2 Signing Process.Storage.signUrl(...)inStorage.javaandBlob.signUrl(...)inBlob.javanoting that V2 signing is the default and recommendingSignUrlOption.withV4Signature().Tests
mvn test checkstyle:check@checkstyle javadoc:javadoc -pl java-storage/google-cloud-storage -Dtest=V4SigningTest,SignatureInfoTest: 0 Checkstyle violations, Javadoc build succeeded, and 27/27 tests passed.