aws-sdk-core 3.54.0 → 3.54.1

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: '04595a7828c9ea3ecb9f9e7818f0a7f7cde55947'
4
- data.tar.gz: 0e545e952bf847b829f308cff87a858b3d7c684b
3
+ metadata.gz: 24cb9e06888263cefa4e4a212c839fe1ee05687c
4
+ data.tar.gz: 37fdd75c57009fa6af05c989b6d710519be4753f
5
5
  SHA512:
6
- metadata.gz: 709831f76f27d68b8d9b9be58062390ebf9f64eca3ac34c5c0ff59c75ac06868885e0cfd61b0411a56a4e8ca26e15acf38ca653fd161d9b23ea51a503b5f8a68
7
- data.tar.gz: 4355687a52ce970a8aec7b14d34c138ac97d2a689d7f72a30339f6ec41eff07001500fff563bf47d7a85c566b34adf4cf11297cd6cb909c0d0e7e9a93febbcb5
6
+ metadata.gz: bbbf82e798fff14b4fc3e6d4496a7f060dc27b3861d8e010d04966f0caca63113c2f164b641f4a9052cf124dff681f3c0407564f46edd06b5e80daad19bfc30b
7
+ data.tar.gz: ed1f2a3753da4909fa5a3ac9efe9164140ce424c06593c728b6e74e15c3701daab14e0f992577116369743c90a43264b5144fcea4697da0e8d15322574497189
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.54.0
1
+ 3.54.1
@@ -78,14 +78,18 @@ module Aws
78
78
  # Retry loading credentials up to 3 times is the instance metadata
79
79
  # service is responding but is returning invalid JSON documents
80
80
  # in response to the GET profile credentials call.
81
- retry_errors([JSON::ParserError, StandardError], max_retries: 3) do
82
- c = JSON.parse(get_credentials.to_s)
83
- @credentials = Credentials.new(
84
- c['AccessKeyId'],
85
- c['SecretAccessKey'],
86
- c['Token']
87
- )
88
- @expiration = c['Expiration'] ? Time.iso8601(c['Expiration']) : nil
81
+ begin
82
+ retry_errors([JSON::ParserError, StandardError], max_retries: 3) do
83
+ c = JSON.parse(get_credentials.to_s)
84
+ @credentials = Credentials.new(
85
+ c['AccessKeyId'],
86
+ c['SecretAccessKey'],
87
+ c['Token']
88
+ )
89
+ @expiration = c['Expiration'] ? Time.iso8601(c['Expiration']) : nil
90
+ end
91
+ rescue JSON::ParserError
92
+ raise Aws::Errors::MetadataParserError.new
89
93
  end
90
94
  end
91
95
 
@@ -40,6 +40,15 @@ module Aws
40
40
  end
41
41
  end
42
42
 
43
+ # Raised when InstanceProfileCredentialsProvider or
44
+ # EcsCredentialsProvider fails to parse the metadata response after retries
45
+ class MetadataParserError < RuntimeError
46
+ def initialize(*args)
47
+ msg = "Failed to parse metadata service response."
48
+ super(msg)
49
+ end
50
+ end
51
+
43
52
  # Raised when a `streaming` operation has `requiresLength` trait
44
53
  # enabled but request payload size/length cannot be calculated
45
54
  class MissingContentLength < RuntimeError
@@ -69,14 +69,18 @@ module Aws
69
69
  # Retry loading credentials up to 3 times is the instance metadata
70
70
  # service is responding but is returning invalid JSON documents
71
71
  # in response to the GET profile credentials call.
72
- retry_errors([JSON::ParserError, StandardError], max_retries: 3) do
73
- c = JSON.parse(get_credentials.to_s)
74
- @credentials = Credentials.new(
75
- c['AccessKeyId'],
76
- c['SecretAccessKey'],
77
- c['Token']
78
- )
79
- @expiration = c['Expiration'] ? Time.iso8601(c['Expiration']) : nil
72
+ begin
73
+ retry_errors([JSON::ParserError, StandardError], max_retries: 3) do
74
+ c = JSON.parse(get_credentials.to_s)
75
+ @credentials = Credentials.new(
76
+ c['AccessKeyId'],
77
+ c['SecretAccessKey'],
78
+ c['Token']
79
+ )
80
+ @expiration = c['Expiration'] ? Time.iso8601(c['Expiration']) : nil
81
+ end
82
+ rescue JSON::ParserError
83
+ raise Aws::Errors::MetadataParserError.new
80
84
  end
81
85
  end
82
86
 
@@ -40,7 +40,11 @@ module Aws
40
40
  end
41
41
 
42
42
  if process_status.success?
43
- creds_json = JSON.parse(raw_out)
43
+ begin
44
+ creds_json = JSON.parse(raw_out)
45
+ rescue JSON::ParserError
46
+ raise Errors::InvalidProcessCredentialsPayload.new("Invalid JSON response")
47
+ end
44
48
  payload_version = creds_json['Version']
45
49
  if payload_version == 1
46
50
  _parse_payload_format_v1(creds_json)
@@ -40,6 +40,6 @@ require_relative 'aws-sdk-sts/customizations'
40
40
  # @service
41
41
  module Aws::STS
42
42
 
43
- GEM_VERSION = '3.54.0'
43
+ GEM_VERSION = '3.54.1'
44
44
 
45
45
  end
@@ -1730,7 +1730,7 @@ module Aws::STS
1730
1730
  params: params,
1731
1731
  config: config)
1732
1732
  context[:gem_name] = 'aws-sdk-core'
1733
- context[:gem_version] = '3.54.0'
1733
+ context[:gem_version] = '3.54.1'
1734
1734
  Seahorse::Client::Request.new(handlers, context)
1735
1735
  end
1736
1736
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.54.0
4
+ version: 3.54.1
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: 2019-05-28 00:00:00.000000000 Z
11
+ date: 2019-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath