browsertrix
browsertrix copied to clipboard
[Bug]: Incorrectly using Signature v2 API for generating presigned URLs in Backblaze B2
Browsertrix Version
v1.14.3-9466e83
What did you expect to happen? What happened instead?
The presigned get url to access Backblaze B2 seems use Signature v2 API rather than v4, leading to the access error.
Similar issues (1 2) can be found during my search, it seems that we just need to add a specific version signature_version='s3v4' here:
https://github.com/webrecorder/browsertrix/blob/d8365c734ff6bdb0edc0e248164eec0cbc577cd8/backend/btrixcloud/storages.py#L298
Reproduction instructions
- crawl a website
- try to open the saved WACZ file
- redirect to https://s3.eu-central-003.backblazeb2.com/bucketname/731fds5ds63-ffdssc-4bd4-89b0-f43f77ds9fs8/2025055234354382-f153420-e54-0.wacz?AWSAccessKeyId=05435431345a54300002e&Signature=o154343543oZ%2F3543753jY0%3D&Expires=1742109825 (edited) and have
<Error>
<Code>UnauthorizedAccess</Code>
<Message>bucket is not authorized: bucketname</Message>
</Error>
Screenshots / Video
No response
Environment
No response
Additional details
No response