Skip to content
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

Invalid signature for service "ProductAdvertisingAPI" due to downcasing of service name #41

Open
dallagi opened this issue Feb 7, 2021 · 0 comments · May be fixed by #42
Open

Invalid signature for service "ProductAdvertisingAPI" due to downcasing of service name #41

dallagi opened this issue Feb 7, 2021 · 0 comments · May be fixed by #42

Comments

@dallagi
Copy link

dallagi commented Feb 7, 2021

Hello,
Thanks a lot for developing this library.

When trying to authenticate a request (by signing headers) to the ProductAdvertisingAPI service, AWS always responds with error 401: InvalidSignature.

After some digging, I noticed that this is caused by this line in the AWSAuth.AuthorizationHeader.sign/9 function:

service = String.downcase(service)

If I comment that line, AWS responds back with a successful response (200 OK).

I'm not sure if downcasing the service name is required for other use cases, but if it's not needed and this is indeed a bug, please let me know and I will submit a PR to fix it :)

EDIT: Submitted a PR in case it may be useful

@dallagi dallagi linked a pull request Feb 7, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant