amazonwebservices/aws-sdk-for-ruby — pull request #41 by petemounce (2012-04-24 12:30:38+00:00)
Title: Add SNS message authentication

This adds a class `lib/aws/sns/message_authenticator.rb`.

I don't know how (or where - I couldn't really find a natural place beyond `AWS::SNS#authentic_message?`...?) to plug this in to the SDK as a whole, though, and I'm not really sure how to go about testing it (though I've written some cucumber scenarios inside messages.feature). I'd appreciate some pointers regarding how you'd like those done:

* I guess I could set up a real live SNS topic inside my own AWS account and not ever delete it, for cucumber to integrate against...?
* I guess I could do similar with specs, mocking away the network trips with something like fakeweb?

(This is one of my first OSS/ruby contributions, and so I've not got my head around the tooling and conventions yet)

Also - this doesn't work with subscription confirmations; I'm not really sure why, but I noticed that one of the message fields has a new-line in it when the type == SubscriptionConfirmation, and I wonder if that screws with the canonical_string generation. I'm also not sure whether subscription-confirmations are designed to be authenticated (but I guess they are, since they're signed and have the SigningCertURL).