drewblas / aws-ses

Provides an easy ruby DSL & interface to AWS SES
MIT License
549 stars 108 forks source link

:signature_version not using V4 signing #76

Closed jasonblanchard closed 4 years ago

jasonblanchard commented 4 years ago

After doing some testing with configuration like this, this gem does not appear to be using the v4 signing method despite passing in the :signature_version => 4

It looks like this might be happening because this line https://github.com/drewblas/aws-ses/blob/532ab658a6f2a662759de148293a8b5276f85153/lib/aws/ses/base.rb#L180 stringifies the signature_version which then gets compared to an integer when checking the conditional down here https://github.com/drewblas/aws-ses/blob/532ab658a6f2a662759de148293a8b5276f85153/lib/aws/ses/base.rb#L199. As written, I don't think this will ever take the v4 signing path.

It looks like this might have been introduced right here https://github.com/drewblas/aws-ses/commit/f4ef27d55461531c7c198c7f348f576fc099ae05#diff-b36a5e73febe42aa0b75b3a526a815d1L191 when the "v" got dropped maybe?

lvangool commented 4 years ago

Given the deprecation <v4 today, @drewblas would you be able to emergency patch this? "Amazon Simple Email Service is ending support for Signature Version 3 effective September 30"

Update: Given the close timing, I've switched to the aws-sdk-rails gem

drewblas commented 4 years ago

Thank you for the quick lead! I've released the fix - https://rubygems.org/gems/aws-ses/versions/0.7.1