aws-sdk-resources 2.10.32 → 2.10.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89500f1018dd4762beb5ddb7e8944ff6ee34f453
4
- data.tar.gz: ffcb913895a7b91781294da8ba6b742197b61e5a
3
+ metadata.gz: d0cbfb3ad80f3d3d96924da7351ffa2965382b96
4
+ data.tar.gz: 7a205c2eecc83d2539cd1573a0a9d11ad99e269f
5
5
  SHA512:
6
- metadata.gz: 9ea4d7e5ff26e05dc14459516e9db36b8c95d11a298e4ad511edc13e6f21b694c18ddedb648e3c23869129a4fbce20be08eb21a3ddc6dea30291989eff836d5e
7
- data.tar.gz: 0ff725761d7ccaab6e173b2d06c8773b8d6e7dddaad7c95fedd8dd9b2c8b44613a581a4bbca2f4c2370a7aba02e8db377d3e7870ccab87201d2dcc64a6a7a1dd
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.32
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-23 00:00:00.000000000 Z
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.32
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.32
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: