aws-sdk-core 3.215.0 → 3.222.2
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/CHANGELOG.md +101 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/assume_role_credentials.rb +1 -0
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +1 -0
- data/lib/aws-sdk-core/cbor/decoder.rb +0 -2
- data/lib/aws-sdk-core/cbor/encoder.rb +2 -2
- data/lib/aws-sdk-core/client_stubs.rb +22 -48
- data/lib/aws-sdk-core/credential_provider.rb +4 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +27 -7
- data/lib/aws-sdk-core/credentials.rb +6 -0
- data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
- data/lib/aws-sdk-core/errors.rb +2 -2
- data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -0
- data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -170
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
- data/lib/aws-sdk-core/plugins/sign.rb +16 -2
- data/lib/aws-sdk-core/plugins/stub_responses.rb +24 -8
- data/lib/aws-sdk-core/plugins/user_agent.rb +32 -2
- data/lib/aws-sdk-core/process_credentials.rb +1 -1
- data/lib/aws-sdk-core/rest/request/headers.rb +1 -1
- data/lib/aws-sdk-core/shared_config.rb +73 -21
- data/lib/aws-sdk-core/shared_credentials.rb +1 -0
- data/lib/aws-sdk-core/sso_credentials.rb +2 -0
- data/lib/aws-sdk-sso/client.rb +52 -29
- data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +89 -49
- data/lib/aws-sdk-ssooidc/client_api.rb +6 -0
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-ssooidc/types.rb +48 -16
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +53 -30
- data/lib/aws-sdk-sts/endpoint_provider.rb +33 -38
- data/lib/aws-sdk-sts/errors.rb +16 -0
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/async_base.rb +4 -5
- data/lib/seahorse/client/h2/connection.rb +18 -28
- data/lib/seahorse/client/net_http/connection_pool.rb +2 -0
- data/lib/seahorse/client/networking_error.rb +1 -1
- data/lib/seahorse/client/plugins/h2.rb +4 -4
- data/lib/seahorse/client/response.rb +2 -0
- metadata +36 -8
@@ -41,6 +41,7 @@ module Aws
|
|
41
41
|
class Handler < Seahorse::Client::Handler
|
42
42
|
def call(context)
|
43
43
|
# Skip signing if using sigv2 signing from s3_signer in S3
|
44
|
+
credentials = nil
|
44
45
|
unless v2_signing?(context.config)
|
45
46
|
signer = Sign.signer_for(
|
46
47
|
context[:auth_scheme],
|
@@ -48,13 +49,20 @@ module Aws
|
|
48
49
|
context[:sigv4_region],
|
49
50
|
context[:sigv4_credentials]
|
50
51
|
)
|
52
|
+
credentials = signer.credentials if signer.is_a?(SignatureV4)
|
51
53
|
signer.sign(context)
|
52
54
|
end
|
53
|
-
@handler.call(context)
|
55
|
+
with_metrics(credentials) { @handler.call(context) }
|
54
56
|
end
|
55
57
|
|
56
58
|
private
|
57
59
|
|
60
|
+
def with_metrics(credentials, &block)
|
61
|
+
return block.call unless credentials&.respond_to?(:metrics)
|
62
|
+
|
63
|
+
Aws::Plugins::UserAgent.metric(*credentials.metrics, &block)
|
64
|
+
end
|
65
|
+
|
58
66
|
def v2_signing?(config)
|
59
67
|
# 's3' is legacy signing, 'v4' is default
|
60
68
|
config.respond_to?(:signature_version) &&
|
@@ -92,6 +100,8 @@ module Aws
|
|
92
100
|
|
93
101
|
# @api private
|
94
102
|
class SignatureV4
|
103
|
+
attr_reader :signer
|
104
|
+
|
95
105
|
def initialize(auth_scheme, config, sigv4_overrides = {})
|
96
106
|
scheme_name = auth_scheme['name']
|
97
107
|
|
@@ -113,7 +123,7 @@ module Aws
|
|
113
123
|
signing_algorithm: scheme_name.to_sym,
|
114
124
|
uri_escape_path: !!!auth_scheme['disableDoubleEncoding'],
|
115
125
|
normalize_path: !!!auth_scheme['disableNormalizePath'],
|
116
|
-
unsigned_headers: %w[content-length user-agent x-amzn-trace-id]
|
126
|
+
unsigned_headers: %w[content-length user-agent x-amzn-trace-id expect transfer-encoding connection]
|
117
127
|
)
|
118
128
|
rescue Aws::Sigv4::Errors::MissingCredentialsError
|
119
129
|
raise Aws::Errors::MissingCredentialsError
|
@@ -155,6 +165,10 @@ module Aws
|
|
155
165
|
@signer.sign_event(*args)
|
156
166
|
end
|
157
167
|
|
168
|
+
def credentials
|
169
|
+
@signer.credentials_provider
|
170
|
+
end
|
171
|
+
|
158
172
|
private
|
159
173
|
|
160
174
|
def apply_authtype(context, req)
|
@@ -29,8 +29,16 @@ requests are made, and retries are disabled.
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
option(:stubs) { {} }
|
33
|
+
option(:stubs_mutex) { Mutex.new }
|
34
|
+
option(:api_requests) { [] }
|
35
|
+
option(:api_requests_mutex) { Mutex.new }
|
36
|
+
|
32
37
|
def add_handlers(handlers, config)
|
33
|
-
|
38
|
+
return unless config.stub_responses
|
39
|
+
|
40
|
+
handlers.add(ApiRequestsHandler)
|
41
|
+
handlers.add(StubbingHandler, step: :send)
|
34
42
|
end
|
35
43
|
|
36
44
|
def after_initialize(client)
|
@@ -46,8 +54,20 @@ requests are made, and retries are disabled.
|
|
46
54
|
end
|
47
55
|
end
|
48
56
|
|
49
|
-
class
|
57
|
+
class ApiRequestsHandler < Seahorse::Client::Handler
|
58
|
+
def call(context)
|
59
|
+
context.config.api_requests_mutex.synchronize do
|
60
|
+
context.config.api_requests << {
|
61
|
+
operation_name: context.operation_name,
|
62
|
+
params: context.params,
|
63
|
+
context: context
|
64
|
+
}
|
65
|
+
end
|
66
|
+
@handler.call(context)
|
67
|
+
end
|
68
|
+
end
|
50
69
|
|
70
|
+
class StubbingHandler < Seahorse::Client::Handler
|
51
71
|
def call(context)
|
52
72
|
span_wrapper(context) do
|
53
73
|
stub_responses(context)
|
@@ -57,14 +77,10 @@ requests are made, and retries are disabled.
|
|
57
77
|
private
|
58
78
|
|
59
79
|
def stub_responses(context)
|
60
|
-
stub = context.client.next_stub(context)
|
61
80
|
resp = Seahorse::Client::Response.new(context: context)
|
62
81
|
async_mode = context.client.is_a? Seahorse::Client::AsyncBase
|
63
|
-
|
64
|
-
|
65
|
-
else
|
66
|
-
apply_stub(stub, resp, async_mode)
|
67
|
-
end
|
82
|
+
stub = context.client.next_stub(context)
|
83
|
+
stub[:mutex].synchronize { apply_stub(stub, resp, async_mode) }
|
68
84
|
|
69
85
|
if async_mode
|
70
86
|
Seahorse::Client::AsyncResponse.new(
|
@@ -25,7 +25,36 @@ module Aws
|
|
25
25
|
"ACCOUNT_ID_MODE_DISABLED": "Q",
|
26
26
|
"ACCOUNT_ID_MODE_REQUIRED": "R",
|
27
27
|
"SIGV4A_SIGNING": "S",
|
28
|
-
"RESOLVED_ACCOUNT_ID": "T"
|
28
|
+
"RESOLVED_ACCOUNT_ID": "T",
|
29
|
+
"FLEXIBLE_CHECKSUMS_REQ_CRC32" : "U",
|
30
|
+
"FLEXIBLE_CHECKSUMS_REQ_CRC32C" : "V",
|
31
|
+
"FLEXIBLE_CHECKSUMS_REQ_CRC64" : "W",
|
32
|
+
"FLEXIBLE_CHECKSUMS_REQ_SHA1" : "X",
|
33
|
+
"FLEXIBLE_CHECKSUMS_REQ_SHA256" : "Y",
|
34
|
+
"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED" : "Z",
|
35
|
+
"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED" : "a",
|
36
|
+
"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED" : "b",
|
37
|
+
"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED" : "c",
|
38
|
+
"DDB_MAPPER": "d",
|
39
|
+
"CREDENTIALS_CODE" : "e",
|
40
|
+
"CREDENTIALS_ENV_VARS" : "g",
|
41
|
+
"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN" : "h",
|
42
|
+
"CREDENTIALS_STS_ASSUME_ROLE" : "i",
|
43
|
+
"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID" : "k",
|
44
|
+
"CREDENTIALS_PROFILE" : "n",
|
45
|
+
"CREDENTIALS_PROFILE_SOURCE_PROFILE" : "o",
|
46
|
+
"CREDENTIALS_PROFILE_NAMED_PROVIDER" : "p",
|
47
|
+
"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN" : "q",
|
48
|
+
"CREDENTIALS_PROFILE_SSO" : "r",
|
49
|
+
"CREDENTIALS_SSO" : "s",
|
50
|
+
"CREDENTIALS_PROFILE_SSO_LEGACY" : "t",
|
51
|
+
"CREDENTIALS_SSO_LEGACY" : "u",
|
52
|
+
"CREDENTIALS_PROFILE_PROCESS" : "v",
|
53
|
+
"CREDENTIALS_PROCESS" : "w",
|
54
|
+
"CREDENTIALS_HTTP" : "z",
|
55
|
+
"CREDENTIALS_IMDS" : "0",
|
56
|
+
"SSO_LOGIN_DEVICE" : "1",
|
57
|
+
"SSO_LOGIN_AUTH" : "2"
|
29
58
|
}
|
30
59
|
METRICS
|
31
60
|
|
@@ -187,7 +216,8 @@ variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
187
216
|
end
|
188
217
|
end
|
189
218
|
|
190
|
-
|
219
|
+
# Priority set to 5 in order to add user agent as late as possible after signing
|
220
|
+
handler(Handler, step: :sign, priority: 5)
|
191
221
|
end
|
192
222
|
end
|
193
223
|
end
|
@@ -138,7 +138,11 @@ module Aws
|
|
138
138
|
role_session_name: entry['role_session_name']
|
139
139
|
}
|
140
140
|
cfg[:region] = opts[:region] if opts[:region]
|
141
|
-
|
141
|
+
with_metrics('CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN') do
|
142
|
+
creds = AssumeRoleWebIdentityCredentials.new(cfg)
|
143
|
+
creds.metrics << 'CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN'
|
144
|
+
creds
|
145
|
+
end
|
142
146
|
end
|
143
147
|
end
|
144
148
|
end
|
@@ -212,6 +216,8 @@ module Aws
|
|
212
216
|
:retry_mode,
|
213
217
|
:adaptive_retry_wait_to_fill,
|
214
218
|
:correct_clock_skew,
|
219
|
+
:request_checksum_calculation,
|
220
|
+
:response_checksum_validation,
|
215
221
|
:csm_client_id,
|
216
222
|
:csm_enabled,
|
217
223
|
:csm_host,
|
@@ -253,8 +259,8 @@ module Aws
|
|
253
259
|
'provide only source_profile or credential_source, not both.'
|
254
260
|
elsif opts[:source_profile]
|
255
261
|
opts[:visited_profiles] ||= Set.new
|
256
|
-
|
257
|
-
if opts[:credentials]
|
262
|
+
provider = resolve_source_profile(opts[:source_profile], opts)
|
263
|
+
if provider && (opts[:credentials] = provider.credentials)
|
258
264
|
opts[:role_session_name] ||= prof_cfg['role_session_name']
|
259
265
|
opts[:role_session_name] ||= 'default_session'
|
260
266
|
opts[:role_arn] ||= prof_cfg['role_arn']
|
@@ -263,17 +269,28 @@ module Aws
|
|
263
269
|
opts[:serial_number] ||= prof_cfg['mfa_serial']
|
264
270
|
opts[:profile] = opts.delete(:source_profile)
|
265
271
|
opts.delete(:visited_profiles)
|
266
|
-
|
272
|
+
|
273
|
+
metrics = provider.metrics
|
274
|
+
if provider.is_a?(AssumeRoleCredentials)
|
275
|
+
opts[:credentials] = provider
|
276
|
+
metrics.delete('CREDENTIALS_STS_ASSUME_ROLE')
|
277
|
+
else
|
278
|
+
metrics << 'CREDENTIALS_PROFILE_SOURCE_PROFILE'
|
279
|
+
end
|
280
|
+
# Set the original credentials metrics to [] to prevent duplicate metrics during sign plugin
|
281
|
+
opts[:credentials].metrics = []
|
282
|
+
with_metrics(metrics) do
|
283
|
+
creds = AssumeRoleCredentials.new(opts)
|
284
|
+
creds.metrics.push(*metrics)
|
285
|
+
creds
|
286
|
+
end
|
267
287
|
else
|
268
288
|
raise Errors::NoSourceProfileError,
|
269
289
|
"Profile #{profile} has a role_arn, and source_profile, but the"\
|
270
290
|
' source_profile does not have credentials.'
|
271
291
|
end
|
272
292
|
elsif credential_source
|
273
|
-
opts[:credentials] = credentials_from_source(
|
274
|
-
credential_source,
|
275
|
-
chain_config
|
276
|
-
)
|
293
|
+
opts[:credentials] = credentials_from_source(credential_source, chain_config)
|
277
294
|
if opts[:credentials]
|
278
295
|
opts[:role_session_name] ||= prof_cfg['role_session_name']
|
279
296
|
opts[:role_session_name] ||= 'default_session'
|
@@ -282,7 +299,16 @@ module Aws
|
|
282
299
|
opts[:external_id] ||= prof_cfg['external_id']
|
283
300
|
opts[:serial_number] ||= prof_cfg['mfa_serial']
|
284
301
|
opts.delete(:source_profile) # Cleanup
|
285
|
-
|
302
|
+
|
303
|
+
metrics = opts[:credentials].metrics
|
304
|
+
metrics << 'CREDENTIALS_PROFILE_NAMED_PROVIDER'
|
305
|
+
# Set the original credentials metrics to [] to prevent duplicate metrics during sign plugin
|
306
|
+
opts[:credentials].metrics = []
|
307
|
+
with_metrics(metrics) do
|
308
|
+
creds = AssumeRoleCredentials.new(opts)
|
309
|
+
creds.metrics.push(*metrics)
|
310
|
+
creds
|
311
|
+
end
|
286
312
|
else
|
287
313
|
raise Errors::NoSourceCredentials,
|
288
314
|
"Profile #{profile} could not get source credentials from"\
|
@@ -310,12 +336,24 @@ module Aws
|
|
310
336
|
elsif profile_config && profile_config['source_profile']
|
311
337
|
opts.delete(:source_profile)
|
312
338
|
assume_role_credentials_from_config(opts.merge(profile: profile))
|
313
|
-
elsif (provider =
|
314
|
-
provider
|
339
|
+
elsif (provider = assume_role_web_identity_credentials_from_config_with_metrics(opts.merge(profile: profile)))
|
340
|
+
provider if provider.credentials.set?
|
315
341
|
elsif (provider = assume_role_process_credentials_from_config(profile))
|
316
|
-
provider
|
317
|
-
elsif (provider =
|
318
|
-
provider
|
342
|
+
provider if provider.credentials.set?
|
343
|
+
elsif (provider = sso_credentials_from_config_with_metrics(profile))
|
344
|
+
provider if provider.credentials.set?
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
def assume_role_web_identity_credentials_from_config_with_metrics(opts)
|
349
|
+
with_metrics('CREDENTIALS_PROFILE_SOURCE_PROFILE') do
|
350
|
+
assume_role_web_identity_credentials_from_config(opts)
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
def sso_credentials_from_config_with_metrics(profile)
|
355
|
+
with_metrics('CREDENTIALS_PROFILE_SOURCE_PROFILE') do
|
356
|
+
sso_credentials_from_config(profile: profile)
|
319
357
|
end
|
320
358
|
end
|
321
359
|
|
@@ -340,7 +378,11 @@ module Aws
|
|
340
378
|
if @parsed_config
|
341
379
|
credential_process ||= @parsed_config.fetch(profile, {})['credential_process']
|
342
380
|
end
|
343
|
-
|
381
|
+
if credential_process
|
382
|
+
creds = ProcessCredentials.new([credential_process])
|
383
|
+
creds.metrics << 'CREDENTIALS_PROFILE_PROCESS'
|
384
|
+
creds
|
385
|
+
end
|
344
386
|
end
|
345
387
|
|
346
388
|
def credentials_from_shared(profile, _opts)
|
@@ -384,13 +426,18 @@ module Aws
|
|
384
426
|
sso_start_url = prof_config['sso_start_url']
|
385
427
|
end
|
386
428
|
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
429
|
+
metric = prof_config['sso_session'] ? 'CREDENTIALS_PROFILE_SSO' : 'CREDENTIALS_PROFILE_SSO_LEGACY'
|
430
|
+
with_metrics(metric) do
|
431
|
+
creds = SSOCredentials.new(
|
432
|
+
sso_account_id: prof_config['sso_account_id'],
|
433
|
+
sso_role_name: prof_config['sso_role_name'],
|
434
|
+
sso_session: prof_config['sso_session'],
|
435
|
+
sso_region: sso_region,
|
436
|
+
sso_start_url: sso_start_url
|
393
437
|
)
|
438
|
+
creds.metrics << metric
|
439
|
+
creds
|
440
|
+
end
|
394
441
|
end
|
395
442
|
end
|
396
443
|
|
@@ -418,6 +465,7 @@ module Aws
|
|
418
465
|
prof_config['aws_session_token'],
|
419
466
|
account_id: prof_config['aws_account_id']
|
420
467
|
)
|
468
|
+
creds.metrics = ['CREDENTIALS_PROFILE']
|
421
469
|
creds if creds.set?
|
422
470
|
end
|
423
471
|
|
@@ -478,5 +526,9 @@ module Aws
|
|
478
526
|
|
479
527
|
sso_session
|
480
528
|
end
|
529
|
+
|
530
|
+
def with_metrics(metrics, &block)
|
531
|
+
Aws::Plugins::UserAgent.metric(*metrics, &block)
|
532
|
+
end
|
481
533
|
end
|
482
534
|
end
|
@@ -91,6 +91,7 @@ module Aws
|
|
91
91
|
client_opts[:credentials] = nil
|
92
92
|
@client = Aws::SSO::Client.new(client_opts)
|
93
93
|
end
|
94
|
+
@metrics = ['CREDENTIALS_SSO']
|
94
95
|
else # legacy behavior
|
95
96
|
missing_keys = LEGACY_REQUIRED_OPTS.select { |k| options[k].nil? }
|
96
97
|
unless missing_keys.empty?
|
@@ -111,6 +112,7 @@ module Aws
|
|
111
112
|
client_opts[:credentials] = nil
|
112
113
|
|
113
114
|
@client = options[:client] || Aws::SSO::Client.new(client_opts)
|
115
|
+
@metrics = ['CREDENTIALS_SSO_LEGACY']
|
114
116
|
end
|
115
117
|
|
116
118
|
@async_refresh = true
|
data/lib/aws-sdk-sso/client.rb
CHANGED
@@ -7,34 +7,34 @@
|
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
10
|
-
require 'seahorse/client/plugins/content_length
|
11
|
-
require 'aws-sdk-core/plugins/credentials_configuration
|
12
|
-
require 'aws-sdk-core/plugins/logging
|
13
|
-
require 'aws-sdk-core/plugins/param_converter
|
14
|
-
require 'aws-sdk-core/plugins/param_validator
|
15
|
-
require 'aws-sdk-core/plugins/user_agent
|
16
|
-
require 'aws-sdk-core/plugins/helpful_socket_errors
|
17
|
-
require 'aws-sdk-core/plugins/retry_errors
|
18
|
-
require 'aws-sdk-core/plugins/global_configuration
|
19
|
-
require 'aws-sdk-core/plugins/regional_endpoint
|
20
|
-
require 'aws-sdk-core/plugins/endpoint_discovery
|
21
|
-
require 'aws-sdk-core/plugins/endpoint_pattern
|
22
|
-
require 'aws-sdk-core/plugins/response_paging
|
23
|
-
require 'aws-sdk-core/plugins/stub_responses
|
24
|
-
require 'aws-sdk-core/plugins/idempotency_token
|
25
|
-
require 'aws-sdk-core/plugins/invocation_id
|
26
|
-
require 'aws-sdk-core/plugins/jsonvalue_converter
|
27
|
-
require 'aws-sdk-core/plugins/client_metrics_plugin
|
28
|
-
require 'aws-sdk-core/plugins/client_metrics_send_plugin
|
29
|
-
require 'aws-sdk-core/plugins/transfer_encoding
|
30
|
-
require 'aws-sdk-core/plugins/http_checksum
|
31
|
-
require 'aws-sdk-core/plugins/checksum_algorithm
|
32
|
-
require 'aws-sdk-core/plugins/request_compression
|
33
|
-
require 'aws-sdk-core/plugins/defaults_mode
|
34
|
-
require 'aws-sdk-core/plugins/recursion_detection
|
35
|
-
require 'aws-sdk-core/plugins/telemetry
|
36
|
-
require 'aws-sdk-core/plugins/sign
|
37
|
-
require 'aws-sdk-core/plugins/protocols/rest_json
|
10
|
+
require 'seahorse/client/plugins/content_length'
|
11
|
+
require 'aws-sdk-core/plugins/credentials_configuration'
|
12
|
+
require 'aws-sdk-core/plugins/logging'
|
13
|
+
require 'aws-sdk-core/plugins/param_converter'
|
14
|
+
require 'aws-sdk-core/plugins/param_validator'
|
15
|
+
require 'aws-sdk-core/plugins/user_agent'
|
16
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors'
|
17
|
+
require 'aws-sdk-core/plugins/retry_errors'
|
18
|
+
require 'aws-sdk-core/plugins/global_configuration'
|
19
|
+
require 'aws-sdk-core/plugins/regional_endpoint'
|
20
|
+
require 'aws-sdk-core/plugins/endpoint_discovery'
|
21
|
+
require 'aws-sdk-core/plugins/endpoint_pattern'
|
22
|
+
require 'aws-sdk-core/plugins/response_paging'
|
23
|
+
require 'aws-sdk-core/plugins/stub_responses'
|
24
|
+
require 'aws-sdk-core/plugins/idempotency_token'
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id'
|
26
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter'
|
27
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin'
|
28
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin'
|
29
|
+
require 'aws-sdk-core/plugins/transfer_encoding'
|
30
|
+
require 'aws-sdk-core/plugins/http_checksum'
|
31
|
+
require 'aws-sdk-core/plugins/checksum_algorithm'
|
32
|
+
require 'aws-sdk-core/plugins/request_compression'
|
33
|
+
require 'aws-sdk-core/plugins/defaults_mode'
|
34
|
+
require 'aws-sdk-core/plugins/recursion_detection'
|
35
|
+
require 'aws-sdk-core/plugins/telemetry'
|
36
|
+
require 'aws-sdk-core/plugins/sign'
|
37
|
+
require 'aws-sdk-core/plugins/protocols/rest_json'
|
38
38
|
|
39
39
|
module Aws::SSO
|
40
40
|
# An API client for SSO. To construct a client, you need to configure a `:region` and `:credentials`.
|
@@ -257,11 +257,34 @@ module Aws::SSO
|
|
257
257
|
# Used when loading credentials from the shared credentials file
|
258
258
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
259
259
|
#
|
260
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
261
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
262
|
+
#
|
263
|
+
# * `when_supported` - (default) When set, a checksum will be
|
264
|
+
# calculated for all request payloads of operations modeled with the
|
265
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
266
|
+
# `requestAlgorithmMember` is modeled.
|
267
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
268
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
269
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
270
|
+
# is modeled and supplied.
|
271
|
+
#
|
260
272
|
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
261
273
|
# The minimum size in bytes that triggers compression for request
|
262
274
|
# bodies. The value must be non-negative integer value between 0
|
263
275
|
# and 10485780 bytes inclusive.
|
264
276
|
#
|
277
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
278
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
279
|
+
#
|
280
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
281
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
282
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
283
|
+
# are supported.
|
284
|
+
# * `when_required` - When set, checksum validation is not performed on
|
285
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
286
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
287
|
+
#
|
265
288
|
# @option options [Proc] :retry_backoff
|
266
289
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
267
290
|
# This option is only used in the `legacy` retry mode.
|
@@ -669,7 +692,7 @@ module Aws::SSO
|
|
669
692
|
tracer: tracer
|
670
693
|
)
|
671
694
|
context[:gem_name] = 'aws-sdk-core'
|
672
|
-
context[:gem_version] = '3.
|
695
|
+
context[:gem_version] = '3.222.2'
|
673
696
|
Seahorse::Client::Request.new(handlers, context)
|
674
697
|
end
|
675
698
|
|
@@ -10,43 +10,39 @@
|
|
10
10
|
module Aws::SSO
|
11
11
|
class EndpointProvider
|
12
12
|
def resolve_endpoint(parameters)
|
13
|
-
|
14
|
-
|
15
|
-
use_fips = parameters.use_fips
|
16
|
-
endpoint = parameters.endpoint
|
17
|
-
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
13
|
+
if Aws::Endpoints::Matchers.set?(parameters.endpoint)
|
14
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
19
15
|
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
16
|
end
|
21
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
22
18
|
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
19
|
end
|
24
|
-
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
20
|
+
return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
|
25
21
|
end
|
26
|
-
if Aws::Endpoints::Matchers.set?(region)
|
27
|
-
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
if Aws::Endpoints::Matchers.set?(parameters.region)
|
23
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
|
24
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
29
25
|
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
26
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
27
|
end
|
32
28
|
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
29
|
end
|
34
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
30
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
35
31
|
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
32
|
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
37
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.amazonaws.com", headers: {}, properties: {})
|
33
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
|
38
34
|
end
|
39
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
35
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
40
36
|
end
|
41
37
|
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
42
38
|
end
|
43
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
39
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
44
40
|
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
45
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
41
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
46
42
|
end
|
47
43
|
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
48
44
|
end
|
49
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
50
46
|
end
|
51
47
|
end
|
52
48
|
raise ArgumentError, "Invalid Configuration: Missing Region"
|