ppy / s3-nginx-proxy

A lightweight kubernetes deployable nginx-based caching reverse proxy
MIT License
27 stars 4 forks source link

The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. #5

Open cybertoast opened 1 year ago

cybertoast commented 1 year ago

When using buckets that are in certain regions such as me-central-1, the server root (localhost:8080/) gets the following response:

<Error>
<Code>InvalidRequest</Code>
<Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message>
<RequestId>29VT2BYWEKE8102B</RequestId>
<HostId>7QTpAs2a6rjTMOzRZ+seQuoDyvQ5u7rSv65DMJBkjYyo7yNg9WJUaTCWwVcsbhppTt9bQNgg1do=</HostId>
</Error>

Is this a configuration to be changed in the virtualhosts.json? It seems like the generated s3-proxy.conf may also need a change, but I'm just guessing.

Any help would be greatly appreciated.

gyoza commented 9 months ago

https://stackoverflow.com/questions/26533245/the-authorization-mechanism-you-have-provided-is-not-supported-please-use-aws4


All regions support V4, but US-Standard¹, and many -- but not all -- other regions, also support the other, older scheme, Signature Version 2 ("V2").

According to http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html ... new S3 regions deployed after January, 2014 will only support V4.

Since Frankfurt was introduced late in 2014, it does not support V2, which is what this error suggests you are using.
gyoza commented 9 months ago

Would be weird if such a new project is using such old authentication methods..

smoogipoo commented 8 months ago

It's using such old authentication methods because we use Cloudflare R2.