aws-actionmailbox-ses 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/app/controllers/action_mailbox/ingresses/ses/inbound_emails_controller.rb +3 -2
- data/lib/aws/action_mailbox/ses/engine.rb +2 -0
- data/lib/aws/action_mailbox/ses/s3_client.rb +5 -1
- data/lib/aws/action_mailbox/ses/sns_notification.rb +9 -2
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c81a3cc0b639c90ccd81bcf1540c60685adfa3c083280e70637bdc00721b851
|
|
4
|
+
data.tar.gz: 830df5c1ba13c70751f7162c9257583471102a05578b71ebda5691e13f88a07c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b97ef893bfcfcfa0653751789b1e377c3f6e4ed9d8f812675e6211ec098e0076d24ad9c9e1bec11ac9ae40d005232e4322f81d4c532ca43546a63388c4d8182a
|
|
7
|
+
data.tar.gz: bac6961f43f0cf4e686996e4933d5f72008cd4fbd8af7d77b1ca4ce3e798b6a668cd41bec6a9270a27bc9b994c819132695b1fcfb3398285e11dd36a35239448
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
0.2.0 (2026-04-28)
|
|
2
|
+
------------------
|
|
3
|
+
|
|
4
|
+
* Feature - Support client-side-encrypted inbound objects via configurable `s3_client`, with optional `decrypt_fallback_to_plain` for mixed buckets (#5)
|
|
5
|
+
|
|
6
|
+
0.1.1 (2026-03-31)
|
|
7
|
+
------------------
|
|
8
|
+
|
|
9
|
+
* Fix - Prevent duplicate response errors when handling invalid or malformed SES inbound email requests. (#7)
|
|
10
|
+
|
|
1
11
|
0.1.0 (2024-11-16)
|
|
2
12
|
------------------
|
|
3
13
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.2.0
|
|
@@ -34,7 +34,7 @@ module ActionMailbox
|
|
|
34
34
|
before_action :verify_authenticity, :validate_topic, :confirm_subscription
|
|
35
35
|
|
|
36
36
|
def create
|
|
37
|
-
head :bad_request unless notification.message_content.present?
|
|
37
|
+
return head :bad_request unless notification.message_content.present?
|
|
38
38
|
|
|
39
39
|
ActionMailbox::InboundEmail.create_and_extract_message_id!(notification.message_content)
|
|
40
40
|
head :no_content
|
|
@@ -43,7 +43,8 @@ module ActionMailbox
|
|
|
43
43
|
private
|
|
44
44
|
|
|
45
45
|
def verify_authenticity
|
|
46
|
-
head :bad_request unless notification.present?
|
|
46
|
+
return head :bad_request unless notification.present?
|
|
47
|
+
|
|
47
48
|
head :unauthorized unless notification.verified?
|
|
48
49
|
end
|
|
49
50
|
|
|
@@ -9,6 +9,8 @@ module Aws
|
|
|
9
9
|
class Engine < ::Rails::Engine
|
|
10
10
|
config.action_mailbox.ses = ActiveSupport::OrderedOptions.new
|
|
11
11
|
config.action_mailbox.ses.s3_client_options ||= {}
|
|
12
|
+
config.action_mailbox.ses.s3_client ||= nil
|
|
13
|
+
config.action_mailbox.ses.decrypt_fallback_to_plain ||= false
|
|
12
14
|
|
|
13
15
|
initializer 'aws-sdk-rails.mount_engine' do |app|
|
|
14
16
|
app.routes.append do
|
|
@@ -49,13 +49,20 @@ module Aws
|
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def s3_content
|
|
52
|
-
|
|
53
|
-
.client
|
|
52
|
+
fetch_client
|
|
54
53
|
.get_object(key: key, bucket: bucket)
|
|
55
54
|
.body
|
|
56
55
|
.string
|
|
57
56
|
end
|
|
58
57
|
|
|
58
|
+
def fetch_client
|
|
59
|
+
cfg = ::Rails.configuration.action_mailbox.ses
|
|
60
|
+
return S3Client.client unless cfg.decrypt_fallback_to_plain && cfg.s3_client
|
|
61
|
+
|
|
62
|
+
meta = S3Client.client_plain.head_object(key: key, bucket: bucket).metadata || {}
|
|
63
|
+
meta.key?('x-amz-key-v2') || meta.key?('x-amz-key') ? S3Client.client : S3Client.client_plain
|
|
64
|
+
end
|
|
65
|
+
|
|
59
66
|
def message
|
|
60
67
|
@message ||= JSON.parse(notification[:Message], symbolize_names: true)
|
|
61
68
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws-actionmailbox-ses
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Amazon Web Services
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: aws-sdk-s3
|
|
@@ -88,7 +87,6 @@ homepage: https://github.com/aws/aws-actionmailbox-ses-ruby
|
|
|
88
87
|
licenses:
|
|
89
88
|
- Apache-2.0
|
|
90
89
|
metadata: {}
|
|
91
|
-
post_install_message:
|
|
92
90
|
rdoc_options: []
|
|
93
91
|
require_paths:
|
|
94
92
|
- lib
|
|
@@ -103,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
103
101
|
- !ruby/object:Gem::Version
|
|
104
102
|
version: '0'
|
|
105
103
|
requirements: []
|
|
106
|
-
rubygems_version: 3.
|
|
107
|
-
signing_key:
|
|
104
|
+
rubygems_version: 3.6.9
|
|
108
105
|
specification_version: 4
|
|
109
106
|
summary: ActionMailbox integration with SES
|
|
110
107
|
test_files: []
|