-
Notifications
You must be signed in to change notification settings - Fork 499
[InvalidRequest] The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256 #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
vote++. This would be very useful. |
vote++ |
vote++ |
Someone would need to implement the new hashing algorithm described at http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html / http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html - Currently I didn't manage to do so… |
Example implementation: https://github.com/chrismeller/awstools/blob/master/aws/signature/v4.php |
AWS4-HMAC-SHA256 - described here http://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html |
I actually started work on this, and got the signature in the header working. Then I spotted the requirement that if you use this signature, then there's also a requirement to sign the payload with a new hash too - and doing this for multipart uploads had another complicating factor as well. At that point, I decided to instead switch to the official AWS PHP SDK as a better long-term option. I created a compatibility layer that was sufficient for the use-case of my code, but won't handle a lot of other scenarios - but it may be useful for others to consult if they decide to port over to the AWS SDK; it's here: http://plugins.svn.wordpress.org/updraftplus/trunk/includes/S3compat.php |
I found that when you create a bucket from this package, it work perfectly. When I use a bucket name created in the regions "Frankfurt" I got an error |
@bouusoou: Which package are you referring to as "this package" ? tpyo's class, or mine? |
tpyo's class. I am a bit confused with yours and did not use it in the end, because tpyo's was. I think call should look like this: $compat=new UpdraftPlus_S3_Compat; |
+1 on this |
Also run into this today. Using the official SDK kit is no option for me as it imho requires PHP 5.5 and my code has to run on PHP 5.3.10+. |
"it imho requires PHP 5.5" The 2.x branch of the official SDK is still maintained, and requires PHP 5.3.3+ : https://github.com/aws/aws-sdk-php/tree/2.8 |
Thanks! Didn't know that. |
Sorry everyone, I haven't been able to look into this. Would anyone be willing to work on a PR? |
unfortunately I dont have the time to fix up the code and make a PR but I'd like to +1 this Edit: now I saw there is PR #122 which looks quite promising on first glance |
Hi,
I use the new location "Franckfurt" for my bucket and Amazon use the new signature version 4 only.
Can you adapt your code for this version ?
Thx.
The text was updated successfully, but these errors were encountered: