Question

Receiving "SignatureDoesNotMatch" errors when using Spaces with Postman

Very similar to the other ‘SignatureDoesNotMatch’ question but having issues with Postman,

So i’m trying to use postman to gain access to my files. I’ve set up the ‘AccessKey’ and ‘SecretKey’ pair within the API section in digital ocean but constantly getting ‘<Error> <Code>SignatureDoesNotMatch</Code>…’

anyone had any luck working through postman to access object spaces?

Subscribe
Share

Just in case this might be helpful for others: you will get this error if you try connecting to a specific space’s url. Make sure you just connect to the datacenter like: nyc3.digitaloceanspaces.com then you’ll see your space(s) once connected.

braspencer your answer helped a lot!

It’s seams like DO spaces it’s not very ready for production use. They say that supported only V2 signature version, but signing with V2 also does not work.

Hi @johngannon. I would like to inform that I am having the same issues as the post author with authenticating to spaces as well using Postman with AWS Signature as authorization header. The postman interface when selecting AWS authentication accepts following parameters:

  • AccessKey
  • SecretKey
  • AWS Region (Optional)
  • Service Name (Optional)
  • Session Token (Optional)

Spaces responds with 403:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>SignatureDoesNotMatch</Code>
    <RequestId></RequestId>
    <HostId></HostId>
</Error>

Removed specific elements of course.

Is there any new information on the subject? Connecting with AWS SDK for NodeJS and PHP works fine for me, but not whilst connecting using Postman.

Regards, Erlend

Hello same issue here: Trying to PUT a bucket but it returns this error.

Can you see what is happening? Thanks.

“<?xml version=“1.0” encoding=“UTF-8”?><Error><Code>SignatureDoesNotMatch</Code><RequestId>tx0000000000000008c7c2e-005a06d039-ae42-ams3a</RequestId><HostId>ae42-ams3a-ams3</HostId></Error>”

@antoniorosado Transmit just released v.5.0.5 which has a fix/fixes that allow it to work well with Spaces. Hope this helps.

Hello there,

I’m getting the same error via Transmit 5.

@johngannon any idea when this may be solved? thanks

I’ve tried again with a new access/secret, but sadly still getting the same result. Has anyone managed to use ‘put’ with spaces via postman to create a new file?

Hi there - I’m the product manager for Spaces. Thanks for letting us know that you ran into an issue.

Would you be able to try again with a new access/secret key OR by regenerating an existing key?

We in the last few days changed how key regeneration is done (we now regenerate the access key AND the secret) and using a new keypair (or regenerating an existing one again) is the likely fix for what you’ve reported.

If for some reason that doesn’t work, please let us know.


Submit an 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.

i got it working like this:

For: get https://nlrjdata.ams3.digitaloceanspaces.com/IMG_20190308_095139597.jpg

in the postman tab authorization : Type: AWS Signature AccessKey : <KEY HERE> SecretKey : <KEY HERE> AWS Region : ams3 Service Name : s3 Session Token : myTok

Auth fails with this error when the ‘x-amz-content-sha256’ header value is not set, might be relevant

Facing same issue using SociallyDev Spaces-API

take a look at the AWS_S3_ENDPOINT_URL it must be some thing like: 'https://fra1.digitaloceanspaces.com/suhail/'

It seems by default SDK/Library uses signature v2 which does not support by the digital ocean.

Try overriding to v4

const s3 = new AWS.S3({
      accessKeyId: key,
      secretAccessKey: secret,
      endpoint: spacesEndpoint,
      region: 'sgp1',
      signatureVersion: 'v4',
});

I got it to work in Postman version 7.36.1

In the Authorization tab, I selected “AWS Signature” as the type and filled out the following: Access Key : [ my key ] Secret Key : [ my secret ] Advanced AWS Region : nyc3 (or whatever Digital Ocean region you’re using) Service Name : s3 Session Token : [leave blank]

This still seems to be an issue.

Same probleam with Postman

Was this resolved in the end please? I am using Transmit 5 and getting the SignatureDoesNotMatch error. Can see my bucket though.

Thanks

Following Node.JS code is working for me. I suspect, we need to set up minimum 4 connection parameters.

*var AWS = require('aws-sdk');
exports.getBuckets = async function(req, res) 
{
  var options = {
    'endpoint' : 'https://nyc3.digitaloceanspaces.com',
    'accessKeyId' : 'XXXX',
    'secretAccessKey' : 'YYY,
    'region' : 'nyc3'
  };
  var s3 = new AWS.S3(options);
  s3.listBuckets(function(err, data) {
    if (err) console.log(err, err.stack); // an error occurred
    else     console.log(data);           // successful response
  });
};*