Amazon Product API hmac signature?


#1

So, starting August 15th, the Amazon product web service API (the one
where you can get info about amazon products, manipulate wishlists and
shopping carts, etc), is going to require a form of cryptographic
signature on all requests.

http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/

I think I can put everything together from various gems. But it’s kind
of picky (for instance, you have to make sure to CGI-escape in exactly
the right way and not over-escape at certain points).

I’m wondering if anyone knows if anyone’s already tackled this, and
maybe has a gem with tests that’ll do it for you? Maybe part of some
larger amazon-interaction gem or something? This authentication method
has been used with other AWS apis for a while now I think. But I can’t
find anything.

If not, and I write it, do you all think it would be a good thing to
distribute as a gem? It probably won’t be very many lines of code, but
making sure you’ve got the right few lines of code that don’t have any
bugs in them is the trick.

Thanks for any advice,
Jonathan


#2

On Sun, May 10, 2009 at 6:54 PM, Jonathan R. removed_email_address@domain.invalid
wrote:

I’m wondering if anyone knows if anyone’s already tackled this, and
maybe has a gem with tests that’ll do it for you? Maybe part of some
larger amazon-interaction gem or something? This authentication method
has been used with other AWS apis for a while now I think. But I can’t
find anything.

Both RightAWS and AWS::S3 have code to sign requests. I’d start there.

Ben


#3

Hi Jonathan,

Have you found some solution to this issue? I am using ruby/aws and I
have received that my requests are not signed. I would appreciate any
help to solve this problem.

Thank you.

Jonathan R. wrote:

So, starting August 15th, the Amazon product web service API (the one
where you can get info about amazon products, manipulate wishlists and
shopping carts, etc), is going to require a form of cryptographic
signature on all requests.

http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/

I think I can put everything together from various gems. But it’s kind
of picky (for instance, you have to make sure to CGI-escape in exactly
the right way and not over-escape at certain points).

I’m wondering if anyone knows if anyone’s already tackled this, and
maybe has a gem with tests that’ll do it for you? Maybe part of some
larger amazon-interaction gem or something? This authentication method
has been used with other AWS apis for a while now I think. But I can’t
find anything.

If not, and I write it, do you all think it would be a good thing to
distribute as a gem? It probably won’t be very many lines of code, but
making sure you’ve got the right few lines of code that don’t have any
bugs in them is the trick.

Thanks for any advice,
Jonathan


#4

César Díaz wrote:

Hi Jonathan,

Have you found some solution to this issue? [signing Amazon Product API requests].
I am using ruby/aws and I
have received that my requests are not signed. I would appreciate any
help to solve this problem.

Yes, I found and adapted some code from Chris R… See my version here:

http://bibwild.wordpress.com/2009/05/18/authenticating-to-amazon-product-api-in-ruby/

I am not using ruby/aws, however. I guess ruby/aws needs to be updated
to do signing; talk to the developer of that gem, or try to figure out
how to do it yourself (perhaps guided by the code pointed to above). Or
stop using ruby/aws and do it yourself manually using the code pointed
to above.

Jonathan