Skip Menu |

This queue is for tickets about the Net-Amazon-Signature-V4 CPAN distribution.

Report information
The Basics
Id: 126025
Status: resolved
Priority: 0/
Queue: Net-Amazon-Signature-V4

People
Owner: Nobody in particular
Requestors: underspell [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.18
Fixed in: (no value)



Subject: _simplify_uri doesn't uri_encode
Requests with "," or "*" must be encoded in canonical uri . ElasticSearch requests often use this two characters. I will create a pull-request in Github Reference: https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
On Thu Ago 09 12:15:03 2018, jose.ferreira@anubisnetworks.com wrote: Show quoted text
> Requests with "," or "*" must be encoded in canonical uri . > ElasticSearch requests often use this two characters. > > I will create a pull-request in Github > Reference: https://docs.aws.amazon.com/general/latest/gr/sigv4-create- > canonical-request.html
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