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

IncompleteSignature with lastest version 0.7.1 #78

Open
dcomihual opened this issue Sep 30, 2020 · 21 comments
Open

IncompleteSignature with lastest version 0.7.1 #78

dcomihual opened this issue Sep 30, 2020 · 21 comments

Comments

@dcomihual
Copy link

I upgraded the gem to the last release, and now when I send an email I receive this error message.

IncompleteSignature - Request must contain a signature that conforms to AWS standards

/.rvm/gems/ruby-2.3.3/gems/aws-ses-0.7.1/lib/aws/ses/base.rb:190:in `request'"

@rickpastoor
Copy link

Same here. Reverted to 0.7.0 but I guess there the signing isn't working correctly.

@crazyoptimist
Copy link

Same issue here.
0.7.0 works fine.

@svmax
Copy link

svmax commented Nov 2, 2020

@drewblas I have reworked a little sigv4 generation. Now it works well...

svmax added a commit to zebitex/aws-ses that referenced this issue Nov 2, 2020
@svmax
Copy link

svmax commented Nov 2, 2020

PR is here ^^^

@svmax
Copy link

svmax commented Nov 2, 2020

@drewblas Could you check and make new release tag?

@crazyoptimist
Copy link

Nice work @svmax
I'd rather recommend not to run lint IMHO.
Because your lint config is different from the author's one, which makes it a little bit difficult to review only real changes in the PR.

@svmax
Copy link

svmax commented Nov 2, 2020

@crazyoptimist yeah, well let's turn back a whitespace batch))

svmax added a commit to zebitex/aws-ses that referenced this issue Nov 3, 2020
…ad; changed delivery service on canonical (which is used by aws-core); request method has been redesigned to allow them to be signed during encryption;
@svmax
Copy link

svmax commented Nov 3, 2020

So, gentlemen (@crazyoptimist @drewblas), where we are and what was done:
Efficient AWS SES sigv4 generation based on given payload; changed delivery service on canonical (which is used by aws-core); request method has been redesigned to allow headers and payload to be signed during encryption + changed helper methods for sigv4 generation.

I hope this is more than enough to allow this feature to be merged and placed as a release tag

@rickpastoor
Copy link

Gentlemen, do you happen to have an update on this? I'd love to move to the new signature version.

@zealot128
Copy link

Tried @svmax PR #79 - seems to work now without the error!
Hopefully the AWS warning emails will come to an end now.

For reference for other interested parties:

  • I've added signature_version 4 to the credentials:
 ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base, secrets...ses_credentials.merge(signature_version: 4)

And referenced the fork as a Gem:

# TODO: https://github.com/drewblas/aws-ses/pull/79
gem "aws-ses", git: "https://github.com/zebitex/aws-ses.git", ref: "78-sigv4-problem"

Until version >= 0.7.2 will be released.

@Xtinct
Copy link

Xtinct commented Feb 25, 2021

Any updates on this? It seems V3 signature will be turned off on Feb 28.

@crazyoptimist
Copy link

@drewblas
Could you merge and publish the patch?
Or grant maintenance permission to someone else?
I'm waiting for this patch!

@toddnestor
Copy link

I am also waiting for this patch, would appreciate the new version getting published

@eni9889
Copy link

eni9889 commented Mar 30, 2021

@drewblas I am facing the same issue. Any updates on when this will be merged?

@crazyoptimist
Copy link

And referenced the fork as a Gem:

TODO: #79

gem "aws-ses", git: "https://github.com/zebitex/aws-ses.git", ref: "78-sigv4-problem"
Until version >= 0.7.2 will be released.

In case you missed this. @eni9889

@dnalbach
Copy link

dnalbach commented Mar 31, 2021

Thank you @svmax for the fix and @crazyoptimist for showing how to reference the PR.

I hate to say it folks, but @drewblas appears to be MIA. I can't find any activity since November, five months ago.

I decided to go ahead and switch to the official aws-sdk-rails gem instead of waiting to see how this turns out. Using it was as simple as this gem, the initializer file was just:

creds = Aws::Credentials.new(ENV['RAILS_SES_ACCESS_KEY_ID'], ENV['RAILS_SES_SECRET_ACCESS_KEY'])

Aws::Rails.add_action_mailer_delivery_method(
  :ses,
  credentials: creds,
  region: 'us-east-1'
)

The aws-sdk-rails is a just a wrapper for the ruby SDK, which is using v4 signatures by default, as verified when we deployed the gem change to production today.

@geronimo-dlm
Copy link

Thanks a lot, @dnalbach that worked for me as well.

@Gauravbtc
Copy link

Thank you @svmax for the fix and @crazyoptimist for showing how to reference the PR.

I hate to say it folks, but @drewblas appears to be MIA. I can't find any activity since November, five months ago.

I decided to go ahead and switch to the official aws-sdk-rails gem instead of waiting to see how this turns out. Using it was as simple as this gem, the initializer file was just:

creds = Aws::Credentials.new(ENV['RAILS_SES_ACCESS_KEY_ID'], ENV['RAILS_SES_SECRET_ACCESS_KEY'])

Aws::Rails.add_action_mailer_delivery_method(
  :ses,
  credentials: creds,
  region: 'us-east-1'
)

The aws-sdk-rails is a just a wrapper for the ruby SDK, which is using v4 signatures by default, as verified when we deployed the gem change to production today.

@dnalbach

I am also using this aws-sdk-rails for sending mail but still getting below error :

~/.rvm/gems/ruby-2.4.9/gems/aws-sdk-dynamodb-1.16.0/lib/aws-sdk-dynamodb/client_api.rb:1110:in block in module:ClientApi': undefined method endpoint_operation=' for #<Seahorse::Model::Api> (NoMethodError)

I am using below versions :
Ruby : 2.4.1
Rails: 5.2.0
and aws-sdk-rails 3.6.0

Do you have any idea why this error occurs. If you need more information I can give you.

Thanks in advanced

@dnalbach
Copy link

dnalbach commented Apr 1, 2021

@dnalbach

I am also using this aws-sdk-rails for sending mail but still getting below error :

~/.rvm/gems/ruby-2.4.9/gems/aws-sdk-dynamodb-1.16.0/lib/aws-sdk-dynamodb/client_api.rb:1110:in block in module:ClientApi': undefined method endpoint_operation=' for #<Seahorse::Model::Api> (NoMethodError)

I am using below versions :
Ruby : 2.4.1
Rails: 5.2.0
and aws-sdk-rails 3.6.0

Do you have any idea why this error occurs. If you need more information I can give you.

Thanks in advanced

I'm, sorry, I do not. I can tell you that we are using the following versions and are not experiencing that error:

  • Ruby 2.6.3
  • Rails 5.2.5
  • aws-sdk-rails 3.6.0

We do not use DynamoDB in Rails and have no configuration for it.

I did a quick Google search and see an old issue for that in the aws-sdk-ruby, which is what the aws-sdk-rails wraps, that was resolved many years ago:
aws/aws-sdk-ruby#1033

Obviously there is a difference between your Rails instance and ours. It does seem odd that your error is for a Ruby 2.4.9 gem when you are using 2.4.1 according to your post. You might try updating the patch version of your Ruby to latest 2.4.10 and see if that makes a difference.

If you were on the same version of Ruby and Rails and still getting it, we'd know it was configuration, but it would be pretty hard to pin down the specific config differences.

My advice would be to file an issue in either the aws-sdk-rails or aws-sdk-ruby Github projects. Both are very active projects, with the ruby one being extremely active.

@abitrolly
Copy link

@drewblas is lurking, but active.

image

I am preparing to deploy 0.7.1 on production, because it seems we are loosing mails, because of Amazon "progressive rejection". If that fails, I will be upset. Not with @drewblas, but with Amazon not being able to compensate to @drewblas the hours he spent on supporting Amazon clients.

@abitrolly
Copy link

Got the same error, and switched to aws-sdk-ruby #78 (comment) thanks everyone who helped to solve this.

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

No branches or pull requests