ConzorKingKong / cloud-storage

53 stars 13 forks source link

Using with Digital Ocean Spaces get SignatureDoesNotMatch #1

Open franciscopaniskaseker opened 5 years ago

franciscopaniskaseker commented 5 years ago

I know you make this project to work with Amazon S3, but Digitan Ocean Space is compatible with V4Signer and, in theory, with S3 environment.

I builded your project and when I try to connect on Digital Ocean I get "SignatureDoesNotMatch" con cloudflare worker editor. I saw a lot of other projects (like s3cmd and softwares that use aws-sdk) getting the same error. I tested some solutions, but them not worked here. I think is not a V4Signer problem, maybe some header is wrong. I think I am not receiveing the true about what is happening on digital ocean spaces authentication.

I tried set appendSessionToken, allHeaders and singleEncode, but with no success. I get "Access denied" when signQuery is true.

I am using the right credentials and these attributions:

n = "jeanie",
r = ".nyc3.digitaloceanspaces.com",
a = new i.AwsClient({
            accessKeyId: "xxxxxxxxxxx",
            secretAccessKey: "xxxxxxxxxxxxx",
            region: "nyc3"          
        });

If I can guarantee:

What other problems can generate this error?

franciscopaniskaseker commented 5 years ago

Fixed:

Must be configure service parameter:

            service: "s3"          

together with region var.