aws-sdk-resources 2.10.32 → 2.10.33
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/lib/aws-sdk-resources/services/sns/message_verifier.rb +14 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0cbfb3ad80f3d3d96924da7351ffa2965382b96
|
4
|
+
data.tar.gz: 7a205c2eecc83d2539cd1573a0a9d11ad99e269f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49f0a62c435c65d0daaf29361de975e0570fb2c55fb068c028e0a3799c4638534ff89207b8c51dfb8b85f39a367cf21c405d64e5a803a8c050e0909983953e1e
|
7
|
+
data.tar.gz: db2f56e4c5a13b9fc04a5a765961f38496978f26216e11cd6150269469e40f23cbb7af825ff8605a5975aa2aca3f11a8e4d2169dea5d58bf919ef1dc17f71a35
|
@@ -59,6 +59,7 @@ module Aws
|
|
59
59
|
# verification.
|
60
60
|
def authenticate!(message_body)
|
61
61
|
msg = Json.load(message_body)
|
62
|
+
msg = convert_lambda_msg(msg) if is_from_lambda(msg)
|
62
63
|
if public_key(msg).verify(sha1, signature(msg), canonical_string(msg))
|
63
64
|
true
|
64
65
|
else
|
@@ -69,6 +70,19 @@ module Aws
|
|
69
70
|
|
70
71
|
private
|
71
72
|
|
73
|
+
def is_from_lambda(message)
|
74
|
+
message.key? 'SigningCertUrl'
|
75
|
+
end
|
76
|
+
|
77
|
+
def convert_lambda_msg(message)
|
78
|
+
cert_url = message.delete('SigningCertUrl')
|
79
|
+
unsubscribe_url = message.delete('UnsubscribeUrl')
|
80
|
+
|
81
|
+
message['SigningCertURL'] = cert_url
|
82
|
+
message['UnsubscribeURL'] = unsubscribe_url
|
83
|
+
message
|
84
|
+
end
|
85
|
+
|
72
86
|
def sha1
|
73
87
|
OpenSSL::Digest::SHA1.new
|
74
88
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.10.
|
19
|
+
version: 2.10.33
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.10.
|
26
|
+
version: 2.10.33
|
27
27
|
description: Provides resource oriented interfaces and other higher-level abstractions
|
28
28
|
for many AWS services. This gem is part of the official AWS SDK for Ruby.
|
29
29
|
email:
|