aws-sdk-core 3.121.2 → 3.122.0

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
  SHA256:
3
- metadata.gz: 4b9f3fb30de8f9941d6f38fba87b19a9a68885fa51f28604481686e9dac1848c
4
- data.tar.gz: 258e63026024946722a4bbdaaf34d91b633857a9b0310d735547e1cadfbefd51
3
+ metadata.gz: 41135e32f0e535e0205dbf19edc735e9dcbcc1098355cd95b0c1a4fc336e9176
4
+ data.tar.gz: 0e0282593133b8947242ee334661728764de5932e1e2e22b105ab4648da46128
5
5
  SHA512:
6
- metadata.gz: 6706b957d3f7649d5886e388fefb261b6863168ac64c1b3e86e2e912dc1d692e60c0349d9c8109afbe9dc594e612e8a4f3f0cd00ab68b7dbfedf1812dd608570
7
- data.tar.gz: 67fd627aabe9d7ccb53aec0d5c161d6ce255d51427166e0dfd3370210e1bb08bb242ec4d8632a73bcce006e13288057077e20b148b72092f60720ecd54d00291
6
+ metadata.gz: 17dafa3b644e7cf3c72283e07e6ef951490b9ab4d3a30a34a871a4431185619f906c4e63d914515a654d1ab10e40d656a3faa6786e2e25cbd76d01859a197c56
7
+ data.tar.gz: e9cc0efc4f6a4021c1d3ba497f335899444befabf8f4b645ed4fc0f1c10c8ca208cb85fe350f6f21248ca34ebbe5d313b1457502a3e06951a3b12f8437709b2a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,41 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.122.0 (2021-11-04)
5
+ ------------------
6
+
7
+ * Feature - Updated Aws::STS::Client with the latest API changes.
8
+
9
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
10
+
11
+ * Issue - Fix parsing of ISO8601 timestamps with millisecond precision in headers.
12
+
13
+ * Feature - Support modeled dualstack endpoints. It can be configured with shared configuration (`use_dualstack_endpoint`), an ENV variable (`AWS_USE_DUALSTACK_ENDPOINT`), and a constructor option (`:use_dualstack_endpoint`). Requests made to services without a dualstack endpoint will fail.
14
+
15
+ * Feature - Support modeled fips endpoints. It can be configured with shared configuration (`use_fips_endpoint`), an ENV variable (`AWS_USE_FIPS_ENDPOINT`), and a constructor option (`:use_fips_endpoint`). Requests made to services without a fips endpoint will fail.
16
+
17
+ 3.121.6 (2021-11-02)
18
+ ------------------
19
+
20
+ * Issue - Improve `SSOCredentials` error handling when profile file does not exist (#2605)
21
+
22
+ 3.121.5 (2021-10-29)
23
+ ------------------
24
+
25
+ * Issue - bump minimum version of `aws-partitions` (#2603).
26
+
27
+ 3.121.4 (2021-10-28)
28
+ ------------------
29
+
30
+ * Issue - This version has been yanked. (#2603).
31
+
32
+ * Issue - use the `EndpointProvider` to lookup signing region and name.
33
+
34
+ 3.121.3 (2021-10-20)
35
+ ------------------
36
+
37
+ * Issue - Use endpointPrefix when looking up the `signing_region` from the `EndpointProvider`.
38
+
4
39
  3.121.2 (2021-10-18)
5
40
  ------------------
6
41
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.121.2
1
+ 3.122.0
@@ -24,6 +24,25 @@ a default `:region` is searched for in the following locations:
24
24
  resolve_region(cfg)
25
25
  end
26
26
 
27
+ option(:use_dualstack_endpoint,
28
+ doc_type: 'Boolean',
29
+ docstring: <<-DOCS) do |cfg|
30
+ When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
31
+ will be used if available.
32
+ DOCS
33
+ resolve_use_dualstack_endpoint(cfg)
34
+ end
35
+
36
+ option(:use_fips_endpoint,
37
+ doc_type: 'Boolean',
38
+ docstring: <<-DOCS) do |cfg|
39
+ When set to `true`, fips compatible endpoints will be used if available.
40
+ When a `fips` region is used, the region is normalized and this config
41
+ is set to `true`.
42
+ DOCS
43
+ resolve_use_fips_endpoint(cfg)
44
+ end
45
+
27
46
  option(:regional_endpoint, false)
28
47
 
29
48
  option(:endpoint, doc_type: String, docstring: <<-DOCS) do |cfg|
@@ -42,10 +61,23 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
42
61
  raise Errors::InvalidRegionError
43
62
  end
44
63
 
64
+ region = cfg.region
65
+ new_region = region.gsub('fips-', '').gsub('-fips', '')
66
+ if region != new_region
67
+ warn("Legacy region #{region} was transformed to #{new_region}."\
68
+ '`use_fips_endpoint` config was set to true.')
69
+ cfg.override_config(:use_fips_endpoint, true)
70
+ cfg.override_config(:region, new_region)
71
+ end
72
+
45
73
  Aws::Partitions::EndpointProvider.resolve(
46
74
  cfg.region,
47
75
  endpoint_prefix,
48
- sts_regional
76
+ sts_regional,
77
+ {
78
+ dualstack: cfg.use_dualstack_endpoint,
79
+ fips: cfg.use_fips_endpoint
80
+ }
49
81
  )
50
82
  end
51
83
  end
@@ -66,6 +98,20 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
66
98
  cfg_region = Aws.shared_config.region(profile: cfg.profile)
67
99
  env_region || cfg_region
68
100
  end
101
+
102
+ def resolve_use_dualstack_endpoint(cfg)
103
+ value = ENV['AWS_USE_DUALSTACK_ENDPOINT']
104
+ value ||= Aws.shared_config.use_dualstack_endpoint(
105
+ profile: cfg.profile
106
+ )
107
+ Aws::Util.str_2_bool(value) || false
108
+ end
109
+
110
+ def resolve_use_fips_endpoint(cfg)
111
+ value = ENV['AWS_USE_FIPS_ENDPOINT']
112
+ value ||= Aws.shared_config.use_fips_endpoint(profile: cfg.profile)
113
+ Aws::Util.str_2_bool(value) || false
114
+ end
69
115
  end
70
116
  end
71
117
  end
@@ -12,32 +12,22 @@ module Aws
12
12
  end
13
13
 
14
14
  option(:sigv4_name) do |cfg|
15
- cfg.api.metadata['signingName'] || cfg.api.metadata['endpointPrefix']
15
+ signingName = if cfg.region
16
+ Aws::Partitions::EndpointProvider.signing_service(
17
+ cfg.region, cfg.api.metadata['endpointPrefix']
18
+ )
19
+ end
20
+ signingName || cfg.api.metadata['signingName'] || cfg.api.metadata['endpointPrefix']
16
21
  end
17
22
 
18
23
  option(:sigv4_region) do |cfg|
19
-
20
- # The signature version 4 signing region is most
21
- # commonly the configured region. There are a few
22
- # notable exceptions:
23
- #
24
- # * Some services have a global endpoint to the entire
25
- # partition. For example, when constructing a route53
26
- # client for a region like "us-west-2", we will
27
- # always use "route53.amazonaws.com". This endpoint
28
- # is actually global to the entire partition,
29
- # and must be signed as "us-east-1".
30
- #
31
- # * When the region is configured, but it is configured
32
- # to a non region, such as "aws-global". This is similar
33
- # to the previous case. We use the Aws::Partitions::EndpointProvider
34
- # to resolve to the actual signing region.
35
- #
36
- prefix = cfg.api.metadata['endpointPrefix']
37
- if prefix && cfg.endpoint.to_s.match(/#{prefix}\.amazonaws\.com/)
38
- 'us-east-1'
39
- elsif cfg.region
40
- Aws::Partitions::EndpointProvider.signing_region(cfg.region, cfg.sigv4_name)
24
+ if cfg.region
25
+ if cfg.respond_to?(:sts_regional_endpoints)
26
+ sts_regional = cfg.sts_regional_endpoints
27
+ end
28
+ Aws::Partitions::EndpointProvider.signing_region(
29
+ cfg.region, cfg.api.metadata['endpointPrefix'], sts_regional
30
+ )
41
31
  end
42
32
  end
43
33
 
@@ -41,7 +41,7 @@ module Aws
41
41
  when FloatShape then value.to_f
42
42
  when BooleanShape then value == 'true'
43
43
  when TimestampShape
44
- if value =~ /\d+(\.\d*)/
44
+ if value =~ /^\d+(\.\d*)/
45
45
  Time.at(value.to_f)
46
46
  elsif value =~ /^\d+$/
47
47
  Time.at(value.to_i)
@@ -163,6 +163,8 @@ module Aws
163
163
  :ca_bundle,
164
164
  :credential_process,
165
165
  :endpoint_discovery_enabled,
166
+ :use_dualstack_endpoint,
167
+ :use_fips_endpoint,
166
168
  :ec2_metadata_service_endpoint,
167
169
  :ec2_metadata_service_endpoint_mode,
168
170
  :max_attempts,
@@ -100,7 +100,7 @@ module Aws
100
100
  raise ArgumentError, 'Cached SSO Token is expired.'
101
101
  end
102
102
  cached_token
103
- rescue Aws::Json::ParseError, ArgumentError
103
+ rescue Errno::ENOENT, Aws::Json::ParseError, ArgumentError
104
104
  raise Errors::InvalidSSOCredentials, SSO_LOGIN_GUIDANCE
105
105
  end
106
106
 
data/lib/aws-sdk-core.rb CHANGED
@@ -88,6 +88,9 @@ require_relative 'aws-sdk-core/arn'
88
88
  require_relative 'aws-sdk-core/arn_parser'
89
89
  require_relative 'aws-sdk-core/ec2_metadata'
90
90
 
91
+ # plugins
92
+ # loaded through building STS or SSO ..
93
+
91
94
  # aws-sdk-sts is included to support Aws::AssumeRoleCredentials
92
95
  require_relative 'aws-sdk-sts'
93
96
 
@@ -275,6 +275,15 @@ module Aws::SSO
275
275
  # ** Please note ** When response stubbing is enabled, no HTTP
276
276
  # requests are made, and retries are disabled.
277
277
  #
278
+ # @option options [Boolean] :use_dualstack_endpoint
279
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
280
+ # will be used if available.
281
+ #
282
+ # @option options [Boolean] :use_fips_endpoint
283
+ # When set to `true`, fips compatible endpoints will be used if available.
284
+ # When a `fips` region is used, the region is normalized and this config
285
+ # is set to `true`.
286
+ #
278
287
  # @option options [Boolean] :validate_params (true)
279
288
  # When `true`, request parameters are validated before
280
289
  # sending the request.
@@ -521,7 +530,7 @@ module Aws::SSO
521
530
  params: params,
522
531
  config: config)
523
532
  context[:gem_name] = 'aws-sdk-core'
524
- context[:gem_version] = '3.121.2'
533
+ context[:gem_version] = '3.122.0'
525
534
  Seahorse::Client::Request.new(handlers, context)
526
535
  end
527
536
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sso/customizations'
50
50
  # @!group service
51
51
  module Aws::SSO
52
52
 
53
- GEM_VERSION = '3.121.2'
53
+ GEM_VERSION = '3.122.0'
54
54
 
55
55
  end
@@ -282,6 +282,15 @@ module Aws::STS
282
282
  # ** Please note ** When response stubbing is enabled, no HTTP
283
283
  # requests are made, and retries are disabled.
284
284
  #
285
+ # @option options [Boolean] :use_dualstack_endpoint
286
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
287
+ # will be used if available.
288
+ #
289
+ # @option options [Boolean] :use_fips_endpoint
290
+ # When set to `true`, fips compatible endpoints will be used if available.
291
+ # When a `fips` region is used, the region is normalized and this config
292
+ # is set to `true`.
293
+ #
285
294
  # @option options [Boolean] :validate_params (true)
286
295
  # When `true`, request parameters are validated before
287
296
  # sending the request.
@@ -2303,7 +2312,7 @@ module Aws::STS
2303
2312
  params: params,
2304
2313
  config: config)
2305
2314
  context[:gem_name] = 'aws-sdk-core'
2306
- context[:gem_version] = '3.121.2'
2315
+ context[:gem_version] = '3.122.0'
2307
2316
  Seahorse::Client::Request.new(handlers, context)
2308
2317
  end
2309
2318
 
@@ -53,7 +53,13 @@ module Aws
53
53
  )
54
54
 
55
55
  url = Aws::Partitions::EndpointProvider.resolve(
56
- req.context.config.region, 'sts', 'regional'
56
+ req.context.config.region,
57
+ 'sts',
58
+ req.context.config.sts_regional_endpoints,
59
+ {
60
+ dualstack: req.context.config.use_dualstack_endpoint,
61
+ fips: req.context.config.use_fips_endpoint
62
+ }
57
63
  )
58
64
  url += "/?#{param_list}"
59
65
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sts/customizations'
50
50
  # @!group service
51
51
  module Aws::STS
52
52
 
53
- GEM_VERSION = '3.121.2'
53
+ GEM_VERSION = '3.122.0'
54
54
 
55
55
  end
@@ -195,6 +195,10 @@ module Seahorse
195
195
  @members.include?(method_name) or super
196
196
  end
197
197
 
198
+ def override_config(k, v)
199
+ @struct[k] = v
200
+ end
201
+
198
202
  private
199
203
 
200
204
  def value_at(opt_name)
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.121.2
4
+ version: 3.122.0
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: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2021-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '1'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 1.239.0
36
+ version: 1.525.0
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '1'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 1.239.0
46
+ version: 1.525.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: aws-sigv4
49
49
  requirement: !ruby/object:Gem::Requirement