@aws-sdk/client-sts 3.36.0 → 3.39.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.
- package/CHANGELOG.md +42 -0
- package/dist-cjs/STS.js +0 -7
- package/dist-cjs/STSClient.js +0 -12
- package/dist-cjs/commands/AssumeRoleCommand.js +0 -107
- package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js +0 -155
- package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js +0 -159
- package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +0 -59
- package/dist-cjs/commands/GetAccessKeyInfoCommand.js +0 -41
- package/dist-cjs/commands/GetCallerIdentityCommand.js +0 -33
- package/dist-cjs/commands/GetFederationTokenCommand.js +0 -162
- package/dist-cjs/commands/GetSessionTokenCommand.js +0 -75
- package/dist-cjs/commands/index.js +11 -0
- package/dist-cjs/defaultRoleAssumers.js +0 -16
- package/dist-cjs/defaultStsRoleAssumers.js +0 -20
- package/dist-cjs/endpoints.js +6 -1
- package/dist-cjs/index.js +3 -10
- package/dist-cjs/models/models_0.js +0 -87
- package/dist-cjs/protocols/Aws_query.js +0 -2
- package/dist-cjs/runtimeConfig.browser.js +1 -5
- package/dist-cjs/runtimeConfig.js +1 -5
- package/dist-cjs/runtimeConfig.native.js +0 -3
- package/dist-cjs/runtimeConfig.shared.js +0 -3
- package/dist-es/commands/index.js +8 -0
- package/dist-es/endpoints.js +6 -1
- package/dist-es/index.js +3 -10
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/index.d.ts +3 -10
- package/dist-types/ts3.4/STS.d.ts +9 -630
- package/dist-types/ts3.4/STSClient.d.ts +24 -93
- package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +2 -103
- package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +2 -151
- package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +2 -155
- package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +2 -55
- package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +2 -37
- package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +2 -29
- package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +2 -158
- package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +2 -71
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/defaultRoleAssumers.d.ts +3 -14
- package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +6 -25
- package/dist-types/ts3.4/index.d.ts +3 -10
- package/dist-types/ts3.4/models/models_0.d.ts +123 -948
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +32 -32
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-sts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **client-documentation-generator:** rename package ([#2916](https://github.com/aws/aws-sdk-js-v3/issues/2916)) ([1a80bfd](https://github.com/aws/aws-sdk-js-v3/commit/1a80bfd2dfc583001ddb4a21b6432eaaad699aa7))
|
|
20
|
+
* **clients:** export folder from index.ts ([#2912](https://github.com/aws/aws-sdk-js-v3/issues/2912)) ([183b46d](https://github.com/aws/aws-sdk-js-v3/commit/183b46dde7f5613128038bf1c076f3c0b693203b))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **clients:** update clients as of 10/15/2021 ([#2902](https://github.com/aws/aws-sdk-js-v3/issues/2902)) ([2730b54](https://github.com/aws/aws-sdk-js-v3/commit/2730b5424377944a5a2ad5e1ad7d3ca4135dae1c))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## [3.36.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.0...v3.36.1) (2021-10-12)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* **clients:** emitDeclarationOnly in tsconfig.types.json ([#2893](https://github.com/aws/aws-sdk-js-v3/issues/2893)) ([6dc3d56](https://github.com/aws/aws-sdk-js-v3/commit/6dc3d56c20809c90cbdc4dd48627eeebc64af99d))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
6
48
|
# [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
|
|
7
49
|
|
|
8
50
|
|
package/dist-cjs/STS.js
CHANGED
|
@@ -10,13 +10,6 @@ const GetCallerIdentityCommand_1 = require("./commands/GetCallerIdentityCommand"
|
|
|
10
10
|
const GetFederationTokenCommand_1 = require("./commands/GetFederationTokenCommand");
|
|
11
11
|
const GetSessionTokenCommand_1 = require("./commands/GetSessionTokenCommand");
|
|
12
12
|
const STSClient_1 = require("./STSClient");
|
|
13
|
-
/**
|
|
14
|
-
* <fullname>Security Token Service</fullname>
|
|
15
|
-
* <p>Security Token Service (STS) enables you to request temporary, limited-privilege
|
|
16
|
-
* credentials for Identity and Access Management (IAM) users or for users that you
|
|
17
|
-
* authenticate (federated users). This guide provides descriptions of the STS API. For
|
|
18
|
-
* more information about using this service, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary Security Credentials</a>.</p>
|
|
19
|
-
*/
|
|
20
13
|
class STS extends STSClient_1.STSClient {
|
|
21
14
|
assumeRole(args, optionsOrCb, cb) {
|
|
22
15
|
const command = new AssumeRoleCommand_1.AssumeRoleCommand(args);
|
package/dist-cjs/STSClient.js
CHANGED
|
@@ -10,13 +10,6 @@ const middleware_sdk_sts_1 = require("@aws-sdk/middleware-sdk-sts");
|
|
|
10
10
|
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
11
11
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
12
12
|
const runtimeConfig_1 = require("./runtimeConfig");
|
|
13
|
-
/**
|
|
14
|
-
* <fullname>Security Token Service</fullname>
|
|
15
|
-
* <p>Security Token Service (STS) enables you to request temporary, limited-privilege
|
|
16
|
-
* credentials for Identity and Access Management (IAM) users or for users that you
|
|
17
|
-
* authenticate (federated users). This guide provides descriptions of the STS API. For
|
|
18
|
-
* more information about using this service, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary Security Credentials</a>.</p>
|
|
19
|
-
*/
|
|
20
13
|
class STSClient extends smithy_client_1.Client {
|
|
21
14
|
constructor(configuration) {
|
|
22
15
|
const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
|
|
@@ -34,11 +27,6 @@ class STSClient extends smithy_client_1.Client {
|
|
|
34
27
|
this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config));
|
|
35
28
|
this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
|
|
36
29
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
39
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
40
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
41
|
-
*/
|
|
42
30
|
destroy() {
|
|
43
31
|
super.destroy();
|
|
44
32
|
}
|
|
@@ -6,118 +6,11 @@ const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
-
/**
|
|
10
|
-
* <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
|
|
11
|
-
* resources that you might not normally have access to. These temporary credentials
|
|
12
|
-
* consist of an access key ID, a secret access key, and a security token. Typically, you
|
|
13
|
-
* use <code>AssumeRole</code> within your account or for cross-account access. For a
|
|
14
|
-
* comparison of <code>AssumeRole</code> with other API operations that produce temporary
|
|
15
|
-
* credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
|
|
16
|
-
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing
|
|
17
|
-
* the STS API operations</a> in the
|
|
18
|
-
* <i>IAM User Guide</i>.</p>
|
|
19
|
-
* <p>
|
|
20
|
-
* <b>Permissions</b>
|
|
21
|
-
* </p>
|
|
22
|
-
* <p>The temporary security credentials created by <code>AssumeRole</code> can be used to
|
|
23
|
-
* make API calls to any Amazon Web Services service with the following exception: You cannot call the
|
|
24
|
-
* STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
|
|
25
|
-
* operations.</p>
|
|
26
|
-
* <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to
|
|
27
|
-
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
28
|
-
* policy. You can also specify up to 10 managed policies to use as managed session policies.
|
|
29
|
-
* The plaintext that you use for both inline and managed session policies can't exceed 2,048
|
|
30
|
-
* characters. Passing policies to this operation returns new
|
|
31
|
-
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
32
|
-
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
33
|
-
* credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
|
|
34
|
-
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
35
|
-
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
36
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
37
|
-
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
38
|
-
* <p>To assume a role from a different account, your account must be trusted by the
|
|
39
|
-
* role. The trust relationship is defined in the role's trust policy when the role is
|
|
40
|
-
* created. That trust policy states which accounts are allowed to delegate that access to
|
|
41
|
-
* users in the account. </p>
|
|
42
|
-
* <p>A user who wants to access a role in a different account must also have permissions that
|
|
43
|
-
* are delegated from the user account administrator. The administrator must attach a policy
|
|
44
|
-
* that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
|
|
45
|
-
* account. If the user is in the same account as the role, then you can do either of the
|
|
46
|
-
* following:</p>
|
|
47
|
-
* <ul>
|
|
48
|
-
* <li>
|
|
49
|
-
* <p>Attach a policy to the user (identical to the previous user in a different
|
|
50
|
-
* account).</p>
|
|
51
|
-
* </li>
|
|
52
|
-
* <li>
|
|
53
|
-
* <p>Add the user as a principal directly in the role's trust policy.</p>
|
|
54
|
-
* </li>
|
|
55
|
-
* </ul>
|
|
56
|
-
* <p>In this case, the trust policy acts as an IAM resource-based policy. Users in the same
|
|
57
|
-
* account as the role do not need explicit permission to assume the role. For more
|
|
58
|
-
* information about trust policies and resource-based policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a> in
|
|
59
|
-
* the <i>IAM User Guide</i>.</p>
|
|
60
|
-
* <p>
|
|
61
|
-
* <b>Tags</b>
|
|
62
|
-
* </p>
|
|
63
|
-
* <p>(Optional) You can pass tag key-value pairs to your session. These tags are called
|
|
64
|
-
* session tags. For more information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
|
|
65
|
-
* <i>IAM User Guide</i>.</p>
|
|
66
|
-
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
67
|
-
* administrator can also create granular permissions to allow you to pass only specific
|
|
68
|
-
* session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags
|
|
69
|
-
* for Attribute-Based Access Control</a> in the
|
|
70
|
-
* <i>IAM User Guide</i>.</p>
|
|
71
|
-
* <p>You can set the session tags as transitive. Transitive tags persist during role
|
|
72
|
-
* chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles
|
|
73
|
-
* with Session Tags</a> in the <i>IAM User Guide</i>.</p>
|
|
74
|
-
* <p>
|
|
75
|
-
* <b>Using MFA with AssumeRole</b>
|
|
76
|
-
* </p>
|
|
77
|
-
* <p>(Optional) You can include multi-factor authentication (MFA) information when you call
|
|
78
|
-
* <code>AssumeRole</code>. This is useful for cross-account scenarios to ensure that the
|
|
79
|
-
* user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that
|
|
80
|
-
* scenario, the trust policy of the role being assumed includes a condition that tests for
|
|
81
|
-
* MFA authentication. If the caller does not include valid MFA information, the request to
|
|
82
|
-
* assume the role is denied. The condition in a trust policy that tests for MFA
|
|
83
|
-
* authentication might look like the following example.</p>
|
|
84
|
-
* <p>
|
|
85
|
-
* <code>"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}</code>
|
|
86
|
-
* </p>
|
|
87
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html">Configuring MFA-Protected API Access</a>
|
|
88
|
-
* in the <i>IAM User Guide</i> guide.</p>
|
|
89
|
-
* <p>To use MFA with <code>AssumeRole</code>, you pass values for the
|
|
90
|
-
* <code>SerialNumber</code> and <code>TokenCode</code> parameters. The
|
|
91
|
-
* <code>SerialNumber</code> value identifies the user's hardware or virtual MFA device.
|
|
92
|
-
* The <code>TokenCode</code> is the time-based one-time password (TOTP) that the MFA device
|
|
93
|
-
* produces. </p>
|
|
94
|
-
* @example
|
|
95
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
96
|
-
* ```javascript
|
|
97
|
-
* import { STSClient, AssumeRoleCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
98
|
-
* // const { STSClient, AssumeRoleCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
99
|
-
* const client = new STSClient(config);
|
|
100
|
-
* const command = new AssumeRoleCommand(input);
|
|
101
|
-
* const response = await client.send(command);
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* @see {@link AssumeRoleCommandInput} for command's `input` shape.
|
|
105
|
-
* @see {@link AssumeRoleCommandOutput} for command's `response` shape.
|
|
106
|
-
* @see {@link STSClientResolvedConfig | config} for command's `input` shape.
|
|
107
|
-
*
|
|
108
|
-
*/
|
|
109
9
|
class AssumeRoleCommand extends smithy_client_1.Command {
|
|
110
|
-
// Start section: command_properties
|
|
111
|
-
// End section: command_properties
|
|
112
10
|
constructor(input) {
|
|
113
|
-
// Start section: command_constructor
|
|
114
11
|
super();
|
|
115
12
|
this.input = input;
|
|
116
|
-
// End section: command_constructor
|
|
117
13
|
}
|
|
118
|
-
/**
|
|
119
|
-
* @internal
|
|
120
|
-
*/
|
|
121
14
|
resolveMiddleware(clientStack, configuration, options) {
|
|
122
15
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
123
16
|
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|
|
@@ -5,166 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_query_1 = require("../protocols/Aws_query");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Returns a set of temporary security credentials for users who have been authenticated
|
|
10
|
-
* via a SAML authentication response. This operation provides a mechanism for tying an
|
|
11
|
-
* enterprise identity store or directory to role-based Amazon Web Services access without user-specific
|
|
12
|
-
* credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the
|
|
13
|
-
* other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
|
|
14
|
-
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
|
|
15
|
-
* STS API operations</a> in the <i>IAM User Guide</i>.</p>
|
|
16
|
-
* <p>The temporary security credentials returned by this operation consist of an access key
|
|
17
|
-
* ID, a secret access key, and a security token. Applications can use these temporary
|
|
18
|
-
* security credentials to sign calls to Amazon Web Services services.</p>
|
|
19
|
-
* <p>
|
|
20
|
-
* <b>Session Duration</b>
|
|
21
|
-
* </p>
|
|
22
|
-
* <p>By default, the temporary security credentials created by
|
|
23
|
-
* <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional
|
|
24
|
-
* <code>DurationSeconds</code> parameter to specify the duration of your session. Your
|
|
25
|
-
* role session lasts for the duration that you specify, or until the time specified in the
|
|
26
|
-
* SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is
|
|
27
|
-
* shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes)
|
|
28
|
-
* up to the maximum session duration setting for the role. This setting can have a value from
|
|
29
|
-
* 1 hour to 12 hours. To learn how to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the
|
|
30
|
-
* Maximum Session Duration Setting for a Role</a> in the
|
|
31
|
-
* <i>IAM User Guide</i>. The maximum session duration limit applies when
|
|
32
|
-
* you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
|
|
33
|
-
* commands. However the limit does not apply when you use those operations to create a
|
|
34
|
-
* console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM Roles</a> in the
|
|
35
|
-
* <i>IAM User Guide</i>.</p>
|
|
36
|
-
* <note>
|
|
37
|
-
* <p>
|
|
38
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining">Role chaining</a> limits your CLI or Amazon Web Services API
|
|
39
|
-
* role session to a maximum of one hour. When you use the <code>AssumeRole</code> API
|
|
40
|
-
* operation to assume a role, you can specify the duration of your role session with
|
|
41
|
-
* the <code>DurationSeconds</code> parameter. You can specify a parameter value of up
|
|
42
|
-
* to 43200 seconds (12 hours), depending on the maximum session duration setting for
|
|
43
|
-
* your role. However, if you assume a role using role chaining and provide a
|
|
44
|
-
* <code>DurationSeconds</code> parameter value greater than one hour, the
|
|
45
|
-
* operation fails.</p>
|
|
46
|
-
* </note>
|
|
47
|
-
* <p>
|
|
48
|
-
* <b>Permissions</b>
|
|
49
|
-
* </p>
|
|
50
|
-
* <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be
|
|
51
|
-
* used to make API calls to any Amazon Web Services service with the following exception: you cannot call
|
|
52
|
-
* the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
|
|
53
|
-
* operations.</p>
|
|
54
|
-
* <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to
|
|
55
|
-
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
56
|
-
* policy. You can also specify up to 10 managed policies to use as managed session policies.
|
|
57
|
-
* The plaintext that you use for both inline and managed session policies can't exceed 2,048
|
|
58
|
-
* characters. Passing policies to this operation returns new
|
|
59
|
-
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
60
|
-
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
61
|
-
* credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
|
|
62
|
-
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
63
|
-
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
64
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
65
|
-
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
66
|
-
* <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security
|
|
67
|
-
* credentials. The identity of the caller is validated by using keys in the metadata document
|
|
68
|
-
* that is uploaded for the SAML provider entity for your identity provider. </p>
|
|
69
|
-
* <important>
|
|
70
|
-
* <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs.
|
|
71
|
-
* The entry includes the value in the <code>NameID</code> element of the SAML assertion.
|
|
72
|
-
* We recommend that you use a <code>NameIDType</code> that is not associated with any
|
|
73
|
-
* personally identifiable information (PII). For example, you could instead use the
|
|
74
|
-
* persistent identifier
|
|
75
|
-
* (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p>
|
|
76
|
-
* </important>
|
|
77
|
-
* <p>
|
|
78
|
-
* <b>Tags</b>
|
|
79
|
-
* </p>
|
|
80
|
-
* <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as
|
|
81
|
-
* session tags. Each session tag consists of a key name and an associated value. For more
|
|
82
|
-
* information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
|
|
83
|
-
* <i>IAM User Guide</i>.</p>
|
|
84
|
-
* <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
|
|
85
|
-
* characters and the values can’t exceed 256 characters. For these and additional limits, see
|
|
86
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
|
|
87
|
-
* and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
88
|
-
*
|
|
89
|
-
* <note>
|
|
90
|
-
* <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
|
|
91
|
-
* packed binary format that has a separate limit. Your request can fail for this limit
|
|
92
|
-
* even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
|
|
93
|
-
* response element indicates by percentage how close the policies and tags for your
|
|
94
|
-
* request are to the upper size limit.
|
|
95
|
-
* </p>
|
|
96
|
-
* </note>
|
|
97
|
-
* <p>You can pass a session tag with the same key as a tag that is
|
|
98
|
-
* attached to the role. When you do, session tags override the role's tags with the same
|
|
99
|
-
* key.</p>
|
|
100
|
-
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
101
|
-
* administrator can also create granular permissions to allow you to pass only specific
|
|
102
|
-
* session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags
|
|
103
|
-
* for Attribute-Based Access Control</a> in the
|
|
104
|
-
* <i>IAM User Guide</i>.</p>
|
|
105
|
-
* <p>You can set the session tags as transitive. Transitive tags persist during role
|
|
106
|
-
* chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles
|
|
107
|
-
* with Session Tags</a> in the <i>IAM User Guide</i>.</p>
|
|
108
|
-
* <p>
|
|
109
|
-
* <b>SAML Configuration</b>
|
|
110
|
-
* </p>
|
|
111
|
-
* <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure
|
|
112
|
-
* your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you
|
|
113
|
-
* must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that
|
|
114
|
-
* represents your identity provider. You must also create an IAM role that specifies this
|
|
115
|
-
* SAML provider in its trust policy. </p>
|
|
116
|
-
* <p>For more information, see the following resources:</p>
|
|
117
|
-
* <ul>
|
|
118
|
-
* <li>
|
|
119
|
-
* <p>
|
|
120
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html">About
|
|
121
|
-
* SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
|
|
122
|
-
* </p>
|
|
123
|
-
* </li>
|
|
124
|
-
* <li>
|
|
125
|
-
* <p>
|
|
126
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the
|
|
127
|
-
* <i>IAM User Guide</i>. </p>
|
|
128
|
-
* </li>
|
|
129
|
-
* <li>
|
|
130
|
-
* <p>
|
|
131
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring
|
|
132
|
-
* a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
|
|
133
|
-
* </p>
|
|
134
|
-
* </li>
|
|
135
|
-
* <li>
|
|
136
|
-
* <p>
|
|
137
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html">Creating a Role for SAML 2.0 Federation</a> in the
|
|
138
|
-
* <i>IAM User Guide</i>. </p>
|
|
139
|
-
* </li>
|
|
140
|
-
* </ul>
|
|
141
|
-
* @example
|
|
142
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
143
|
-
* ```javascript
|
|
144
|
-
* import { STSClient, AssumeRoleWithSAMLCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
145
|
-
* // const { STSClient, AssumeRoleWithSAMLCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
146
|
-
* const client = new STSClient(config);
|
|
147
|
-
* const command = new AssumeRoleWithSAMLCommand(input);
|
|
148
|
-
* const response = await client.send(command);
|
|
149
|
-
* ```
|
|
150
|
-
*
|
|
151
|
-
* @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape.
|
|
152
|
-
* @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape.
|
|
153
|
-
* @see {@link STSClientResolvedConfig | config} for command's `input` shape.
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
8
|
class AssumeRoleWithSAMLCommand extends smithy_client_1.Command {
|
|
157
|
-
// Start section: command_properties
|
|
158
|
-
// End section: command_properties
|
|
159
9
|
constructor(input) {
|
|
160
|
-
// Start section: command_constructor
|
|
161
10
|
super();
|
|
162
11
|
this.input = input;
|
|
163
|
-
// End section: command_constructor
|
|
164
12
|
}
|
|
165
|
-
/**
|
|
166
|
-
* @internal
|
|
167
|
-
*/
|
|
168
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
169
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
170
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -5,170 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const Aws_query_1 = require("../protocols/Aws_query");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Returns a set of temporary security credentials for users who have been authenticated in
|
|
10
|
-
* a mobile or web application with a web identity provider. Example providers include Amazon Cognito,
|
|
11
|
-
* Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity
|
|
12
|
-
* provider.</p>
|
|
13
|
-
* <note>
|
|
14
|
-
* <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the
|
|
15
|
-
* <a href="http://aws.amazon.com/sdkforios/">Amazon Web Services SDK for iOS Developer Guide</a> and the <a href="http://aws.amazon.com/sdkforandroid/">Amazon Web Services SDK for Android Developer Guide</a> to uniquely
|
|
16
|
-
* identify a user. You can also supply the user with a consistent identity throughout the
|
|
17
|
-
* lifetime of an application.</p>
|
|
18
|
-
* <p>To learn more about Amazon Cognito, see <a href="https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840">Amazon Cognito Overview</a> in
|
|
19
|
-
* <i>Amazon Web Services SDK for Android Developer Guide</i> and <a href="https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664">Amazon Cognito Overview</a> in the
|
|
20
|
-
* <i>Amazon Web Services SDK for iOS Developer Guide</i>.</p>
|
|
21
|
-
* </note>
|
|
22
|
-
* <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
|
|
23
|
-
* security credentials. Therefore, you can distribute an application (for example, on mobile
|
|
24
|
-
* devices) that requests temporary security credentials without including long-term Amazon Web Services
|
|
25
|
-
* credentials in the application. You also don't need to deploy server-based proxy services
|
|
26
|
-
* that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by
|
|
27
|
-
* using a token from the web identity provider. For a comparison of
|
|
28
|
-
* <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce
|
|
29
|
-
* temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
|
|
30
|
-
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
|
|
31
|
-
* STS API operations</a> in the <i>IAM User Guide</i>.</p>
|
|
32
|
-
* <p>The temporary security credentials returned by this API consist of an access key ID, a
|
|
33
|
-
* secret access key, and a security token. Applications can use these temporary security
|
|
34
|
-
* credentials to sign calls to Amazon Web Services service API operations.</p>
|
|
35
|
-
* <p>
|
|
36
|
-
* <b>Session Duration</b>
|
|
37
|
-
* </p>
|
|
38
|
-
* <p>By default, the temporary security credentials created by
|
|
39
|
-
* <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the
|
|
40
|
-
* optional <code>DurationSeconds</code> parameter to specify the duration of your session.
|
|
41
|
-
* You can provide a value from 900 seconds (15 minutes) up to the maximum session duration
|
|
42
|
-
* setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how
|
|
43
|
-
* to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the
|
|
44
|
-
* Maximum Session Duration Setting for a Role</a> in the
|
|
45
|
-
* <i>IAM User Guide</i>. The maximum session duration limit applies when
|
|
46
|
-
* you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
|
|
47
|
-
* commands. However the limit does not apply when you use those operations to create a
|
|
48
|
-
* console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM Roles</a> in the
|
|
49
|
-
* <i>IAM User Guide</i>. </p>
|
|
50
|
-
* <p>
|
|
51
|
-
* <b>Permissions</b>
|
|
52
|
-
* </p>
|
|
53
|
-
* <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can
|
|
54
|
-
* be used to make API calls to any Amazon Web Services service with the following exception: you cannot
|
|
55
|
-
* call the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
|
|
56
|
-
* operations.</p>
|
|
57
|
-
* <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to
|
|
58
|
-
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
59
|
-
* policy. You can also specify up to 10 managed policies to use as managed session policies.
|
|
60
|
-
* The plaintext that you use for both inline and managed session policies can't exceed 2,048
|
|
61
|
-
* characters. Passing policies to this operation returns new
|
|
62
|
-
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
63
|
-
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
64
|
-
* credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
|
|
65
|
-
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
66
|
-
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
67
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
68
|
-
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
69
|
-
* <p>
|
|
70
|
-
* <b>Tags</b>
|
|
71
|
-
* </p>
|
|
72
|
-
* <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
|
|
73
|
-
* session tags. Each session tag consists of a key name and an associated value. For more
|
|
74
|
-
* information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
|
|
75
|
-
* <i>IAM User Guide</i>.</p>
|
|
76
|
-
* <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
|
|
77
|
-
* characters and the values can’t exceed 256 characters. For these and additional limits, see
|
|
78
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
|
|
79
|
-
* and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
80
|
-
*
|
|
81
|
-
* <note>
|
|
82
|
-
* <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
|
|
83
|
-
* packed binary format that has a separate limit. Your request can fail for this limit
|
|
84
|
-
* even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
|
|
85
|
-
* response element indicates by percentage how close the policies and tags for your
|
|
86
|
-
* request are to the upper size limit.
|
|
87
|
-
* </p>
|
|
88
|
-
* </note>
|
|
89
|
-
* <p>You can pass a session tag with the same key as a tag that is
|
|
90
|
-
* attached to the role. When you do, the session tag overrides the role tag with the same
|
|
91
|
-
* key.</p>
|
|
92
|
-
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
93
|
-
* administrator can also create granular permissions to allow you to pass only specific
|
|
94
|
-
* session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags
|
|
95
|
-
* for Attribute-Based Access Control</a> in the
|
|
96
|
-
* <i>IAM User Guide</i>.</p>
|
|
97
|
-
* <p>You can set the session tags as transitive. Transitive tags persist during role
|
|
98
|
-
* chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles
|
|
99
|
-
* with Session Tags</a> in the <i>IAM User Guide</i>.</p>
|
|
100
|
-
* <p>
|
|
101
|
-
* <b>Identities</b>
|
|
102
|
-
* </p>
|
|
103
|
-
* <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have
|
|
104
|
-
* an identity token from a supported identity provider and create a role that the application
|
|
105
|
-
* can assume. The role that your application assumes must trust the identity provider that is
|
|
106
|
-
* associated with the identity token. In other words, the identity provider must be specified
|
|
107
|
-
* in the role's trust policy. </p>
|
|
108
|
-
* <important>
|
|
109
|
-
* <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your
|
|
110
|
-
* CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of
|
|
111
|
-
* the provided web identity token. We recommend that you avoid using any personally
|
|
112
|
-
* identifiable information (PII) in this field. For example, you could instead use a GUID
|
|
113
|
-
* or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested
|
|
114
|
-
* in the OIDC specification</a>.</p>
|
|
115
|
-
* </important>
|
|
116
|
-
* <p>For more information about how to use web identity federation and the
|
|
117
|
-
* <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p>
|
|
118
|
-
* <ul>
|
|
119
|
-
* <li>
|
|
120
|
-
* <p>
|
|
121
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html">Using Web Identity Federation API Operations for Mobile Apps</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity">Federation Through a Web-based Identity Provider</a>. </p>
|
|
122
|
-
* </li>
|
|
123
|
-
* <li>
|
|
124
|
-
* <p>
|
|
125
|
-
* <a href="https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/"> Web Identity Federation Playground</a>. Walk through the process of
|
|
126
|
-
* authenticating through Login with Amazon, Facebook, or Google, getting temporary
|
|
127
|
-
* security credentials, and then using those credentials to make a request to Amazon Web Services.
|
|
128
|
-
* </p>
|
|
129
|
-
* </li>
|
|
130
|
-
* <li>
|
|
131
|
-
* <p>
|
|
132
|
-
* <a href="http://aws.amazon.com/sdkforios/">Amazon Web Services SDK for iOS Developer Guide</a> and <a href="http://aws.amazon.com/sdkforandroid/">Amazon Web Services SDK for Android Developer Guide</a>. These toolkits
|
|
133
|
-
* contain sample apps that show how to invoke the identity providers. The toolkits then
|
|
134
|
-
* show how to use the information from these providers to get and use temporary
|
|
135
|
-
* security credentials. </p>
|
|
136
|
-
* </li>
|
|
137
|
-
* <li>
|
|
138
|
-
* <p>
|
|
139
|
-
* <a href="http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications">Web Identity
|
|
140
|
-
* Federation with Mobile Applications</a>. This article discusses web identity
|
|
141
|
-
* federation and shows an example of how to use web identity federation to get access
|
|
142
|
-
* to content in Amazon S3. </p>
|
|
143
|
-
* </li>
|
|
144
|
-
* </ul>
|
|
145
|
-
* @example
|
|
146
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
147
|
-
* ```javascript
|
|
148
|
-
* import { STSClient, AssumeRoleWithWebIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
149
|
-
* // const { STSClient, AssumeRoleWithWebIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
150
|
-
* const client = new STSClient(config);
|
|
151
|
-
* const command = new AssumeRoleWithWebIdentityCommand(input);
|
|
152
|
-
* const response = await client.send(command);
|
|
153
|
-
* ```
|
|
154
|
-
*
|
|
155
|
-
* @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape.
|
|
156
|
-
* @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape.
|
|
157
|
-
* @see {@link STSClientResolvedConfig | config} for command's `input` shape.
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
160
8
|
class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command {
|
|
161
|
-
// Start section: command_properties
|
|
162
|
-
// End section: command_properties
|
|
163
9
|
constructor(input) {
|
|
164
|
-
// Start section: command_constructor
|
|
165
10
|
super();
|
|
166
11
|
this.input = input;
|
|
167
|
-
// End section: command_constructor
|
|
168
12
|
}
|
|
169
|
-
/**
|
|
170
|
-
* @internal
|
|
171
|
-
*/
|
|
172
13
|
resolveMiddleware(clientStack, configuration, options) {
|
|
173
14
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
174
15
|
const stack = clientStack.concat(this.middlewareStack);
|
|
@@ -6,70 +6,11 @@ const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const Aws_query_1 = require("../protocols/Aws_query");
|
|
9
|
-
/**
|
|
10
|
-
* <p>Decodes additional information about the authorization status of a request from an
|
|
11
|
-
* encoded message returned in response to an Amazon Web Services request.</p>
|
|
12
|
-
* <p>For example, if a user is not authorized to perform an operation that he or she has
|
|
13
|
-
* requested, the request returns a <code>Client.UnauthorizedOperation</code> response (an
|
|
14
|
-
* HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can
|
|
15
|
-
* provide details about this authorization failure. </p>
|
|
16
|
-
* <note>
|
|
17
|
-
* <p>Only certain Amazon Web Services operations return an encoded authorization message. The
|
|
18
|
-
* documentation for an individual operation indicates whether that operation returns an
|
|
19
|
-
* encoded message in addition to returning an HTTP code.</p>
|
|
20
|
-
* </note>
|
|
21
|
-
* <p>The message is encoded because the details of the authorization status can constitute
|
|
22
|
-
* privileged information that the user who requested the operation should not see. To decode
|
|
23
|
-
* an authorization status message, a user must be granted permissions via an IAM policy to
|
|
24
|
-
* request the <code>DecodeAuthorizationMessage</code>
|
|
25
|
-
* (<code>sts:DecodeAuthorizationMessage</code>) action. </p>
|
|
26
|
-
* <p>The decoded message includes the following type of information:</p>
|
|
27
|
-
* <ul>
|
|
28
|
-
* <li>
|
|
29
|
-
* <p>Whether the request was denied due to an explicit deny or due to the absence of an
|
|
30
|
-
* explicit allow. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow">Determining Whether a Request is Allowed or Denied</a> in the
|
|
31
|
-
* <i>IAM User Guide</i>. </p>
|
|
32
|
-
* </li>
|
|
33
|
-
* <li>
|
|
34
|
-
* <p>The principal who made the request.</p>
|
|
35
|
-
* </li>
|
|
36
|
-
* <li>
|
|
37
|
-
* <p>The requested action.</p>
|
|
38
|
-
* </li>
|
|
39
|
-
* <li>
|
|
40
|
-
* <p>The requested resource.</p>
|
|
41
|
-
* </li>
|
|
42
|
-
* <li>
|
|
43
|
-
* <p>The values of condition keys in the context of the user's request.</p>
|
|
44
|
-
* </li>
|
|
45
|
-
* </ul>
|
|
46
|
-
* @example
|
|
47
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
48
|
-
* ```javascript
|
|
49
|
-
* import { STSClient, DecodeAuthorizationMessageCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
50
|
-
* // const { STSClient, DecodeAuthorizationMessageCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
51
|
-
* const client = new STSClient(config);
|
|
52
|
-
* const command = new DecodeAuthorizationMessageCommand(input);
|
|
53
|
-
* const response = await client.send(command);
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @see {@link DecodeAuthorizationMessageCommandInput} for command's `input` shape.
|
|
57
|
-
* @see {@link DecodeAuthorizationMessageCommandOutput} for command's `response` shape.
|
|
58
|
-
* @see {@link STSClientResolvedConfig | config} for command's `input` shape.
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
9
|
class DecodeAuthorizationMessageCommand extends smithy_client_1.Command {
|
|
62
|
-
// Start section: command_properties
|
|
63
|
-
// End section: command_properties
|
|
64
10
|
constructor(input) {
|
|
65
|
-
// Start section: command_constructor
|
|
66
11
|
super();
|
|
67
12
|
this.input = input;
|
|
68
|
-
// End section: command_constructor
|
|
69
13
|
}
|
|
70
|
-
/**
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
14
|
resolveMiddleware(clientStack, configuration, options) {
|
|
74
15
|
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
75
16
|
this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration));
|