Report this

What is the reason for this report?

Digital Ocean Spaces API returns SignatureDoesNotMatch for Simple List Request

Posted on June 24, 2020

I’m running into an issue whereby the simplest request I could think of (just listing a bucket) fails with the dreaded SignatureDoesNotMatch error message. I was using a non-standard library, so I figured I’d try to reconstruct the request with bash/openssl/cURL to see what was happening. It appears that I’m still running into the issue.

Example error output:

<?xml version="1.0" encoding="UTF-8"?><Error><Code>SignatureDoesNotMatch</Code><RequestId>tx00000000000004cfeff77-005ef3b1ce-265622-nyc3b</RequestId><HostId>265622-nyc3b-nyc-zg02</HostId></Error>

The script I’m running: https://gist.github.com/akesling/e7c12e76fb2a9e6711d67cfe30d9d2fb

Note that the documentation seems to indicate that this (i.e. authing with AWSv4 signature requests) should work. See specifically the Authentication section of the official Spaces documentation page https://developers.digitalocean.com/documentation/spaces/#authentication.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

The SignatureDoesNotMatch error typically occurs due to an issue with the signing process, which is a sensitive part of sending requests to Spaces. It’s essential to ensure that your signing process is compliant with the AWS v4 Signature Specifications.

One common reason for this error is a mismatch in the region specified in the signing process and the actual bucket’s region. Ensure that they match for a successful request.

From the script you shared, it’s hard to identify the root of the issue without more specifics about your environment and request. However, I suggest using the official AWS SDKs for interacting with Spaces, whenever possible. They automatically handle signing the requests as required.

For further investigation, here’s a link to the DigitalOcean Spaces Documentation, which provides a detailed guide on how to use various SDKs and examples for troubleshooting issues.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.