grafana / k6-jslib-aws

Javascript Library allowing to interact with AWS resources from k6 scripts
Apache License 2.0
18 stars 28 forks source link

Signature does not match when S3 object has special symbols in path #78

Closed nickcaballero closed 1 month ago

nickcaballero commented 8 months ago

Calling getObject or listObjects on the S3 client with a URL that has a = in the path fails. According to diagram from AWS documentation, the URI should also be encoded, except for forward slashes.

diagram

Using folder structures like bucket/state=fl/city=orlando/data.json is fairly common.

nickcaballero commented 8 months ago

I have a commit that seems to fix it, but it needs more testing, and we may want to rename the uriEscapePath to something else since it's a bit of a misnomer.

oleiade commented 8 months ago

Sounds good, I've checked your commit, seems sound, but I'll test it more thoroughly once a PR is opened. Thanks a lot for taking the time to fix it 🙇🏻

oleiade commented 1 month ago

Hey @nickcaballero, I believe this is fixed by version v0.12.3 where we explicitly addressed the URI encoding/double encoding scenarios involving spaces and special characters.

I will close this as a result, but please feel free to take it for a spin, and if you still find breaking use cases, let us know, and we'll reopen it 🙇🏻