Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between V4 and V2 Signing Process for Google Cloud Storage's Resources?

I am using Google Cloud Storage for one of my project requirement, that also required to use Signed URL, and when I reached google documentation here https://cloud.google.com/storage/docs/access-control/signed-urls

It now talks about V4 (version) to use for signed URL, another place it also says like it's in BETA Mode? Now I am sort of on my beginner step to get SIGNED URL for the objects stored in GCS, but its documentation confused me.

  1. If I follow V2 documentation refer here: https://cloud.google.com/storage/docs/access-control/signed-urls-v2 then it documentation say Important: This page covers legacy material related to the V2 signing process. It is recommended that users work with the V4 signing process instead.

  2. If I follow V4 documentation then refer here: https://cloud.google.com/storage/docs/access-control/signing-urls-manually then it says This feature is in a pre-release state and might change or have limited support.

Sure I will reach to GCS support as well, but still thought to ask from the community,

A. What is the difference between V4 and V2

B. On both cases Google Cloud Storage's Documentation contradicting the SIGNED URL functioning

like image 282
Sumit Arora Avatar asked Oct 31 '25 02:10

Sumit Arora


1 Answers

It seems that you have received an answer in the Public Issue Tracker from GCP of your question.

In addition to the answer posted:

A. What is the difference between V4 and V2

The difference is mostly at implementation level, how the signature is constructed. Also, in V4 you cannot create signed urls whose expiration date (X-Goog-Expires) goes beyond 7 days, whereas this can be set for years using V2. Something else is that V4 is now more suitable to carry out GCS-AWS operations, so if you need this option, this beta would be your only option for it. As this is the main purpose for V4, more details about the signature are left to the AWS documentation.

B. On both cases, Google Cloud Storage's Documentation contradicting the SIGNED URL functioning.

In V2 Doc explicitly says: "Important: This page covers legacy material related to the V2 signing process. It is recommended that users work with the V4 signing process instead.". Even when the V4 is in Beta now (Oct 2, 2019) this should not be taken as something contradicting. It is a recommendation to use the V4.

In conclusion, you can try with the V4 since there is even a way to create the signedURL from the Gsutil

like image 58
Joss Baron Avatar answered Nov 03 '25 00:11

Joss Baron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!