ex-aws / ex_aws

A flexible, easy to use set of clients AWS APIs for Elixir
https://hex.pm/packages/ex_aws
MIT License
1.26k stars 521 forks source link

[New Feature?] AWS Signature validation #808

Open wmnnd opened 2 years ago

wmnnd commented 2 years ago

Hey there,

maybe I’ve missed an existing feature, but it seems to me that currently ExAWS doesn’t have a public function for validating the signature in JSON messages from AWS, particularly from SNS Notifications. Is this a feature you think might make sense including in ExAWS?

It’s pretty straightforward, but I think making it available as part of the ExAWS project might benefit other users as well. Here’s how I implemented it: https://github.com/pentacent/keila/blob/09e2b02738e6dc00654a843f94004292039f300f/lib/keila/mailings/sender_adapters/ses.ex#L48

If you think this might be worthwhile for ExAWS, let me know which of the submodules (if any) would be right for adding this feature and I’ll be happy to prepare a PR :-)

bernardd commented 2 years ago

Hi @wmnnd - apologies for the delay getting back to you. Do you know which services make use of that signature system? If it's more than one or two then it seems like it would make sense to just stick it in here in the core ExAws library. Since we've already got an ExAws.Auth.Signatures, that would seem like the logical place to put it. Thanks!