Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,12 @@ public WriteChannel writer(BlobWriteOption... options) {
* <li>The default credentials, if no credentials were passed to {@link StorageOptions}
* </ol>
*
* <p>Warning: By default, {@code signUrl} uses V2 signing. For V2 Signed URLs, query parameters
* are not used to compute the signature, so query parameters can be added, removed, or altered
* after the URL has been signed. Pass {@link SignUrlOption#withV4Signature()} to use V4 signing
* instead, as query parameters cannot be added, removed, or altered after a V4 signature is
* generated.
*
* <p>Example of creating a signed URL for the blob that is valid for 2 weeks, using the default
* credentials for signing the URL:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3044,6 +3044,16 @@ public static SignUrlOption withExtHeaders(Map<String, String> extHeaders) {
/**
* Use if signature version should be V2. This is the default if neither this or {@code
* withV4Signature()} is called.
*
* <p>Warning: For V2 Signed URLs, query parameters are not used to compute the signature, so
* query parameters can be added, removed, or altered after the URL has been signed. Prefer
* {@link #withV4Signature()}, as query parameters cannot be added, removed, or altered after a
* V4 signature is generated.
*
* @see <a href="https://cloud.google.com/storage/docs/authentication/canonical-requests">
* Canonical Requests</a>
* @see <a href="https://cloud.google.com/storage/docs/access-control/signed-urls-v2">V2 Signing
* Process</a>
*/
@TransportCompatibility(Transport.HTTP)
public static SignUrlOption withV2Signature() {
Expand Down Expand Up @@ -4786,6 +4796,12 @@ Blob createFrom(
* <li>The default credentials, if no credentials were passed to {@link StorageOptions}
* </ol>
*
* <p>Warning: By default, {@code signUrl} uses V2 signing. For V2 Signed URLs, query parameters
* are not used to compute the signature, so query parameters can be added, removed, or altered
* after the URL has been signed. Pass {@link SignUrlOption#withV4Signature()} to use V4 signing
* instead, as query parameters cannot be added, removed, or altered after a V4 signature is
* generated.
*
* <p>Example of creating a signed URL that is valid for 1 week, using the default credentials for
* signing the URL, the default signing method (V2), and the default URL style (path-style):
*
Expand Down
Loading