Forum: Ruby Amazon Product API hmac signature?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0f50b9a2ad85666d537d39bda49327ee?d=identicon&s=25 Jonathan Rochkind (jrochkind)
on 2009-05-11 03:54
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/AWSECommerceServ...

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
90a73d9875462aaa9fab2feffafbffe7?d=identicon&s=25 Ben Bleything (Guest)
on 2009-05-11 04:18
(Received via mailing list)
On Sun, May 10, 2009 at 6:54 PM, Jonathan Rochkind <rochkind@jhu.edu>
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
4b7968d41ad6bbb107921b44db2b17c3?d=identicon&s=25 César Díaz (cesardiaz)
on 2009-08-10 10:54
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 Rochkind 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/AWSECommerceServ...
>
> 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
0f50b9a2ad85666d537d39bda49327ee?d=identicon&s=25 Jonathan Rochkind (jrochkind)
on 2009-09-01 16:17
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 Roos. See my version here:

http://bibwild.wordpress.com/2009/05/18/authentica...

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
This topic is locked and can not be replied to.