aws-sdk-core 3.197.0 → 3.220.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/CHANGELOG.md +297 -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/arn.rb +1 -3
- 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 -4
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- 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 +308 -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 +8 -7
- 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/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 +9 -0
- data/lib/aws-sdk-core/json/error_handler.rb +8 -9
- data/lib/aws-sdk-core/json/handler.rb +6 -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 +2 -0
- 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/param_formatter.rb +7 -3
- data/lib/aws-sdk-core/log.rb +10 -0
- data/lib/aws-sdk-core/param_validator.rb +1 -1
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -169
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
- 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 +4 -3
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +5 -1
- 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/retry_errors.rb +0 -1
- data/lib/aws-sdk-core/plugins/sign.rb +13 -11
- 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 +29 -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 +26 -8
- 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/handler.rb +4 -4
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/{request/content_type.rb → content_type_handler.rb} +1 -1
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/endpoint.rb +3 -1
- data/lib/aws-sdk-core/rest/request/headers.rb +2 -2
- data/lib/aws-sdk-core/rest.rb +1 -1
- 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/waiters/poller.rb +9 -4
- data/lib/aws-sdk-core/xml/error_handler.rb +11 -37
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +82 -108
- data/lib/aws-sdk-sso/client.rb +99 -37
- 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/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-sso/endpoints.rb +2 -54
- data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +123 -55
- data/lib/aws-sdk-ssooidc/client_api.rb +5 -0
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
- data/lib/aws-sdk-ssooidc/types.rb +21 -15
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +307 -89
- data/lib/aws-sdk-sts/client_api.rb +28 -2
- 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 +33 -38
- data/lib/aws-sdk-sts/endpoints.rb +2 -118
- data/lib/aws-sdk-sts/errors.rb +16 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
- data/lib/aws-sdk-sts/types.rb +171 -28
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/base.rb +17 -7
- data/lib/seahorse/client/h2/handler.rb +13 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +10 -2
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/net_http.rb +9 -0
- data/lib/seahorse/client/request_context.rb +8 -1
- data/lib/seahorse/client/response.rb +2 -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
- metadata +62 -18
- /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
data/lib/aws-sdk-sts/types.rb
CHANGED
@@ -26,10 +26,21 @@ module Aws::STS
|
|
26
26
|
# that use the temporary security credentials will expose the role
|
27
27
|
# session name to the external account in their CloudTrail logs.
|
28
28
|
#
|
29
|
+
# For security purposes, administrators can view this field in
|
30
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
31
|
+
# Amazon Web Services. Your administrator might require that you
|
32
|
+
# specify your user name as the session name when you assume the role.
|
33
|
+
# For more information, see [ `sts:RoleSessionName` ][2].
|
34
|
+
#
|
29
35
|
# The regex used to validate this parameter is a string of characters
|
30
36
|
# consisting of upper- and lower-case alphanumeric characters with no
|
31
37
|
# spaces. You can also include underscores or any of the following
|
32
38
|
# characters: =,.@-
|
39
|
+
#
|
40
|
+
#
|
41
|
+
#
|
42
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
43
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
33
44
|
# @return [String]
|
34
45
|
#
|
35
46
|
# @!attribute [rw] policy_arns
|
@@ -101,6 +112,9 @@ module Aws::STS
|
|
101
112
|
#
|
102
113
|
# </note>
|
103
114
|
#
|
115
|
+
# For more information about role session permissions, see [Session
|
116
|
+
# policies][1].
|
117
|
+
#
|
104
118
|
#
|
105
119
|
#
|
106
120
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
|
@@ -125,8 +139,7 @@ module Aws::STS
|
|
125
139
|
# However, if you assume a role using role chaining and provide a
|
126
140
|
# `DurationSeconds` parameter value greater than one hour, the
|
127
141
|
# operation fails. To learn how to view the maximum value for your
|
128
|
-
# role, see [
|
129
|
-
# in the *IAM User Guide*.
|
142
|
+
# role, see [Update the maximum session duration for a role][1].
|
130
143
|
#
|
131
144
|
# By default, the value is set to `3600` seconds.
|
132
145
|
#
|
@@ -142,7 +155,7 @@ module Aws::STS
|
|
142
155
|
#
|
143
156
|
#
|
144
157
|
#
|
145
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
158
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
|
146
159
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
|
147
160
|
# @return [Integer]
|
148
161
|
#
|
@@ -199,9 +212,8 @@ module Aws::STS
|
|
199
212
|
# passes to subsequent sessions in a role chain. For more information,
|
200
213
|
# see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
|
201
214
|
#
|
202
|
-
# This parameter is optional.
|
203
|
-
#
|
204
|
-
# affected.
|
215
|
+
# This parameter is optional. The transitive status of a session tag
|
216
|
+
# does not impact its packed binary size.
|
205
217
|
#
|
206
218
|
# If you choose not to specify a transitive tag key, then no tags are
|
207
219
|
# passed from this session to any subsequent sessions.
|
@@ -263,28 +275,31 @@ module Aws::STS
|
|
263
275
|
#
|
264
276
|
# @!attribute [rw] source_identity
|
265
277
|
# The source identity specified by the principal that is calling the
|
266
|
-
# `AssumeRole` operation.
|
278
|
+
# `AssumeRole` operation. The source identity value persists across
|
279
|
+
# [chained role][1] sessions.
|
267
280
|
#
|
268
281
|
# You can require users to specify a source identity when they assume
|
269
|
-
# a role. You do this by using the `sts:SourceIdentity`
|
270
|
-
# in a role trust policy. You can use source identity
|
271
|
-
# CloudTrail logs to determine who took actions with a
|
272
|
-
# use the `aws:SourceIdentity` condition key to further
|
273
|
-
# to Amazon Web Services resources based on the value
|
274
|
-
# identity. For more information about using source
|
275
|
-
# [Monitor and control actions taken with assumed
|
276
|
-
# *IAM User Guide*.
|
282
|
+
# a role. You do this by using the [ `sts:SourceIdentity` ][2]
|
283
|
+
# condition key in a role trust policy. You can use source identity
|
284
|
+
# information in CloudTrail logs to determine who took actions with a
|
285
|
+
# role. You can use the `aws:SourceIdentity` condition key to further
|
286
|
+
# control access to Amazon Web Services resources based on the value
|
287
|
+
# of source identity. For more information about using source
|
288
|
+
# identity, see [Monitor and control actions taken with assumed
|
289
|
+
# roles][3] in the *IAM User Guide*.
|
277
290
|
#
|
278
291
|
# The regex used to validate this parameter is a string of characters
|
279
292
|
# consisting of upper- and lower-case alphanumeric characters with no
|
280
293
|
# spaces. You can also include underscores or any of the following
|
281
|
-
# characters:
|
294
|
+
# characters: +=,.@-. You cannot use a value that begins with the text
|
282
295
|
# `aws:`. This prefix is reserved for Amazon Web Services internal
|
283
296
|
# use.
|
284
297
|
#
|
285
298
|
#
|
286
299
|
#
|
287
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
300
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
|
301
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
|
302
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
288
303
|
# @return [String]
|
289
304
|
#
|
290
305
|
# @!attribute [rw] provided_contexts
|
@@ -297,7 +312,7 @@ module Aws::STS
|
|
297
312
|
# context provider from which the trusted context assertion was
|
298
313
|
# generated.
|
299
314
|
#
|
300
|
-
# `[
|
315
|
+
# `[{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]`
|
301
316
|
# @return [Array<Types::ProvidedContext>]
|
302
317
|
#
|
303
318
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest AWS API Documentation
|
@@ -465,6 +480,9 @@ module Aws::STS
|
|
465
480
|
# include the tab (\\u0009), linefeed (\\u000A), and carriage return
|
466
481
|
# (\\u000D) characters.
|
467
482
|
#
|
483
|
+
# For more information about role session permissions, see [Session
|
484
|
+
# policies][1].
|
485
|
+
#
|
468
486
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
|
469
487
|
# session policy, managed policy ARNs, and session tags into a packed
|
470
488
|
# binary format that has a separate limit. Your request can fail for
|
@@ -600,6 +618,8 @@ module Aws::STS
|
|
600
618
|
#
|
601
619
|
# @!attribute [rw] source_identity
|
602
620
|
# The value in the `SourceIdentity` attribute in the SAML assertion.
|
621
|
+
# The source identity value persists across [chained role][1]
|
622
|
+
# sessions.
|
603
623
|
#
|
604
624
|
# You can require users to set a source identity value when they
|
605
625
|
# assume a role. You do this by using the `sts:SourceIdentity`
|
@@ -607,12 +627,12 @@ module Aws::STS
|
|
607
627
|
# taken with the role are associated with that user. After the source
|
608
628
|
# identity is set, the value cannot be changed. It is present in the
|
609
629
|
# request for all actions that are taken by the role and persists
|
610
|
-
# across [chained role][
|
630
|
+
# across [chained role][2] sessions. You can configure your SAML
|
611
631
|
# identity provider to use an attribute associated with your users,
|
612
632
|
# like user name or email, as the source identity when calling
|
613
633
|
# `AssumeRoleWithSAML`. You do this by adding an attribute to the SAML
|
614
634
|
# assertion. For more information about using source identity, see
|
615
|
-
# [Monitor and control actions taken with assumed roles][
|
635
|
+
# [Monitor and control actions taken with assumed roles][3] in the
|
616
636
|
# *IAM User Guide*.
|
617
637
|
#
|
618
638
|
# The regex used to validate this parameter is a string of characters
|
@@ -622,8 +642,9 @@ module Aws::STS
|
|
622
642
|
#
|
623
643
|
#
|
624
644
|
#
|
625
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
626
|
-
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/
|
645
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
|
646
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts
|
647
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
627
648
|
# @return [String]
|
628
649
|
#
|
629
650
|
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLResponse AWS API Documentation
|
@@ -645,6 +666,24 @@ module Aws::STS
|
|
645
666
|
# @!attribute [rw] role_arn
|
646
667
|
# The Amazon Resource Name (ARN) of the role that the caller is
|
647
668
|
# assuming.
|
669
|
+
#
|
670
|
+
# <note markdown="1"> Additional considerations apply to Amazon Cognito identity pools
|
671
|
+
# that assume [cross-account IAM roles][1]. The trust policies of
|
672
|
+
# these roles must accept the `cognito-identity.amazonaws.com` service
|
673
|
+
# principal and must contain the `cognito-identity.amazonaws.com:aud`
|
674
|
+
# condition key to restrict role assumption to users from your
|
675
|
+
# intended identity pools. A policy that trusts Amazon Cognito
|
676
|
+
# identity pools without this condition creates a risk that a user
|
677
|
+
# from an unintended identity pool can assume the role. For more
|
678
|
+
# information, see [ Trust policies for IAM roles in Basic (Classic)
|
679
|
+
# authentication ][2] in the *Amazon Cognito Developer Guide*.
|
680
|
+
#
|
681
|
+
# </note>
|
682
|
+
#
|
683
|
+
#
|
684
|
+
#
|
685
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
|
686
|
+
# [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
|
648
687
|
# @return [String]
|
649
688
|
#
|
650
689
|
# @!attribute [rw] role_session_name
|
@@ -655,10 +694,21 @@ module Aws::STS
|
|
655
694
|
# session name is included as part of the ARN and assumed role ID in
|
656
695
|
# the `AssumedRoleUser` response element.
|
657
696
|
#
|
697
|
+
# For security purposes, administrators can view this field in
|
698
|
+
# [CloudTrail logs][1] to help identify who performed an action in
|
699
|
+
# Amazon Web Services. Your administrator might require that you
|
700
|
+
# specify your user name as the session name when you assume the role.
|
701
|
+
# For more information, see [ `sts:RoleSessionName` ][2].
|
702
|
+
#
|
658
703
|
# The regex used to validate this parameter is a string of characters
|
659
704
|
# consisting of upper- and lower-case alphanumeric characters with no
|
660
705
|
# spaces. You can also include underscores or any of the following
|
661
706
|
# characters: =,.@-
|
707
|
+
#
|
708
|
+
#
|
709
|
+
#
|
710
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
|
711
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
|
662
712
|
# @return [String]
|
663
713
|
#
|
664
714
|
# @!attribute [rw] web_identity_token
|
@@ -666,8 +716,10 @@ module Aws::STS
|
|
666
716
|
# provided by the identity provider. Your application must get this
|
667
717
|
# token by authenticating the user who is using your application with
|
668
718
|
# a web identity provider before the application makes an
|
669
|
-
# `AssumeRoleWithWebIdentity` call.
|
670
|
-
#
|
719
|
+
# `AssumeRoleWithWebIdentity` call. Timestamps in the token must be
|
720
|
+
# formatted as either an integer or a long integer. Tokens must be
|
721
|
+
# signed using either RSA keys (RS256, RS384, or RS512) or ECDSA keys
|
722
|
+
# (ES256, ES384, or ES512).
|
671
723
|
# @return [String]
|
672
724
|
#
|
673
725
|
# @!attribute [rw] provider_id
|
@@ -741,6 +793,9 @@ module Aws::STS
|
|
741
793
|
# include the tab (\\u0009), linefeed (\\u000A), and carriage return
|
742
794
|
# (\\u000D) characters.
|
743
795
|
#
|
796
|
+
# For more information about role session permissions, see [Session
|
797
|
+
# policies][1].
|
798
|
+
#
|
744
799
|
# <note markdown="1"> An Amazon Web Services conversion compresses the passed inline
|
745
800
|
# session policy, managed policy ARNs, and session tags into a packed
|
746
801
|
# binary format that has a separate limit. Your request can fail for
|
@@ -881,7 +936,7 @@ module Aws::STS
|
|
881
936
|
#
|
882
937
|
#
|
883
938
|
#
|
884
|
-
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts
|
939
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts
|
885
940
|
# [2]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html
|
886
941
|
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
887
942
|
# @return [String]
|
@@ -900,6 +955,92 @@ module Aws::STS
|
|
900
955
|
include Aws::Structure
|
901
956
|
end
|
902
957
|
|
958
|
+
# @!attribute [rw] target_principal
|
959
|
+
# The member account principal ARN or account ID.
|
960
|
+
# @return [String]
|
961
|
+
#
|
962
|
+
# @!attribute [rw] task_policy_arn
|
963
|
+
# The identity based policy that scopes the session to the privileged
|
964
|
+
# tasks that can be performed. You can use one of following Amazon Web
|
965
|
+
# Services managed policies to scope root session actions.
|
966
|
+
#
|
967
|
+
# * [IAMAuditRootUserCredentials][1]
|
968
|
+
#
|
969
|
+
# * [IAMCreateRootUserPassword][2]
|
970
|
+
#
|
971
|
+
# * [IAMDeleteRootUserCredentials][3]
|
972
|
+
#
|
973
|
+
# * [S3UnlockBucketPolicy][4]
|
974
|
+
#
|
975
|
+
# * [SQSUnlockQueuePolicy][5]
|
976
|
+
#
|
977
|
+
#
|
978
|
+
#
|
979
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
|
980
|
+
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
|
981
|
+
# [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
|
982
|
+
# [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
|
983
|
+
# [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
|
984
|
+
# @return [Types::PolicyDescriptorType]
|
985
|
+
#
|
986
|
+
# @!attribute [rw] duration_seconds
|
987
|
+
# The duration, in seconds, of the privileged session. The value can
|
988
|
+
# range from 0 seconds up to the maximum session duration of 900
|
989
|
+
# seconds (15 minutes). If you specify a value higher than this
|
990
|
+
# setting, the operation fails.
|
991
|
+
#
|
992
|
+
# By default, the value is set to `900` seconds.
|
993
|
+
# @return [Integer]
|
994
|
+
#
|
995
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRootRequest AWS API Documentation
|
996
|
+
#
|
997
|
+
class AssumeRootRequest < Struct.new(
|
998
|
+
:target_principal,
|
999
|
+
:task_policy_arn,
|
1000
|
+
:duration_seconds)
|
1001
|
+
SENSITIVE = []
|
1002
|
+
include Aws::Structure
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
# @!attribute [rw] credentials
|
1006
|
+
# The temporary security credentials, which include an access key ID,
|
1007
|
+
# a secret access key, and a security token.
|
1008
|
+
#
|
1009
|
+
# <note markdown="1"> The size of the security token that STS API operations return is not
|
1010
|
+
# fixed. We strongly recommend that you make no assumptions about the
|
1011
|
+
# maximum size.
|
1012
|
+
#
|
1013
|
+
# </note>
|
1014
|
+
# @return [Types::Credentials]
|
1015
|
+
#
|
1016
|
+
# @!attribute [rw] source_identity
|
1017
|
+
# The source identity specified by the principal that is calling the
|
1018
|
+
# `AssumeRoot` operation.
|
1019
|
+
#
|
1020
|
+
# You can use the `aws:SourceIdentity` condition key to control access
|
1021
|
+
# based on the value of source identity. For more information about
|
1022
|
+
# using source identity, see [Monitor and control actions taken with
|
1023
|
+
# assumed roles][1] in the *IAM User Guide*.
|
1024
|
+
#
|
1025
|
+
# The regex used to validate this parameter is a string of characters
|
1026
|
+
# consisting of upper- and lower-case alphanumeric characters with no
|
1027
|
+
# spaces. You can also include underscores or any of the following
|
1028
|
+
# characters: =,.@-
|
1029
|
+
#
|
1030
|
+
#
|
1031
|
+
#
|
1032
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
|
1033
|
+
# @return [String]
|
1034
|
+
#
|
1035
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRootResponse AWS API Documentation
|
1036
|
+
#
|
1037
|
+
class AssumeRootResponse < Struct.new(
|
1038
|
+
:credentials,
|
1039
|
+
:source_identity)
|
1040
|
+
SENSITIVE = []
|
1041
|
+
include Aws::Structure
|
1042
|
+
end
|
1043
|
+
|
903
1044
|
# The identifiers for the temporary security credentials that the
|
904
1045
|
# operation returns.
|
905
1046
|
#
|
@@ -1419,7 +1560,8 @@ module Aws::STS
|
|
1419
1560
|
|
1420
1561
|
# The error returned if the message passed to
|
1421
1562
|
# `DecodeAuthorizationMessage` was invalid. This can happen if the token
|
1422
|
-
# contains invalid characters, such as
|
1563
|
+
# contains invalid characters, such as line breaks, or if the message
|
1564
|
+
# has expired.
|
1423
1565
|
#
|
1424
1566
|
# @!attribute [rw] message
|
1425
1567
|
# @return [String]
|
@@ -1539,8 +1681,8 @@ module Aws::STS
|
|
1539
1681
|
# STS is not activated in the requested region for the account that is
|
1540
1682
|
# being asked to generate credentials. The account administrator must
|
1541
1683
|
# use the IAM console to activate STS in that region. For more
|
1542
|
-
# information, see [Activating and Deactivating Amazon Web
|
1543
|
-
#
|
1684
|
+
# information, see [Activating and Deactivating STS in an Amazon Web
|
1685
|
+
# Services Region][1] in the *IAM User Guide*.
|
1544
1686
|
#
|
1545
1687
|
#
|
1546
1688
|
#
|
@@ -1602,3 +1744,4 @@ module Aws::STS
|
|
1602
1744
|
|
1603
1745
|
end
|
1604
1746
|
end
|
1747
|
+
|
data/lib/aws-sdk-sts.rb
CHANGED
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
|
|
13
13
|
require 'aws-sigv4'
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
require_relative 'aws-sdk-sts/client_api'
|
18
|
-
require_relative 'aws-sdk-sts/plugins/endpoints.rb'
|
19
|
-
require_relative 'aws-sdk-sts/client'
|
20
|
-
require_relative 'aws-sdk-sts/errors'
|
21
|
-
require_relative 'aws-sdk-sts/resource'
|
22
|
-
require_relative 'aws-sdk-sts/endpoint_parameters'
|
23
|
-
require_relative 'aws-sdk-sts/endpoint_provider'
|
24
|
-
require_relative 'aws-sdk-sts/endpoints'
|
25
|
-
require_relative 'aws-sdk-sts/customizations'
|
16
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
|
26
17
|
|
27
18
|
# This module provides support for AWS Security Token Service. This module is available in the
|
28
19
|
# `aws-sdk-core` gem.
|
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-sts/customizations'
|
|
53
44
|
#
|
54
45
|
# @!group service
|
55
46
|
module Aws::STS
|
47
|
+
autoload :Types, 'aws-sdk-sts/types'
|
48
|
+
autoload :ClientApi, 'aws-sdk-sts/client_api'
|
49
|
+
module Plugins
|
50
|
+
autoload :Endpoints, 'aws-sdk-sts/plugins/endpoints.rb'
|
51
|
+
end
|
52
|
+
autoload :Client, 'aws-sdk-sts/client'
|
53
|
+
autoload :Errors, 'aws-sdk-sts/errors'
|
54
|
+
autoload :Resource, 'aws-sdk-sts/resource'
|
55
|
+
autoload :EndpointParameters, 'aws-sdk-sts/endpoint_parameters'
|
56
|
+
autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
|
57
|
+
autoload :Endpoints, 'aws-sdk-sts/endpoints'
|
56
58
|
|
57
|
-
GEM_VERSION = '3.
|
59
|
+
GEM_VERSION = '3.220.0'
|
58
60
|
|
59
61
|
end
|
62
|
+
|
63
|
+
require_relative 'aws-sdk-sts/customizations'
|
data/lib/seahorse/client/base.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'thread'
|
4
|
-
|
5
3
|
module Seahorse
|
6
4
|
module Client
|
7
5
|
class Base
|
@@ -60,6 +58,7 @@ module Seahorse
|
|
60
58
|
def build_config(plugins, options)
|
61
59
|
config = Configuration.new
|
62
60
|
config.add_option(:api)
|
61
|
+
config.add_option(:plugins)
|
63
62
|
plugins.each do |plugin|
|
64
63
|
plugin.add_options(config) if plugin.respond_to?(:add_options)
|
65
64
|
end
|
@@ -96,9 +95,9 @@ module Seahorse
|
|
96
95
|
class << self
|
97
96
|
|
98
97
|
def new(options = {})
|
99
|
-
plugins = build_plugins
|
100
98
|
options = options.dup
|
101
|
-
|
99
|
+
plugins = build_plugins(self.plugins + options.fetch(:plugins, []))
|
100
|
+
plugins = before_initialize(plugins, options)
|
102
101
|
client = allocate
|
103
102
|
client.send(:initialize, plugins, options)
|
104
103
|
client
|
@@ -209,17 +208,28 @@ module Seahorse
|
|
209
208
|
include(operations_module)
|
210
209
|
end
|
211
210
|
|
212
|
-
def build_plugins
|
211
|
+
def build_plugins(plugins)
|
213
212
|
plugins.map { |plugin| plugin.is_a?(Class) ? plugin.new : plugin }
|
214
213
|
end
|
215
214
|
|
216
215
|
def before_initialize(plugins, options)
|
217
|
-
|
218
|
-
|
216
|
+
queue = Queue.new
|
217
|
+
plugins.each { |plugin| queue.push(plugin) }
|
218
|
+
until queue.empty?
|
219
|
+
plugin = queue.pop
|
220
|
+
next unless plugin.respond_to?(:before_initialize)
|
221
|
+
|
222
|
+
plugins_before = options.fetch(:plugins, [])
|
223
|
+
plugin.before_initialize(self, options)
|
224
|
+
plugins_after = build_plugins(options.fetch(:plugins, []) - plugins_before)
|
225
|
+
# Plugins with before_initialize can add other plugins
|
226
|
+
plugins_after.each { |p| queue.push(p); plugins << p }
|
219
227
|
end
|
228
|
+
plugins
|
220
229
|
end
|
221
230
|
|
222
231
|
def inherited(subclass)
|
232
|
+
super
|
223
233
|
subclass.instance_variable_set('@plugins', PluginList.new(@plugins))
|
224
234
|
end
|
225
235
|
|
@@ -27,6 +27,12 @@ module Seahorse
|
|
27
27
|
class Handler < Client::Handler
|
28
28
|
|
29
29
|
def call(context)
|
30
|
+
span_wrapper(context) { _call(context) }
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def _call(context)
|
30
36
|
stream = nil
|
31
37
|
begin
|
32
38
|
conn = context.client.connection
|
@@ -80,8 +86,6 @@ module Seahorse
|
|
80
86
|
)
|
81
87
|
end
|
82
88
|
|
83
|
-
private
|
84
|
-
|
85
89
|
def _register_callbacks(resp, stream, stream_mutex, close_condition, sync_queue)
|
86
90
|
stream.on(:headers) do |headers|
|
87
91
|
resp.signal_headers(headers)
|
@@ -146,8 +150,14 @@ module Seahorse
|
|
146
150
|
end
|
147
151
|
end
|
148
152
|
|
153
|
+
def span_wrapper(context, &block)
|
154
|
+
context.tracer.in_span(
|
155
|
+
'Handler.H2',
|
156
|
+
attributes: Aws::Telemetry.http_request_attrs(context),
|
157
|
+
&block
|
158
|
+
)
|
159
|
+
end
|
149
160
|
end
|
150
|
-
|
151
161
|
end
|
152
162
|
end
|
153
163
|
end
|
@@ -34,7 +34,9 @@ module Seahorse
|
|
34
34
|
ssl_ca_bundle: nil,
|
35
35
|
ssl_ca_directory: nil,
|
36
36
|
ssl_ca_store: nil,
|
37
|
-
ssl_timeout: nil
|
37
|
+
ssl_timeout: nil,
|
38
|
+
ssl_cert: nil,
|
39
|
+
ssl_key: nil
|
38
40
|
}
|
39
41
|
|
40
42
|
# @api private
|
@@ -246,7 +248,9 @@ module Seahorse
|
|
246
248
|
:ssl_ca_bundle => options[:ssl_ca_bundle],
|
247
249
|
:ssl_ca_directory => options[:ssl_ca_directory],
|
248
250
|
:ssl_ca_store => options[:ssl_ca_store],
|
249
|
-
:ssl_timeout => options[:ssl_timeout]
|
251
|
+
:ssl_timeout => options[:ssl_timeout],
|
252
|
+
:ssl_cert => options[:ssl_cert],
|
253
|
+
:ssl_key => options[:ssl_key]
|
250
254
|
}
|
251
255
|
end
|
252
256
|
|
@@ -291,6 +295,8 @@ module Seahorse
|
|
291
295
|
http.ca_file = ssl_ca_bundle if ssl_ca_bundle
|
292
296
|
http.ca_path = ssl_ca_directory if ssl_ca_directory
|
293
297
|
http.cert_store = ssl_ca_store if ssl_ca_store
|
298
|
+
http.cert = ssl_cert if ssl_cert
|
299
|
+
http.key = ssl_key if ssl_key
|
294
300
|
else
|
295
301
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
296
302
|
end
|
@@ -330,6 +336,8 @@ module Seahorse
|
|
330
336
|
attr_reader :last_used
|
331
337
|
|
332
338
|
def __getobj__
|
339
|
+
return yield if block_given? && !defined?(@http)
|
340
|
+
|
333
341
|
@http
|
334
342
|
end
|
335
343
|
|
@@ -23,17 +23,12 @@ module Seahorse
|
|
23
23
|
|
24
24
|
NETWORK_ERRORS = [
|
25
25
|
SocketError, EOFError, IOError, Timeout::Error,
|
26
|
-
Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE,
|
27
|
-
Errno::
|
28
|
-
|
26
|
+
Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE, Errno::EINVAL,
|
27
|
+
Errno::ETIMEDOUT, Errno::EHOSTUNREACH, Errno::ECONNREFUSED,
|
28
|
+
OpenSSL::SSL::SSLError, OpenSSL::SSL::SSLErrorWaitReadable,
|
29
29
|
Net::HTTPFatalError # for proxy connection failures
|
30
30
|
]
|
31
31
|
|
32
|
-
# does not exist in Ruby 1.9.3
|
33
|
-
if OpenSSL::SSL.const_defined?(:SSLErrorWaitReadable)
|
34
|
-
NETWORK_ERRORS << OpenSSL::SSL::SSLErrorWaitReadable
|
35
|
-
end
|
36
|
-
|
37
32
|
# @api private
|
38
33
|
DNS_ERROR_MESSAGES = [
|
39
34
|
'getaddrinfo: nodename nor servname provided, or not known', # MacOS
|
@@ -47,7 +42,13 @@ module Seahorse
|
|
47
42
|
# @param [RequestContext] context
|
48
43
|
# @return [Response]
|
49
44
|
def call(context)
|
50
|
-
|
45
|
+
span_wrapper(context) do
|
46
|
+
transmit(
|
47
|
+
context.config,
|
48
|
+
context.http_request,
|
49
|
+
context.http_response
|
50
|
+
)
|
51
|
+
end
|
51
52
|
Response.new(context: context)
|
52
53
|
end
|
53
54
|
|
@@ -197,6 +198,17 @@ module Seahorse
|
|
197
198
|
end
|
198
199
|
end
|
199
200
|
|
201
|
+
def span_wrapper(context, &block)
|
202
|
+
context.tracer.in_span(
|
203
|
+
'Handler.NetHttp',
|
204
|
+
attributes: Aws::Telemetry.http_request_attrs(context)
|
205
|
+
) do |span|
|
206
|
+
block.call
|
207
|
+
span.add_attributes(
|
208
|
+
Aws::Telemetry.http_response_attrs(context)
|
209
|
+
)
|
210
|
+
end
|
211
|
+
end
|
200
212
|
end
|
201
213
|
end
|
202
214
|
end
|
@@ -70,6 +70,15 @@ Sets the X509::Store to verify peer certificate.
|
|
70
70
|
resolve_ssl_timeout(cfg)
|
71
71
|
end
|
72
72
|
|
73
|
+
option(:ssl_cert, default: nil, doc_type: OpenSSL::X509::Certificate, docstring: <<-DOCS)
|
74
|
+
Sets a client certificate when creating http connections.
|
75
|
+
DOCS
|
76
|
+
|
77
|
+
|
78
|
+
option(:ssl_key, default: nil, doc_type: OpenSSL::PKey, docstring: <<-DOCS)
|
79
|
+
Sets a client key when creating http connections.
|
80
|
+
DOCS
|
81
|
+
|
73
82
|
option(:logger) # for backwards compat
|
74
83
|
|
75
84
|
handler(Client::NetHttp::Handler, step: :send)
|
@@ -9,11 +9,14 @@ module Seahorse
|
|
9
9
|
# @option options [required,Symbol] :operation_name (nil)
|
10
10
|
# @option options [required,Model::Operation] :operation (nil)
|
11
11
|
# @option options [Model::Authorizer] :authorizer (nil)
|
12
|
+
# @option options [Client] :client (nil)
|
12
13
|
# @option options [Hash] :params ({})
|
13
14
|
# @option options [Configuration] :config (nil)
|
14
15
|
# @option options [Http::Request] :http_request (Http::Request.new)
|
15
16
|
# @option options [Http::Response] :http_response (Http::Response.new)
|
16
|
-
#
|
17
|
+
# @option options [Integer] :retries (0)
|
18
|
+
# @option options [Aws::Telemetry::TracerBase] :tracer (Aws::Telemetry::NoOpTracer.new)
|
19
|
+
# @options options [Hash] :metadata ({})
|
17
20
|
def initialize(options = {})
|
18
21
|
@operation_name = options[:operation_name]
|
19
22
|
@operation = options[:operation]
|
@@ -24,6 +27,7 @@ module Seahorse
|
|
24
27
|
@http_request = options[:http_request] || Http::Request.new
|
25
28
|
@http_response = options[:http_response] || Http::Response.new
|
26
29
|
@retries = 0
|
30
|
+
@tracer = options[:tracer] || Aws::Telemetry::NoOpTracer.new
|
27
31
|
@metadata = {}
|
28
32
|
end
|
29
33
|
|
@@ -54,6 +58,9 @@ module Seahorse
|
|
54
58
|
# @return [Integer]
|
55
59
|
attr_accessor :retries
|
56
60
|
|
61
|
+
# @return [Tracer]
|
62
|
+
attr_accessor :tracer
|
63
|
+
|
57
64
|
# @return [Hash]
|
58
65
|
attr_reader :metadata
|
59
66
|
|