Backblaze B2 Worker inaccessible | "SignatureDoesNotMatch" error

I’m following a tutorial from Backblaze to front my B2 bucket through a Cloudflare Worker as a CDN. They verified I have followed all the steps correctly but any files I try to access result in a “SignatureDoesNotMatch” error. Backblaze helped as much as they were able to but eventually had to direct me to Cloudflare for further support. I’m using the following guide: https://www.backblaze.com/docs/cloud-storage-deliver-private-backblaze-b2-content-through-cloudflare-cdn

Here are the steps I have performed:

  1. Created public Backblaze Bucket and accompanying Application Key
  2. Created Cloudflare Worker using Wrangler.
wrangler generate my-cdn https://github.com/backblaze-b2-samples/cloudflare-b2
cd my-cdn
nano wrangler.toml

Here I have set the appropriate environment variables pointing to my bucket, used $host for the BUCKET_NAME environment variable, true for ALLOW_LIST_BUCKET and then set the B2_APPLICATION_KEY environment variable using secrets:

echo "<my b2 application key>" | wrangler secret put B2_APPLICATION_KEY
wrangler deploy
  1. I was able to check a known URL for a file in the bucket but replacing the backblaze domain with my *.workers.dev domain. This resulted in the “SignatureDoesNotMatch” error.
  2. I add a Custom Domain to the Worker in case that would make a difference. The domain being media.example.com. I check that, and also get the “SignatureDoesNotMatch” error here.

At this point Backblaze seem to be stumped, and direct me here for further assistance.

2 Likes

I can confirm the same behavior with an existing wrangler deployment that originally was working until about 12-24 hours ago today.

same here. It was working hours ago. And now its not working anymore …

Same problem here!

When I run wrangler on my local machine, I am able to access the files store into backblaze.

However, when I deploy the exact same script to cloudflare, it is not working anymore!

Here is the solution! https://github.com/backblaze-b2-samples/cloudflare-b2/pull/4

Interesting - something must have changed at Cloudflare for it to suddenly stop working! I’ll review and merge the PR as soon as I can.

PR is merged into main.