Environment details
- OS type and version:
- Python version: Python 3.8.6
- pip version:
pip 20.3.3
google-cloud-storage version: Version: 1.37.1
Steps to reproduce
- Generate a signed url with an expiration of more than 7 days in the future
- Save it
- Wait for 7+ days
- Try to access the URL
Code example
expiration = timedelta(seconds=45*86400) #45 days
signed_url = blob.generate_signed_url(
expiration=expiration,
service_account_email=service_account_email,
access_token=credentials.token,
)
Stack trace
After 7 days accessing the URL will result in this error:
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.</Message>
<StringToSign>GET 1629488504 /BUCKET_NAME/inspection-media/DSC00095.JPG</StringToSign>
</Error>
This used to work, but the documentation recently updated here, to include a warning instead of just saying
https://cloud.google.com/storage/docs/access-control/signed-urls-v2
This is a big issue for us. We generate exports of data including spreadsheets. Our customers want the access in these exports to work for more than 7 days.
Environment details
pip 20.3.3google-cloud-storageversion:Version: 1.37.1Steps to reproduce
Code example
Stack trace
After 7 days accessing the URL will result in this error:
This used to work, but the documentation recently updated here, to include a warning instead of just saying
https://cloud.google.com/storage/docs/access-control/signed-urls-v2
This is a big issue for us. We generate exports of data including spreadsheets. Our customers want the access in these exports to work for more than 7 days.