aws-sdk-core 3.177.0 → 3.179.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/credential_provider.rb +1 -1
- data/lib/aws-sdk-core/ini_parser.rb +1 -1
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +109 -33
- data/lib/aws-sdk-core/shared_config.rb +22 -1
- data/lib/aws-sdk-sso/client.rb +5 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +5 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +5 -1
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/response.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a718aa02701040d0bd3aec6ab69cf36a790a9e16aa6ffa2f7d171ce95d36e055
|
4
|
+
data.tar.gz: 5452e4aa44a6d2d0d37341d05d0a43ccc2168a1a4c804291c2cecfac6c923378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daf4fccf95fa9fceee0b98d840bb67552223b881c70d6253118ce18d28277f6a81b0386eb047770acb569a4bc58f9f1ae7159d9b86fae80787c4d766ae3ece23
|
7
|
+
data.tar.gz: be4b8b86226158943daba8bb40eb53a05fcf387616bbe35d3424f5065a36a318d4e2767f840adfafd5ac16e5059891cd438301815834ae16ad85c1bfd2ac4ceb
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
3.179.0 (2023-07-24)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Add `checksum_validated` method to response.
|
8
|
+
|
9
|
+
3.178.0 (2023-07-11)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Updated Aws::STS::Client with the latest API changes.
|
13
|
+
|
14
|
+
* Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
|
15
|
+
|
16
|
+
* Feature - Updated Aws::SSO::Client with the latest API changes.
|
17
|
+
|
18
|
+
* Feature - Add support for configuring the endpoint URL in the shared configuration file or via an environment variable for a specific AWS service or all AWS services.
|
19
|
+
|
4
20
|
3.177.0 (2023-07-06)
|
5
21
|
------------------
|
6
22
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.179.0
|
@@ -17,7 +17,7 @@ module Aws
|
|
17
17
|
current_profile = named_profile[1] if named_profile
|
18
18
|
elsif current_profile
|
19
19
|
unless line.nil?
|
20
|
-
item = line.match(/^(.+?)\s*=\s*(
|
20
|
+
item = line.match(/^(.+?)\s*=\s*([^\s].*?)\s*$/)
|
21
21
|
prefix = line.match(/^(.+?)\s*=\s*$/)
|
22
22
|
end
|
23
23
|
if item && item[1].match(/^\s+/)
|
@@ -47,44 +47,21 @@ is set to `true`.
|
|
47
47
|
# Legacy endpoints must continue to be generated at client time.
|
48
48
|
option(:regional_endpoint, false)
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
option(:ignore_configured_endpoint_urls,
|
51
|
+
doc_type: 'Boolean',
|
52
|
+
docstring: <<-DOCS) do |cfg|
|
53
|
+
Setting to true disables use of endpoint URLs provided via environment
|
54
|
+
variables and the shared configuration file.
|
55
|
+
DOCS
|
56
|
+
resolve_ignore_configured_endpoint_urls(cfg)
|
57
|
+
end
|
58
|
+
|
53
59
|
option(:endpoint, doc_type: String, docstring: <<-DOCS) do |cfg|
|
54
60
|
The client endpoint is normally constructed from the `:region`
|
55
61
|
option. You should only configure an `:endpoint` when connecting
|
56
62
|
to test or custom endpoints. This should be a valid HTTP(S) URI.
|
57
63
|
DOCS
|
58
|
-
|
59
|
-
if cfg.region && endpoint_prefix
|
60
|
-
if cfg.respond_to?(:sts_regional_endpoints)
|
61
|
-
sts_regional = cfg.sts_regional_endpoints
|
62
|
-
end
|
63
|
-
|
64
|
-
# check region is a valid RFC host label
|
65
|
-
unless Seahorse::Util.host_label?(cfg.region)
|
66
|
-
raise Errors::InvalidRegionError
|
67
|
-
end
|
68
|
-
|
69
|
-
region = cfg.region
|
70
|
-
new_region = region.gsub('fips-', '').gsub('-fips', '')
|
71
|
-
if region != new_region
|
72
|
-
warn("Legacy region #{region} was transformed to #{new_region}."\
|
73
|
-
'`use_fips_endpoint` config was set to true.')
|
74
|
-
cfg.override_config(:use_fips_endpoint, true)
|
75
|
-
cfg.override_config(:region, new_region)
|
76
|
-
end
|
77
|
-
|
78
|
-
Aws::Partitions::EndpointProvider.resolve(
|
79
|
-
cfg.region,
|
80
|
-
endpoint_prefix,
|
81
|
-
sts_regional,
|
82
|
-
{
|
83
|
-
dualstack: cfg.use_dualstack_endpoint,
|
84
|
-
fips: cfg.use_fips_endpoint
|
85
|
-
}
|
86
|
-
)
|
87
|
-
end
|
64
|
+
resolve_endpoint(cfg)
|
88
65
|
end
|
89
66
|
|
90
67
|
def after_initialize(client)
|
@@ -117,6 +94,105 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
|
|
117
94
|
value ||= Aws.shared_config.use_fips_endpoint(profile: cfg.profile)
|
118
95
|
Aws::Util.str_2_bool(value) || false
|
119
96
|
end
|
97
|
+
|
98
|
+
def resolve_ignore_configured_endpoint_urls(cfg)
|
99
|
+
value = ENV['AWS_IGNORE_CONFIGURED_ENDPOINT_URLS']
|
100
|
+
value ||= Aws.shared_config.ignore_configured_endpoint_urls(profile: cfg.profile)
|
101
|
+
Aws::Util.str_2_bool(value&.downcase) || false
|
102
|
+
end
|
103
|
+
|
104
|
+
# NOTE: with Endpoints 2.0, some of this logic is deprecated
|
105
|
+
# but because new old service gems may depend on new core versions
|
106
|
+
# we must preserve that behavior.
|
107
|
+
# Additional behavior controls the setting of the custom SDK::Endpoint
|
108
|
+
# parameter.
|
109
|
+
# When the `regional_endpoint` config is set to true - this indicates to
|
110
|
+
# Endpoints2.0 that a custom endpoint has NOT been configured by the user.
|
111
|
+
def resolve_endpoint(cfg)
|
112
|
+
endpoint = resolve_custom_config_endpoint(cfg)
|
113
|
+
endpoint_prefix = cfg.api.metadata['endpointPrefix']
|
114
|
+
|
115
|
+
return endpoint unless endpoint.nil? && cfg.region && endpoint_prefix
|
116
|
+
|
117
|
+
validate_region!(cfg.region)
|
118
|
+
handle_legacy_pseudo_regions(cfg)
|
119
|
+
|
120
|
+
# set regional_endpoint flag - this indicates to Endpoints 2.0
|
121
|
+
# that a custom endpoint has NOT been configured by the user
|
122
|
+
cfg.override_config(:regional_endpoint, true)
|
123
|
+
|
124
|
+
resolve_legacy_endpoint(cfg)
|
125
|
+
end
|
126
|
+
|
127
|
+
# get a custom configured endpoint from ENV or configuration
|
128
|
+
def resolve_custom_config_endpoint(cfg)
|
129
|
+
return if cfg.ignore_configured_endpoint_urls
|
130
|
+
|
131
|
+
|
132
|
+
env_service_endpoint(cfg) || env_global_endpoint(cfg) || shared_config_endpoint(cfg)
|
133
|
+
end
|
134
|
+
|
135
|
+
def env_service_endpoint(cfg)
|
136
|
+
service_id = cfg.api.metadata['serviceId'] || cfg.api.metadata['endpointPrefix']
|
137
|
+
env_service_id = service_id.gsub(" ", "_").upcase
|
138
|
+
return unless endpoint = ENV["AWS_ENDPOINT_URL_#{env_service_id}"]
|
139
|
+
|
140
|
+
cfg.logger&.debug(
|
141
|
+
"Endpoint configured from ENV['AWS_ENDPOINT_URL_#{env_service_id}']: #{endpoint}\n")
|
142
|
+
endpoint
|
143
|
+
end
|
144
|
+
|
145
|
+
def env_global_endpoint(cfg)
|
146
|
+
return unless endpoint = ENV['AWS_ENDPOINT_URL']
|
147
|
+
|
148
|
+
cfg.logger&.debug(
|
149
|
+
"Endpoint configured from ENV['AWS_ENDPOINT_URL']: #{endpoint}\n")
|
150
|
+
endpoint
|
151
|
+
end
|
152
|
+
|
153
|
+
def shared_config_endpoint(cfg)
|
154
|
+
service_id = cfg.api.metadata['serviceId'] || cfg.api.metadata['endpointPrefix']
|
155
|
+
return unless endpoint = Aws.shared_config.configured_endpoint(profile: cfg.profile, service_id: service_id)
|
156
|
+
|
157
|
+
cfg.logger&.debug(
|
158
|
+
"Endpoint configured from shared config(profile: #{cfg.profile}): #{endpoint}\n")
|
159
|
+
endpoint
|
160
|
+
end
|
161
|
+
|
162
|
+
# check region is a valid RFC host label
|
163
|
+
def validate_region!(region)
|
164
|
+
unless Seahorse::Util.host_label?(region)
|
165
|
+
raise Errors::InvalidRegionError
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def handle_legacy_pseudo_regions(cfg)
|
170
|
+
region = cfg.region
|
171
|
+
new_region = region.gsub('fips-', '').gsub('-fips', '')
|
172
|
+
if region != new_region
|
173
|
+
warn("Legacy region #{region} was transformed to #{new_region}."\
|
174
|
+
'`use_fips_endpoint` config was set to true.')
|
175
|
+
cfg.override_config(:use_fips_endpoint, true)
|
176
|
+
cfg.override_config(:region, new_region)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
# set a default endpoint in config using legacy (endpoints.json) resolver
|
180
|
+
def resolve_legacy_endpoint(cfg)
|
181
|
+
endpoint_prefix = cfg.api.metadata['endpointPrefix']
|
182
|
+
if cfg.respond_to?(:sts_regional_endpoints)
|
183
|
+
sts_regional = cfg.sts_regional_endpoints
|
184
|
+
end
|
185
|
+
|
186
|
+
Aws::Partitions::EndpointProvider.resolve(
|
187
|
+
cfg.region,
|
188
|
+
endpoint_prefix,
|
189
|
+
sts_regional,
|
190
|
+
{
|
191
|
+
dualstack: cfg.use_dualstack_endpoint,
|
192
|
+
fips: cfg.use_fips_endpoint
|
193
|
+
}
|
194
|
+
)
|
195
|
+
end
|
120
196
|
end
|
121
197
|
end
|
122
198
|
end
|
@@ -167,6 +167,26 @@ module Aws
|
|
167
167
|
token
|
168
168
|
end
|
169
169
|
|
170
|
+
# Source a custom configured endpoint from the shared configuration file
|
171
|
+
#
|
172
|
+
# @param [Hash] opts
|
173
|
+
# @option opts [String] :profile
|
174
|
+
# @option opts [String] :service_id
|
175
|
+
def configured_endpoint(opts = {})
|
176
|
+
# services section is only allowed in the shared config file (not credentials)
|
177
|
+
profile = opts[:profile] || @profile_name
|
178
|
+
service_id = opts[:service_id]&.gsub(" ", "_")&.downcase
|
179
|
+
if @parsed_config && (prof_config = @parsed_config[profile])
|
180
|
+
services_section_name = prof_config['services']
|
181
|
+
if (services_config = @parsed_config["services #{services_section_name}"]) &&
|
182
|
+
(service_config = services_config[service_id])
|
183
|
+
return service_config['endpoint_url'] if service_config['endpoint_url']
|
184
|
+
end
|
185
|
+
return prof_config['endpoint_url']
|
186
|
+
end
|
187
|
+
nil
|
188
|
+
end
|
189
|
+
|
170
190
|
# Add an accessor method (similar to attr_reader) to return a configuration value
|
171
191
|
# Uses the get_config_value below to control where
|
172
192
|
# values are loaded from
|
@@ -200,7 +220,8 @@ module Aws
|
|
200
220
|
:defaults_mode,
|
201
221
|
:sdk_ua_app_id,
|
202
222
|
:disable_request_compression,
|
203
|
-
:request_min_compression_size_bytes
|
223
|
+
:request_min_compression_size_bytes,
|
224
|
+
:ignore_configured_endpoint_urls
|
204
225
|
)
|
205
226
|
|
206
227
|
private
|
data/lib/aws-sdk-sso/client.rb
CHANGED
@@ -216,6 +216,10 @@ module Aws::SSO
|
|
216
216
|
# @option options [Boolean] :endpoint_discovery (false)
|
217
217
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
218
218
|
#
|
219
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
220
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
221
|
+
# variables and the shared configuration file.
|
222
|
+
#
|
219
223
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
220
224
|
# The log formatter.
|
221
225
|
#
|
@@ -601,7 +605,7 @@ module Aws::SSO
|
|
601
605
|
params: params,
|
602
606
|
config: config)
|
603
607
|
context[:gem_name] = 'aws-sdk-core'
|
604
|
-
context[:gem_version] = '3.
|
608
|
+
context[:gem_version] = '3.179.0'
|
605
609
|
Seahorse::Client::Request.new(handlers, context)
|
606
610
|
end
|
607
611
|
|
data/lib/aws-sdk-sso.rb
CHANGED
@@ -216,6 +216,10 @@ module Aws::SSOOIDC
|
|
216
216
|
# @option options [Boolean] :endpoint_discovery (false)
|
217
217
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
218
218
|
#
|
219
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
220
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
221
|
+
# variables and the shared configuration file.
|
222
|
+
#
|
219
223
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
220
224
|
# The log formatter.
|
221
225
|
#
|
@@ -597,7 +601,7 @@ module Aws::SSOOIDC
|
|
597
601
|
params: params,
|
598
602
|
config: config)
|
599
603
|
context[:gem_name] = 'aws-sdk-core'
|
600
|
-
context[:gem_version] = '3.
|
604
|
+
context[:gem_version] = '3.179.0'
|
601
605
|
Seahorse::Client::Request.new(handlers, context)
|
602
606
|
end
|
603
607
|
|
data/lib/aws-sdk-ssooidc.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -218,6 +218,10 @@ module Aws::STS
|
|
218
218
|
# @option options [Boolean] :endpoint_discovery (false)
|
219
219
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
220
220
|
#
|
221
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
222
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
223
|
+
# variables and the shared configuration file.
|
224
|
+
#
|
221
225
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
222
226
|
# The log formatter.
|
223
227
|
#
|
@@ -2330,7 +2334,7 @@ module Aws::STS
|
|
2330
2334
|
params: params,
|
2331
2335
|
config: config)
|
2332
2336
|
context[:gem_name] = 'aws-sdk-core'
|
2333
|
-
context[:gem_version] = '3.
|
2337
|
+
context[:gem_version] = '3.179.0'
|
2334
2338
|
Seahorse::Client::Request.new(handlers, context)
|
2335
2339
|
end
|
2336
2340
|
|
data/lib/aws-sdk-sts.rb
CHANGED
@@ -204,10 +204,6 @@ module Seahorse
|
|
204
204
|
def value_at(opt_name)
|
205
205
|
value = @struct[opt_name]
|
206
206
|
if value.is_a?(Defaults)
|
207
|
-
# Legacy endpoints must continue to exist.
|
208
|
-
if opt_name == :endpoint && @struct.members.include?(:regional_endpoint)
|
209
|
-
@struct[:regional_endpoint] = true
|
210
|
-
end
|
211
207
|
resolve_defaults(opt_name, value)
|
212
208
|
else
|
213
209
|
value
|
@@ -30,6 +30,12 @@ module Seahorse
|
|
30
30
|
# @return [StandardError, nil]
|
31
31
|
attr_accessor :error
|
32
32
|
|
33
|
+
# @return [String, nil] returns the algorithm used to validate
|
34
|
+
# the response checksum. Returns nil if no verification was done.
|
35
|
+
def checksum_validated
|
36
|
+
context[:http_checksum][:validated] if context[:http_checksum]
|
37
|
+
end
|
38
|
+
|
33
39
|
# @overload on(status_code, &block)
|
34
40
|
# @param [Integer] status_code The block will be
|
35
41
|
# triggered only for responses with the given status code.
|
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.179.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: 2023-07-
|
11
|
+
date: 2023-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|