aws-sdk-core 3.70.0 → 3.71.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/VERSION +1 -1
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +3 -1
- data/lib/aws-sdk-core/shared_config.rb +15 -0
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +8 -1
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +32 -0
- data/lib/aws-sdk-sts/types.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baef9364982f05b50ce49aec481c67f013b8d4b2
|
4
|
+
data.tar.gz: 816c82b64b0ad53c2ad46589eb0dee360e889504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85e5b9133be8849c738f9744bef031d85168a41ae295c4339ef3b4e3eb62868dcc77ca63e2b08db7888fe6df6acb9aa844dc0b60361c09f2c383c358fbf300fb
|
7
|
+
data.tar.gz: 461ec0a49091bedcb0a8da524c8e0dc4303b114cb19f078028b84c966119c2e33e703bd8175bfba03400ec584efd7f13ae9728fac03082440836238f26d8e831
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.71.0
|
@@ -35,7 +35,9 @@ to test endpoints. This should be avalid HTTP(S) URI.
|
|
35
35
|
DOCS
|
36
36
|
endpoint_prefix = cfg.api.metadata['endpointPrefix']
|
37
37
|
if cfg.region && endpoint_prefix
|
38
|
-
|
38
|
+
sts_regional = cfg.respond_to?(:sts_regional_endpoints) ? cfg.sts_regional_endpoints : nil
|
39
|
+
Aws::Partitions::EndpointProvider.resolve(
|
40
|
+
cfg.region, endpoint_prefix, sts_regional)
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
@@ -153,6 +153,21 @@ module Aws
|
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
156
|
+
def sts_regional_endpoints(opts = {})
|
157
|
+
p = opts[:profile] || @profile_name
|
158
|
+
if @config_enabled
|
159
|
+
if @parsed_credentials
|
160
|
+
mode = @parsed_credentials.fetch(p, {})["sts_regional_endpoints"]
|
161
|
+
end
|
162
|
+
if @parsed_config
|
163
|
+
mode ||= @parsed_config.fetch(p, {})["sts_regional_endpoints"]
|
164
|
+
end
|
165
|
+
mode
|
166
|
+
else
|
167
|
+
nil
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
156
171
|
def endpoint_discovery(opts = {})
|
157
172
|
p = opts[:profile] || @profile_name
|
158
173
|
if @config_enabled && @parsed_config
|
data/lib/aws-sdk-sts.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -26,6 +26,7 @@ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
26
26
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
27
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
28
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
29
|
+
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
29
30
|
|
30
31
|
Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
|
31
32
|
|
@@ -59,6 +60,7 @@ module Aws::STS
|
|
59
60
|
add_plugin(Aws::Plugins::TransferEncoding)
|
60
61
|
add_plugin(Aws::Plugins::SignatureV4)
|
61
62
|
add_plugin(Aws::Plugins::Protocols::Query)
|
63
|
+
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
62
64
|
|
63
65
|
# @overload initialize(options)
|
64
66
|
# @param [Hash] options
|
@@ -192,6 +194,11 @@ module Aws::STS
|
|
192
194
|
#
|
193
195
|
# @option options [String] :session_token
|
194
196
|
#
|
197
|
+
# @option options [String] :sts_regional_endpoints ("legacy")
|
198
|
+
# Passing in 'regional' to enable regional endpoint for STS for all supported
|
199
|
+
# regions (except 'aws-global'), defaults to 'legacy' mode, using global endpoint
|
200
|
+
# for legacy regions.
|
201
|
+
#
|
195
202
|
# @option options [Boolean] :stub_responses (false)
|
196
203
|
# Causes the client to return stubbed responses. By default
|
197
204
|
# fake responses are generated and returned. You can specify
|
@@ -1808,7 +1815,7 @@ module Aws::STS
|
|
1808
1815
|
params: params,
|
1809
1816
|
config: config)
|
1810
1817
|
context[:gem_name] = 'aws-sdk-core'
|
1811
|
-
context[:gem_version] = '3.
|
1818
|
+
context[:gem_version] = '3.71.0'
|
1812
1819
|
Seahorse::Client::Request.new(handlers, context)
|
1813
1820
|
end
|
1814
1821
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Aws
|
2
|
+
module STS
|
3
|
+
module Plugins
|
4
|
+
|
5
|
+
class STSRegionalEndpoints < Seahorse::Client::Plugin
|
6
|
+
|
7
|
+
option(:sts_regional_endpoints,
|
8
|
+
default: 'legacy',
|
9
|
+
doc_type: String,
|
10
|
+
docstring: <<-DOCS) do |cfg|
|
11
|
+
Passing in 'regional' to enable regional endpoint for STS for all supported
|
12
|
+
regions (except 'aws-global'), defaults to 'legacy' mode, using global endpoint
|
13
|
+
for legacy regions.
|
14
|
+
DOCS
|
15
|
+
resolve_sts_regional_endpoints(cfg)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def self.resolve_sts_regional_endpoints(cfg)
|
21
|
+
env_mode = ENV['AWS_STS_REGIONAL_ENDPOINTS']
|
22
|
+
env_mode = nil if env_mode == ''
|
23
|
+
cfg_mode = Aws.shared_config.sts_regional_endpoints(
|
24
|
+
profile: cfg.profile)
|
25
|
+
env_mode || cfg_mode || 'legacy'
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/aws-sdk-sts/types.rb
CHANGED
@@ -1205,7 +1205,7 @@ module Aws::STS
|
|
1205
1205
|
include Aws::Structure
|
1206
1206
|
end
|
1207
1207
|
|
1208
|
-
#
|
1208
|
+
# This error is returned if the message passed to
|
1209
1209
|
# `DecodeAuthorizationMessage` was invalid. This can happen if the token
|
1210
1210
|
# contains invalid characters, such as linebreaks.
|
1211
1211
|
#
|
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.
|
4
|
+
version: 3.71.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: 2019-10-
|
11
|
+
date: 2019-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- lib/aws-sdk-sts/client_api.rb
|
214
214
|
- lib/aws-sdk-sts/customizations.rb
|
215
215
|
- lib/aws-sdk-sts/errors.rb
|
216
|
+
- lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
|
216
217
|
- lib/aws-sdk-sts/resource.rb
|
217
218
|
- lib/aws-sdk-sts/types.rb
|
218
219
|
- lib/seahorse.rb
|