aws-sdk-core 3.185.1 → 3.214.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 +409 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +1 -2
- data/lib/aws-defaults.rb +4 -1
- data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
- data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +53 -0
- data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
- data/lib/aws-sdk-core/client_stubs.rb +23 -19
- data/lib/aws-sdk-core/credential_provider.rb +1 -1
- data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
- data/lib/aws-sdk-core/credentials.rb +13 -6
- data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +78 -11
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +6 -9
- data/lib/aws-sdk-core/endpoints.rb +74 -18
- data/lib/aws-sdk-core/error_handler.rb +41 -0
- data/lib/aws-sdk-core/errors.rb +11 -2
- data/lib/aws-sdk-core/event_emitter.rb +0 -16
- data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +17 -11
- data/lib/aws-sdk-core/json/handler.rb +13 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +32 -2
- data/lib/aws-sdk-core/json.rb +43 -14
- data/lib/aws-sdk-core/log/param_filter.rb +2 -2
- data/lib/aws-sdk-core/log.rb +10 -0
- data/lib/aws-sdk-core/lru_cache.rb +75 -0
- data/lib/aws-sdk-core/pageable_response.rb +1 -1
- data/lib/aws-sdk-core/param_validator.rb +7 -2
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +6 -3
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
- data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
- data/lib/aws-sdk-core/plugins/logging.rb +2 -0
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
- data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
- data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
- data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
- data/lib/aws-sdk-core/plugins/sign.rb +27 -15
- data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
- data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
- data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -2
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
- data/lib/aws-sdk-core/plugins/user_agent.rb +70 -26
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +47 -28
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query/param_builder.rb +2 -2
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/refreshing_credentials.rb +12 -6
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/body.rb +32 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +14 -6
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
- data/lib/aws-sdk-core/rest/response/body.rb +15 -1
- data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
- data/lib/aws-sdk-core/rest.rb +1 -0
- data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
- data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +7 -2
- data/lib/aws-sdk-core/shared_credentials.rb +0 -7
- data/lib/aws-sdk-core/sso_credentials.rb +2 -1
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
- data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
- data/lib/aws-sdk-core/stubbing.rb +22 -0
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core/util.rb +39 -0
- data/lib/aws-sdk-core/waiters/poller.rb +10 -5
- data/lib/aws-sdk-core/xml/builder.rb +17 -9
- data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
- data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +82 -107
- data/lib/aws-sdk-sso/client.rb +119 -55
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-sso/endpoints.rb +2 -54
- data/lib/aws-sdk-sso/plugins/endpoints.rb +23 -22
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +504 -83
- data/lib/aws-sdk-ssooidc/client_api.rb +83 -1
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +2 -2
- data/lib/aws-sdk-ssooidc/endpoints.rb +2 -40
- data/lib/aws-sdk-ssooidc/errors.rb +52 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +23 -20
- data/lib/aws-sdk-ssooidc/types.rb +373 -51
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +334 -105
- data/lib/aws-sdk-sts/client_api.rb +36 -10
- data/lib/aws-sdk-sts/customizations.rb +5 -1
- data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
- data/lib/aws-sdk-sts/endpoint_provider.rb +2 -2
- data/lib/aws-sdk-sts/endpoints.rb +2 -118
- data/lib/aws-sdk-sts/plugins/endpoints.rb +23 -30
- data/lib/aws-sdk-sts/presigner.rb +1 -1
- data/lib/aws-sdk-sts/types.rb +188 -30
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/async_base.rb +1 -1
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -7
- data/lib/seahorse/client/h2/handler.rb +14 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +11 -11
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/plugin.rb +9 -0
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +3 -3
- data/lib/seahorse/client/plugins/net_http.rb +57 -16
- data/lib/seahorse/client/request_context.rb +8 -1
- data/lib/seahorse/model/shapes.rb +2 -2
- data/sig/aws-sdk-core/client_stubs.rbs +10 -0
- data/sig/aws-sdk-core/errors.rbs +22 -0
- data/sig/aws-sdk-core/resources/collection.rbs +21 -0
- data/sig/aws-sdk-core/structure.rbs +4 -0
- data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
- data/sig/aws-sdk-core.rbs +7 -0
- data/sig/seahorse/client/base.rbs +25 -0
- data/sig/seahorse/client/handler_builder.rbs +16 -0
- data/sig/seahorse/client/response.rbs +61 -0
- metadata +61 -19
- /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -7,6 +7,7 @@
|
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
10
|
+
|
10
11
|
module Aws::STS
|
11
12
|
# @api private
|
12
13
|
module ClientApi
|
@@ -19,12 +20,14 @@ module Aws::STS
|
|
19
20
|
AssumeRoleWithSAMLResponse = Shapes::StructureShape.new(name: 'AssumeRoleWithSAMLResponse')
|
20
21
|
AssumeRoleWithWebIdentityRequest = Shapes::StructureShape.new(name: 'AssumeRoleWithWebIdentityRequest')
|
21
22
|
AssumeRoleWithWebIdentityResponse = Shapes::StructureShape.new(name: 'AssumeRoleWithWebIdentityResponse')
|
23
|
+
AssumeRootRequest = Shapes::StructureShape.new(name: 'AssumeRootRequest')
|
24
|
+
AssumeRootResponse = Shapes::StructureShape.new(name: 'AssumeRootResponse')
|
22
25
|
AssumedRoleUser = Shapes::StructureShape.new(name: 'AssumedRoleUser')
|
23
26
|
Audience = Shapes::StringShape.new(name: 'Audience')
|
24
27
|
Credentials = Shapes::StructureShape.new(name: 'Credentials')
|
25
28
|
DecodeAuthorizationMessageRequest = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageRequest')
|
26
29
|
DecodeAuthorizationMessageResponse = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageResponse')
|
27
|
-
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
|
30
|
+
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException', error: {"code"=>"ExpiredTokenException", "httpStatusCode"=>400, "senderFault"=>true})
|
28
31
|
FederatedUser = Shapes::StructureShape.new(name: 'FederatedUser')
|
29
32
|
GetAccessKeyInfoRequest = Shapes::StructureShape.new(name: 'GetAccessKeyInfoRequest')
|
30
33
|
GetAccessKeyInfoResponse = Shapes::StructureShape.new(name: 'GetAccessKeyInfoResponse')
|
@@ -34,22 +37,24 @@ module Aws::STS
|
|
34
37
|
GetFederationTokenResponse = Shapes::StructureShape.new(name: 'GetFederationTokenResponse')
|
35
38
|
GetSessionTokenRequest = Shapes::StructureShape.new(name: 'GetSessionTokenRequest')
|
36
39
|
GetSessionTokenResponse = Shapes::StructureShape.new(name: 'GetSessionTokenResponse')
|
37
|
-
IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException')
|
38
|
-
IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException')
|
39
|
-
InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException')
|
40
|
-
InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException')
|
40
|
+
IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException', error: {"code"=>"IDPCommunicationError", "httpStatusCode"=>400, "senderFault"=>true})
|
41
|
+
IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException', error: {"code"=>"IDPRejectedClaim", "httpStatusCode"=>403, "senderFault"=>true})
|
42
|
+
InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException', error: {"code"=>"InvalidAuthorizationMessageException", "httpStatusCode"=>400, "senderFault"=>true})
|
43
|
+
InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException', error: {"code"=>"InvalidIdentityToken", "httpStatusCode"=>400, "senderFault"=>true})
|
41
44
|
Issuer = Shapes::StringShape.new(name: 'Issuer')
|
42
|
-
MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException')
|
45
|
+
MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException', error: {"code"=>"MalformedPolicyDocument", "httpStatusCode"=>400, "senderFault"=>true})
|
43
46
|
NameQualifier = Shapes::StringShape.new(name: 'NameQualifier')
|
44
|
-
PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException')
|
47
|
+
PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException', error: {"code"=>"PackedPolicyTooLarge", "httpStatusCode"=>400, "senderFault"=>true})
|
45
48
|
PolicyDescriptorType = Shapes::StructureShape.new(name: 'PolicyDescriptorType')
|
46
49
|
ProvidedContext = Shapes::StructureShape.new(name: 'ProvidedContext')
|
47
50
|
ProvidedContextsListType = Shapes::ListShape.new(name: 'ProvidedContextsListType')
|
48
|
-
RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException')
|
51
|
+
RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException', error: {"code"=>"RegionDisabledException", "httpStatusCode"=>403, "senderFault"=>true})
|
52
|
+
RootDurationSecondsType = Shapes::IntegerShape.new(name: 'RootDurationSecondsType')
|
49
53
|
SAMLAssertionType = Shapes::StringShape.new(name: 'SAMLAssertionType')
|
50
54
|
Subject = Shapes::StringShape.new(name: 'Subject')
|
51
55
|
SubjectType = Shapes::StringShape.new(name: 'SubjectType')
|
52
56
|
Tag = Shapes::StructureShape.new(name: 'Tag')
|
57
|
+
TargetPrincipalType = Shapes::StringShape.new(name: 'TargetPrincipalType')
|
53
58
|
accessKeyIdType = Shapes::StringShape.new(name: 'accessKeyIdType')
|
54
59
|
accessKeySecretType = Shapes::StringShape.new(name: 'accessKeySecretType')
|
55
60
|
accountType = Shapes::StringShape.new(name: 'accountType')
|
@@ -147,6 +152,15 @@ module Aws::STS
|
|
147
152
|
AssumeRoleWithWebIdentityResponse.add_member(:source_identity, Shapes::ShapeRef.new(shape: sourceIdentityType, location_name: "SourceIdentity"))
|
148
153
|
AssumeRoleWithWebIdentityResponse.struct_class = Types::AssumeRoleWithWebIdentityResponse
|
149
154
|
|
155
|
+
AssumeRootRequest.add_member(:target_principal, Shapes::ShapeRef.new(shape: TargetPrincipalType, required: true, location_name: "TargetPrincipal"))
|
156
|
+
AssumeRootRequest.add_member(:task_policy_arn, Shapes::ShapeRef.new(shape: PolicyDescriptorType, required: true, location_name: "TaskPolicyArn"))
|
157
|
+
AssumeRootRequest.add_member(:duration_seconds, Shapes::ShapeRef.new(shape: RootDurationSecondsType, location_name: "DurationSeconds"))
|
158
|
+
AssumeRootRequest.struct_class = Types::AssumeRootRequest
|
159
|
+
|
160
|
+
AssumeRootResponse.add_member(:credentials, Shapes::ShapeRef.new(shape: Credentials, location_name: "Credentials"))
|
161
|
+
AssumeRootResponse.add_member(:source_identity, Shapes::ShapeRef.new(shape: sourceIdentityType, location_name: "SourceIdentity"))
|
162
|
+
AssumeRootResponse.struct_class = Types::AssumeRootResponse
|
163
|
+
|
150
164
|
AssumedRoleUser.add_member(:assumed_role_id, Shapes::ShapeRef.new(shape: assumedRoleIdType, required: true, location_name: "AssumedRoleId"))
|
151
165
|
AssumedRoleUser.add_member(:arn, Shapes::ShapeRef.new(shape: arnType, required: true, location_name: "Arn"))
|
152
166
|
AssumedRoleUser.struct_class = Types::AssumedRoleUser
|
@@ -251,9 +265,11 @@ module Aws::STS
|
|
251
265
|
|
252
266
|
api.metadata = {
|
253
267
|
"apiVersion" => "2011-06-15",
|
268
|
+
"auth" => ["aws.auth#sigv4"],
|
254
269
|
"endpointPrefix" => "sts",
|
255
270
|
"globalEndpoint" => "sts.amazonaws.com",
|
256
271
|
"protocol" => "query",
|
272
|
+
"protocols" => ["query"],
|
257
273
|
"serviceAbbreviation" => "AWS STS",
|
258
274
|
"serviceFullName" => "AWS Security Token Service",
|
259
275
|
"serviceId" => "STS",
|
@@ -278,7 +294,7 @@ module Aws::STS
|
|
278
294
|
o.name = "AssumeRoleWithSAML"
|
279
295
|
o.http_method = "POST"
|
280
296
|
o.http_request_uri = "/"
|
281
|
-
o['
|
297
|
+
o['auth'] = ["smithy.api#noAuth"]
|
282
298
|
o.input = Shapes::ShapeRef.new(shape: AssumeRoleWithSAMLRequest)
|
283
299
|
o.output = Shapes::ShapeRef.new(shape: AssumeRoleWithSAMLResponse)
|
284
300
|
o.errors << Shapes::ShapeRef.new(shape: MalformedPolicyDocumentException)
|
@@ -293,7 +309,7 @@ module Aws::STS
|
|
293
309
|
o.name = "AssumeRoleWithWebIdentity"
|
294
310
|
o.http_method = "POST"
|
295
311
|
o.http_request_uri = "/"
|
296
|
-
o['
|
312
|
+
o['auth'] = ["smithy.api#noAuth"]
|
297
313
|
o.input = Shapes::ShapeRef.new(shape: AssumeRoleWithWebIdentityRequest)
|
298
314
|
o.output = Shapes::ShapeRef.new(shape: AssumeRoleWithWebIdentityResponse)
|
299
315
|
o.errors << Shapes::ShapeRef.new(shape: MalformedPolicyDocumentException)
|
@@ -305,6 +321,16 @@ module Aws::STS
|
|
305
321
|
o.errors << Shapes::ShapeRef.new(shape: RegionDisabledException)
|
306
322
|
end)
|
307
323
|
|
324
|
+
api.add_operation(:assume_root, Seahorse::Model::Operation.new.tap do |o|
|
325
|
+
o.name = "AssumeRoot"
|
326
|
+
o.http_method = "POST"
|
327
|
+
o.http_request_uri = "/"
|
328
|
+
o.input = Shapes::ShapeRef.new(shape: AssumeRootRequest)
|
329
|
+
o.output = Shapes::ShapeRef.new(shape: AssumeRootResponse)
|
330
|
+
o.errors << Shapes::ShapeRef.new(shape: RegionDisabledException)
|
331
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
|
332
|
+
end)
|
333
|
+
|
308
334
|
api.add_operation(:decode_authorization_message, Seahorse::Model::Operation.new.tap do |o|
|
309
335
|
o.name = "DecodeAuthorizationMessage"
|
310
336
|
o.http_method = "POST"
|
@@ -59,20 +59,21 @@ module Aws::STS
|
|
59
59
|
self[:region] = options[:region]
|
60
60
|
self[:use_dual_stack] = options[:use_dual_stack]
|
61
61
|
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
62
|
-
if self[:use_dual_stack].nil?
|
63
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
64
|
-
end
|
65
62
|
self[:use_fips] = options[:use_fips]
|
66
63
|
self[:use_fips] = false if self[:use_fips].nil?
|
67
|
-
if self[:use_fips].nil?
|
68
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
69
|
-
end
|
70
64
|
self[:endpoint] = options[:endpoint]
|
71
65
|
self[:use_global_endpoint] = options[:use_global_endpoint]
|
72
66
|
self[:use_global_endpoint] = false if self[:use_global_endpoint].nil?
|
73
|
-
|
74
|
-
|
75
|
-
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.create(config, options={})
|
70
|
+
new({
|
71
|
+
region: config.region,
|
72
|
+
use_dual_stack: config.use_dualstack_endpoint,
|
73
|
+
use_fips: config.use_fips_endpoint,
|
74
|
+
endpoint: (config.endpoint.to_s unless config.regional_endpoint),
|
75
|
+
use_global_endpoint: config.sts_regional_endpoints == 'legacy',
|
76
|
+
}.merge(options))
|
76
77
|
end
|
77
78
|
end
|
78
79
|
end
|
@@ -84,8 +84,8 @@ module Aws::STS
|
|
84
84
|
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
85
85
|
end
|
86
86
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
87
|
-
if Aws::Endpoints::Matchers.boolean_equals?(
|
88
|
-
if Aws::Endpoints::Matchers.string_equals?(
|
87
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
88
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
|
89
89
|
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.amazonaws.com", headers: {}, properties: {})
|
90
90
|
end
|
91
91
|
return Aws::Endpoints::Endpoint.new(url: "https://sts-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
@@ -12,125 +12,9 @@ module Aws::STS
|
|
12
12
|
# @api private
|
13
13
|
module Endpoints
|
14
14
|
|
15
|
-
class AssumeRole
|
16
|
-
def self.build(context)
|
17
|
-
unless context.config.regional_endpoint
|
18
|
-
endpoint = context.config.endpoint.to_s
|
19
|
-
end
|
20
|
-
Aws::STS::EndpointParameters.new(
|
21
|
-
region: context.config.region,
|
22
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
23
|
-
use_fips: context.config.use_fips_endpoint,
|
24
|
-
endpoint: endpoint,
|
25
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
26
|
-
)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
class AssumeRoleWithSAML
|
31
|
-
def self.build(context)
|
32
|
-
unless context.config.regional_endpoint
|
33
|
-
endpoint = context.config.endpoint.to_s
|
34
|
-
end
|
35
|
-
Aws::STS::EndpointParameters.new(
|
36
|
-
region: context.config.region,
|
37
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
38
|
-
use_fips: context.config.use_fips_endpoint,
|
39
|
-
endpoint: endpoint,
|
40
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
41
|
-
)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
class AssumeRoleWithWebIdentity
|
46
|
-
def self.build(context)
|
47
|
-
unless context.config.regional_endpoint
|
48
|
-
endpoint = context.config.endpoint.to_s
|
49
|
-
end
|
50
|
-
Aws::STS::EndpointParameters.new(
|
51
|
-
region: context.config.region,
|
52
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
53
|
-
use_fips: context.config.use_fips_endpoint,
|
54
|
-
endpoint: endpoint,
|
55
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
56
|
-
)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
class DecodeAuthorizationMessage
|
61
|
-
def self.build(context)
|
62
|
-
unless context.config.regional_endpoint
|
63
|
-
endpoint = context.config.endpoint.to_s
|
64
|
-
end
|
65
|
-
Aws::STS::EndpointParameters.new(
|
66
|
-
region: context.config.region,
|
67
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
68
|
-
use_fips: context.config.use_fips_endpoint,
|
69
|
-
endpoint: endpoint,
|
70
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
71
|
-
)
|
72
|
-
end
|
73
|
-
end
|
74
15
|
|
75
|
-
|
76
|
-
|
77
|
-
unless context.config.regional_endpoint
|
78
|
-
endpoint = context.config.endpoint.to_s
|
79
|
-
end
|
80
|
-
Aws::STS::EndpointParameters.new(
|
81
|
-
region: context.config.region,
|
82
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
83
|
-
use_fips: context.config.use_fips_endpoint,
|
84
|
-
endpoint: endpoint,
|
85
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
86
|
-
)
|
87
|
-
end
|
16
|
+
def self.parameters_for_operation(context)
|
17
|
+
Aws::STS::EndpointParameters.create(context.config)
|
88
18
|
end
|
89
|
-
|
90
|
-
class GetCallerIdentity
|
91
|
-
def self.build(context)
|
92
|
-
unless context.config.regional_endpoint
|
93
|
-
endpoint = context.config.endpoint.to_s
|
94
|
-
end
|
95
|
-
Aws::STS::EndpointParameters.new(
|
96
|
-
region: context.config.region,
|
97
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
98
|
-
use_fips: context.config.use_fips_endpoint,
|
99
|
-
endpoint: endpoint,
|
100
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
101
|
-
)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
class GetFederationToken
|
106
|
-
def self.build(context)
|
107
|
-
unless context.config.regional_endpoint
|
108
|
-
endpoint = context.config.endpoint.to_s
|
109
|
-
end
|
110
|
-
Aws::STS::EndpointParameters.new(
|
111
|
-
region: context.config.region,
|
112
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
113
|
-
use_fips: context.config.use_fips_endpoint,
|
114
|
-
endpoint: endpoint,
|
115
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
116
|
-
)
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
class GetSessionToken
|
121
|
-
def self.build(context)
|
122
|
-
unless context.config.regional_endpoint
|
123
|
-
endpoint = context.config.endpoint.to_s
|
124
|
-
end
|
125
|
-
Aws::STS::EndpointParameters.new(
|
126
|
-
region: context.config.region,
|
127
|
-
use_dual_stack: context.config.use_dualstack_endpoint,
|
128
|
-
use_fips: context.config.use_fips_endpoint,
|
129
|
-
endpoint: endpoint,
|
130
|
-
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
131
|
-
)
|
132
|
-
end
|
133
|
-
end
|
134
|
-
|
135
19
|
end
|
136
20
|
end
|
@@ -14,35 +14,49 @@ module Aws::STS
|
|
14
14
|
option(
|
15
15
|
:endpoint_provider,
|
16
16
|
doc_type: 'Aws::STS::EndpointProvider',
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
rbs_type: 'untyped',
|
18
|
+
docstring: <<~DOCS) do |_cfg|
|
19
|
+
The endpoint provider used to resolve endpoints. Any object that responds to
|
20
|
+
`#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
21
|
+
`Aws::STS::EndpointParameters`.
|
22
|
+
DOCS
|
22
23
|
Aws::STS::EndpointProvider.new
|
23
24
|
end
|
24
25
|
|
25
26
|
# @api private
|
26
27
|
class Handler < Seahorse::Client::Handler
|
27
28
|
def call(context)
|
28
|
-
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
29
|
unless context[:discovered_endpoint]
|
30
|
-
params = parameters_for_operation(context)
|
30
|
+
params = Aws::STS::Endpoints.parameters_for_operation(context)
|
31
31
|
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
32
|
|
33
33
|
context.http_request.endpoint = endpoint.url
|
34
34
|
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
|
36
|
+
context[:endpoint_params] = params
|
37
|
+
context[:endpoint_properties] = endpoint.properties
|
35
38
|
end
|
36
39
|
|
37
|
-
context[:endpoint_params] = params
|
38
40
|
context[:auth_scheme] =
|
39
41
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
42
|
|
41
|
-
@handler.call(context)
|
43
|
+
with_metrics(context) { @handler.call(context) }
|
42
44
|
end
|
43
45
|
|
44
46
|
private
|
45
47
|
|
48
|
+
def with_metrics(context, &block)
|
49
|
+
metrics = []
|
50
|
+
metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
|
51
|
+
if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
|
52
|
+
metrics << 'SIGV4A_SIGNING'
|
53
|
+
end
|
54
|
+
if context.config.credentials&.credentials&.account_id
|
55
|
+
metrics << 'RESOLVED_ACCOUNT_ID'
|
56
|
+
end
|
57
|
+
Aws::Plugins::UserAgent.metric(*metrics, &block)
|
58
|
+
end
|
59
|
+
|
46
60
|
def apply_endpoint_headers(context, headers)
|
47
61
|
headers.each do |key, values|
|
48
62
|
value = values
|
@@ -53,27 +67,6 @@ module Aws::STS
|
|
53
67
|
context.http_request.headers[key] = value
|
54
68
|
end
|
55
69
|
end
|
56
|
-
|
57
|
-
def parameters_for_operation(context)
|
58
|
-
case context.operation_name
|
59
|
-
when :assume_role
|
60
|
-
Aws::STS::Endpoints::AssumeRole.build(context)
|
61
|
-
when :assume_role_with_saml
|
62
|
-
Aws::STS::Endpoints::AssumeRoleWithSAML.build(context)
|
63
|
-
when :assume_role_with_web_identity
|
64
|
-
Aws::STS::Endpoints::AssumeRoleWithWebIdentity.build(context)
|
65
|
-
when :decode_authorization_message
|
66
|
-
Aws::STS::Endpoints::DecodeAuthorizationMessage.build(context)
|
67
|
-
when :get_access_key_info
|
68
|
-
Aws::STS::Endpoints::GetAccessKeyInfo.build(context)
|
69
|
-
when :get_caller_identity
|
70
|
-
Aws::STS::Endpoints::GetCallerIdentity.build(context)
|
71
|
-
when :get_federation_token
|
72
|
-
Aws::STS::Endpoints::GetFederationToken.build(context)
|
73
|
-
when :get_session_token
|
74
|
-
Aws::STS::Endpoints::GetSessionToken.build(context)
|
75
|
-
end
|
76
|
-
end
|
77
70
|
end
|
78
71
|
|
79
72
|
def add_handlers(handlers, _config)
|
@@ -35,7 +35,7 @@ module Aws
|
|
35
35
|
# )
|
36
36
|
#
|
37
37
|
# This can be easily converted to a token used by the EKS service:
|
38
|
-
# {https://ruby-
|
38
|
+
# {https://docs.ruby-lang.org/en/3.2/Base64.html#method-i-encode64}
|
39
39
|
# "k8s-aws-v1." + Base64.urlsafe_encode64(url).chomp("==")
|
40
40
|
def get_caller_identity_presigned_url(options = {})
|
41
41
|
req = @client.build_request(:get_caller_identity, {})
|