soto: @ in key for certain operations causes SignatureDoesNotMatch error
Describe the bug
When the @ sign is present in the key for certain operations the resulting request comes back with SignatureDoesNotMatch: The request signature we calculated does not match the signature provided. Check the Secret Access Key and signing method.
To Reproduce
let awsClient = AWSClient(
credentialProvider: .static(accessKeyId: ..., secretAccessKey: ...),
httpClientProvider: .createNew
)
let myS3 = S3(client: awsClient, region: ..., partition: .aws, endpoint: ...)
let newObjectRequest = S3.PutObjectRequest(
bucket: "bucket",
key: "some/thing/abc@def"
)
do {
let response = try await myS3.putObject(newObjectRequest)
} catch {
print(error)
}
Expected behavior The request signature would be valid.
Setup (please complete the following information):
- OS: macOS & Linux
- Version of soto: v5.13.1
- Authentication mechanism : hard-coded credentials
Additional context Tried with another client and it worked as expected. Tried to identify where in the code this signature creation problem would reside so I could just PR you something but I could not figure it out.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 42 (42 by maintainers)
Yes ty I saw right away since it includes my other PR 😉
Also the fact that this is a release will make things much easier for me since I will be able to pin to a version and not just
main
(I do hope to close this issue by EOD)
There was a change to that recently. Maybe it broke something. I’ll look into it tomorrow