On Thu Ago 09 12:15:03 2018, jose.ferreira@anubisnetworks.com wrote:
Show quoted text
Well a simple implementation will break a lot of tests
Looking at official AWS SDKs ( python, php and Javascript )
https://github.com/boto/botocore/blob/4cf5550c02cfc5e548d152b407defd09ee304510/botocore/auth.py#L309
https://github.com/aws/aws-sdk-php/blob/1c177a8a312afbd1103079677132133a4ab0133a/src/Signature/SignatureV4.php#L175
https://github.com/aws/aws-sdk-js/blob/ef10482481ea827f88c4f3cd8311024fb75f32e6/lib/signers/v4.js#L118
https://github.com/aws/aws-sdk-js/blob/ebe83921863f1eb020b6a07ef471f2017cd58550/lib/util.js#L53
There are different ways to approach the problem. Some just split by '/', encode the elements and join back. Others just encode everything except '/' and the python one encodes everything but '/' and '~'.
So there is not a lot of consistency among implementations but all differ from the Net::Amazon::Signature::V4.
I'm keen to follow the Javascript as reference .
Any thoughts?
José Borges Ferreira