@aws-sdk/nested-clients 3.730.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/README.md +13 -0
- package/dist-cjs/index.js +2 -0
- package/dist-cjs/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +56 -0
- package/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +106 -0
- package/dist-cjs/submodules/sso-oidc/index.js +804 -0
- package/dist-cjs/submodules/sso-oidc/runtimeConfig.browser.js +38 -0
- package/dist-cjs/submodules/sso-oidc/runtimeConfig.js +50 -0
- package/dist-cjs/submodules/sso-oidc/runtimeConfig.native.js +15 -0
- package/dist-cjs/submodules/sso-oidc/runtimeConfig.shared.js +40 -0
- package/dist-cjs/submodules/sts/STSClient.js +51 -0
- package/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +63 -0
- package/dist-cjs/submodules/sts/endpoint/EndpointParameters.js +20 -0
- package/dist-cjs/submodules/sts/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/submodules/sts/endpoint/ruleset.js +145 -0
- package/dist-cjs/submodules/sts/index.js +950 -0
- package/dist-cjs/submodules/sts/runtimeConfig.browser.js +39 -0
- package/dist-cjs/submodules/sts/runtimeConfig.js +64 -0
- package/dist-cjs/submodules/sts/runtimeConfig.native.js +15 -0
- package/dist-cjs/submodules/sts/runtimeConfig.shared.js +40 -0
- package/dist-cjs/submodules/sts/runtimeExtensions.js +25 -0
- package/dist-es/index.js +1 -0
- package/dist-es/submodules/sso-oidc/SSOOIDC.js +9 -0
- package/dist-es/submodules/sso-oidc/SSOOIDCClient.js +47 -0
- package/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +50 -0
- package/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js +23 -0
- package/dist-es/submodules/sso-oidc/commands/index.js +1 -0
- package/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js +14 -0
- package/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js +14 -0
- package/dist-es/submodules/sso-oidc/endpoint/ruleset.js +103 -0
- package/dist-es/submodules/sso-oidc/extensionConfiguration.js +1 -0
- package/dist-es/submodules/sso-oidc/index.js +5 -0
- package/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +8 -0
- package/dist-es/submodules/sso-oidc/models/index.js +1 -0
- package/dist-es/submodules/sso-oidc/models/models_0.js +190 -0
- package/dist-es/submodules/sso-oidc/protocols/Aws_restJson1.js +255 -0
- package/dist-es/submodules/sso-oidc/runtimeConfig.browser.js +33 -0
- package/dist-es/submodules/sso-oidc/runtimeConfig.js +45 -0
- package/dist-es/submodules/sso-oidc/runtimeConfig.native.js +11 -0
- package/dist-es/submodules/sso-oidc/runtimeConfig.shared.js +36 -0
- package/dist-es/submodules/sso-oidc/runtimeExtensions.js +21 -0
- package/dist-es/submodules/sts/STS.js +11 -0
- package/dist-es/submodules/sts/STSClient.js +47 -0
- package/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +56 -0
- package/dist-es/submodules/sts/commands/AssumeRoleCommand.js +23 -0
- package/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js +23 -0
- package/dist-es/submodules/sts/commands/index.js +2 -0
- package/dist-es/submodules/sts/defaultRoleAssumers.js +22 -0
- package/dist-es/submodules/sts/defaultStsRoleAssumers.js +93 -0
- package/dist-es/submodules/sts/endpoint/EndpointParameters.js +16 -0
- package/dist-es/submodules/sts/endpoint/endpointResolver.js +14 -0
- package/dist-es/submodules/sts/endpoint/ruleset.js +142 -0
- package/dist-es/submodules/sts/extensionConfiguration.js +1 -0
- package/dist-es/submodules/sts/index.js +6 -0
- package/dist-es/submodules/sts/models/STSServiceException.js +8 -0
- package/dist-es/submodules/sts/models/index.js +1 -0
- package/dist-es/submodules/sts/models/models_0.js +102 -0
- package/dist-es/submodules/sts/protocols/Aws_query.js +528 -0
- package/dist-es/submodules/sts/runtimeConfig.browser.js +34 -0
- package/dist-es/submodules/sts/runtimeConfig.js +59 -0
- package/dist-es/submodules/sts/runtimeConfig.native.js +11 -0
- package/dist-es/submodules/sts/runtimeConfig.shared.js +36 -0
- package/dist-es/submodules/sts/runtimeExtensions.js +21 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +54 -0
- package/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +219 -0
- package/dist-types/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/submodules/sso-oidc/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/submodules/sso-oidc/commands/CreateTokenCommand.d.ts +128 -0
- package/dist-types/submodules/sso-oidc/commands/index.d.ts +1 -0
- package/dist-types/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +40 -0
- package/dist-types/submodules/sso-oidc/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/submodules/sso-oidc/endpoint/ruleset.d.ts +2 -0
- package/dist-types/submodules/sso-oidc/extensionConfiguration.d.ts +9 -0
- package/dist-types/submodules/sso-oidc/index.d.ts +50 -0
- package/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +14 -0
- package/dist-types/submodules/sso-oidc/models/index.d.ts +1 -0
- package/dist-types/submodules/sso-oidc/models/models_0.d.ts +396 -0
- package/dist-types/submodules/sso-oidc/protocols/Aws_restJson1.d.ts +11 -0
- package/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +56 -0
- package/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +56 -0
- package/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +55 -0
- package/dist-types/submodules/sso-oidc/runtimeConfig.shared.d.ts +32 -0
- package/dist-types/submodules/sso-oidc/runtimeExtensions.d.ts +17 -0
- package/dist-types/submodules/sts/STS.d.ts +27 -0
- package/dist-types/submodules/sts/STSClient.d.ts +192 -0
- package/dist-types/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/submodules/sts/auth/httpAuthSchemeProvider.d.ts +71 -0
- package/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +222 -0
- package/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +254 -0
- package/dist-types/submodules/sts/commands/index.d.ts +2 -0
- package/dist-types/submodules/sts/defaultRoleAssumers.d.ts +23 -0
- package/dist-types/submodules/sts/defaultStsRoleAssumers.d.ts +43 -0
- package/dist-types/submodules/sts/endpoint/EndpointParameters.d.ts +46 -0
- package/dist-types/submodules/sts/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/submodules/sts/endpoint/ruleset.d.ts +2 -0
- package/dist-types/submodules/sts/extensionConfiguration.d.ts +9 -0
- package/dist-types/submodules/sts/index.d.ts +17 -0
- package/dist-types/submodules/sts/models/STSServiceException.d.ts +14 -0
- package/dist-types/submodules/sts/models/index.d.ts +1 -0
- package/dist-types/submodules/sts/models/models_0.d.ts +712 -0
- package/dist-types/submodules/sts/protocols/Aws_query.d.ts +20 -0
- package/dist-types/submodules/sts/runtimeConfig.browser.d.ts +58 -0
- package/dist-types/submodules/sts/runtimeConfig.d.ts +56 -0
- package/dist-types/submodules/sts/runtimeConfig.native.d.ts +57 -0
- package/dist-types/submodules/sts/runtimeConfig.shared.d.ts +32 -0
- package/dist-types/submodules/sts/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/sso-oidc/SSOOIDC.d.ts +22 -0
- package/dist-types/ts3.4/submodules/sso-oidc/SSOOIDCClient.d.ts +121 -0
- package/dist-types/ts3.4/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/submodules/sso-oidc/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/submodules/sso-oidc/commands/CreateTokenCommand.d.ts +43 -0
- package/dist-types/ts3.4/submodules/sso-oidc/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/submodules/sso-oidc/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/submodules/sso-oidc/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/submodules/sso-oidc/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/submodules/sso-oidc/index.d.ts +8 -0
- package/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +9 -0
- package/dist-types/ts3.4/submodules/sso-oidc/models/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/sso-oidc/models/models_0.d.ts +123 -0
- package/dist-types/ts3.4/submodules/sso-oidc/protocols/Aws_restJson1.d.ts +17 -0
- package/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +116 -0
- package/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +113 -0
- package/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +120 -0
- package/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.shared.d.ts +49 -0
- package/dist-types/ts3.4/submodules/sso-oidc/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/submodules/sts/STS.d.ts +39 -0
- package/dist-types/ts3.4/submodules/sts/STSClient.d.ts +128 -0
- package/dist-types/ts3.4/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/submodules/sts/auth/httpAuthSchemeProvider.d.ts +54 -0
- package/dist-types/ts3.4/submodules/sts/commands/AssumeRoleCommand.d.ts +47 -0
- package/dist-types/ts3.4/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +51 -0
- package/dist-types/ts3.4/submodules/sts/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/submodules/sts/defaultRoleAssumers.d.ts +19 -0
- package/dist-types/ts3.4/submodules/sts/defaultStsRoleAssumers.d.ts +33 -0
- package/dist-types/ts3.4/submodules/sts/endpoint/EndpointParameters.d.ts +57 -0
- package/dist-types/ts3.4/submodules/sts/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/submodules/sts/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/submodules/sts/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/submodules/sts/index.d.ts +9 -0
- package/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +9 -0
- package/dist-types/ts3.4/submodules/sts/models/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +123 -0
- package/dist-types/ts3.4/submodules/sts/protocols/Aws_query.d.ts +29 -0
- package/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +127 -0
- package/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +111 -0
- package/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +131 -0
- package/dist-types/ts3.4/submodules/sts/runtimeConfig.shared.d.ts +51 -0
- package/dist-types/ts3.4/submodules/sts/runtimeExtensions.d.ts +11 -0
- package/package.json +115 -0
- package/sso-oidc.d.ts +7 -0
- package/sso-oidc.js +5 -0
- package/sts.d.ts +7 -0
- package/sts.js +5 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link AssumeRoleWithWebIdentityCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface AssumeRoleWithWebIdentityCommandInput extends AssumeRoleWithWebIdentityRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link AssumeRoleWithWebIdentityCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWebIdentityResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const AssumeRoleWithWebIdentityCommand_base: {
|
|
25
|
+
new (input: AssumeRoleWithWebIdentityCommandInput): import("@smithy/smithy-client").CommandImpl<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: AssumeRoleWithWebIdentityCommandInput): import("@smithy/smithy-client").CommandImpl<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Returns a set of temporary security credentials for users who have been authenticated in
|
|
31
|
+
* a mobile or web application with a web identity provider. Example providers include the
|
|
32
|
+
* OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible
|
|
33
|
+
* identity provider such as Google or <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito federated identities</a>.</p>
|
|
34
|
+
* <note>
|
|
35
|
+
* <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the
|
|
36
|
+
* <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
|
|
37
|
+
* identify a user. You can also supply the user with a consistent identity throughout the
|
|
38
|
+
* lifetime of an application.</p>
|
|
39
|
+
* <p>To learn more about Amazon Cognito, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito identity
|
|
40
|
+
* pools</a> in <i>Amazon Cognito Developer Guide</i>.</p>
|
|
41
|
+
* </note>
|
|
42
|
+
* <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
|
|
43
|
+
* security credentials. Therefore, you can distribute an application (for example, on mobile
|
|
44
|
+
* devices) that requests temporary security credentials without including long-term Amazon Web Services
|
|
45
|
+
* credentials in the application. You also don't need to deploy server-based proxy services
|
|
46
|
+
* that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by
|
|
47
|
+
* using a token from the web identity provider. For a comparison of
|
|
48
|
+
* <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce
|
|
49
|
+
* temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
|
|
50
|
+
* Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html">Compare STS
|
|
51
|
+
* credentials</a> in the <i>IAM User Guide</i>.</p>
|
|
52
|
+
* <p>The temporary security credentials returned by this API consist of an access key ID, a
|
|
53
|
+
* secret access key, and a security token. Applications can use these temporary security
|
|
54
|
+
* credentials to sign calls to Amazon Web Services service API operations.</p>
|
|
55
|
+
* <p>
|
|
56
|
+
* <b>Session Duration</b>
|
|
57
|
+
* </p>
|
|
58
|
+
* <p>By default, the temporary security credentials created by
|
|
59
|
+
* <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the
|
|
60
|
+
* optional <code>DurationSeconds</code> parameter to specify the duration of your session.
|
|
61
|
+
* You can provide a value from 900 seconds (15 minutes) up to the maximum session duration
|
|
62
|
+
* setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how
|
|
63
|
+
* to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration">Update the maximum session duration for a role </a> in the
|
|
64
|
+
* <i>IAM User Guide</i>. The maximum session duration limit applies when
|
|
65
|
+
* you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
|
|
66
|
+
* commands. However the limit does not apply when you use those operations to create a
|
|
67
|
+
* 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
|
|
68
|
+
* <i>IAM User Guide</i>. </p>
|
|
69
|
+
* <p>
|
|
70
|
+
* <b>Permissions</b>
|
|
71
|
+
* </p>
|
|
72
|
+
* <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can
|
|
73
|
+
* be used to make API calls to any Amazon Web Services service with the following exception: you cannot
|
|
74
|
+
* call the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
|
|
75
|
+
* operations.</p>
|
|
76
|
+
* <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
|
|
77
|
+
* this operation. You can pass a single JSON policy document to use as an inline session
|
|
78
|
+
* policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as
|
|
79
|
+
* managed session policies. The plaintext that you use for both inline and managed session
|
|
80
|
+
* policies can't exceed 2,048 characters. Passing policies to this operation returns new
|
|
81
|
+
* temporary credentials. The resulting session's permissions are the intersection of the
|
|
82
|
+
* role's identity-based policy and the session policies. You can use the role's temporary
|
|
83
|
+
* credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
|
|
84
|
+
* the role. You cannot use session policies to grant more permissions than those allowed
|
|
85
|
+
* by the identity-based policy of the role that is being assumed. For more information, see
|
|
86
|
+
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
|
|
87
|
+
* Policies</a> in the <i>IAM User Guide</i>.</p>
|
|
88
|
+
* <p>
|
|
89
|
+
* <b>Tags</b>
|
|
90
|
+
* </p>
|
|
91
|
+
* <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
|
|
92
|
+
* session tags. Each session tag consists of a key name and an associated value. For more
|
|
93
|
+
* 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
|
|
94
|
+
* <i>IAM User Guide</i>.</p>
|
|
95
|
+
* <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
|
|
96
|
+
* characters and the values can’t exceed 256 characters. For these and additional limits, see
|
|
97
|
+
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
|
|
98
|
+
* and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
|
|
99
|
+
* <note>
|
|
100
|
+
* <p>An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,
|
|
101
|
+
* and session tags into a packed binary format that has a separate limit. Your request can
|
|
102
|
+
* fail for this limit even if your plaintext meets the other requirements. The
|
|
103
|
+
* <code>PackedPolicySize</code> response element indicates by percentage how close the
|
|
104
|
+
* policies and tags for your request are to the upper size limit.</p>
|
|
105
|
+
* </note>
|
|
106
|
+
* <p>You can pass a session tag with the same key as a tag that is attached to the role. When
|
|
107
|
+
* you do, the session tag overrides the role tag with the same key.</p>
|
|
108
|
+
* <p>An administrator must grant you the permissions necessary to pass session tags. The
|
|
109
|
+
* administrator can also create granular permissions to allow you to pass only specific
|
|
110
|
+
* 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
|
|
111
|
+
* for Attribute-Based Access Control</a> in the
|
|
112
|
+
* <i>IAM User Guide</i>.</p>
|
|
113
|
+
* <p>You can set the session tags as transitive. Transitive tags persist during role
|
|
114
|
+
* 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
|
|
115
|
+
* with Session Tags</a> in the <i>IAM User Guide</i>.</p>
|
|
116
|
+
* <p>
|
|
117
|
+
* <b>Identities</b>
|
|
118
|
+
* </p>
|
|
119
|
+
* <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have
|
|
120
|
+
* an identity token from a supported identity provider and create a role that the application
|
|
121
|
+
* can assume. The role that your application assumes must trust the identity provider that is
|
|
122
|
+
* associated with the identity token. In other words, the identity provider must be specified
|
|
123
|
+
* in the role's trust policy. </p>
|
|
124
|
+
* <important>
|
|
125
|
+
* <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your
|
|
126
|
+
* CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of
|
|
127
|
+
* the provided web identity token. We recommend that you avoid using any personally
|
|
128
|
+
* identifiable information (PII) in this field. For example, you could instead use a GUID
|
|
129
|
+
* or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested
|
|
130
|
+
* in the OIDC specification</a>.</p>
|
|
131
|
+
* </important>
|
|
132
|
+
* <p>For more information about how to use OIDC federation and the
|
|
133
|
+
* <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p>
|
|
134
|
+
* <ul>
|
|
135
|
+
* <li>
|
|
136
|
+
* <p>
|
|
137
|
+
* <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>
|
|
138
|
+
* </li>
|
|
139
|
+
* <li>
|
|
140
|
+
* <p>
|
|
141
|
+
* <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
|
|
142
|
+
* contain sample apps that show how to invoke the identity providers. The toolkits then
|
|
143
|
+
* show how to use the information from these providers to get and use temporary
|
|
144
|
+
* security credentials. </p>
|
|
145
|
+
* </li>
|
|
146
|
+
* </ul>
|
|
147
|
+
* @example
|
|
148
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
149
|
+
* ```javascript
|
|
150
|
+
* import { STSClient, AssumeRoleWithWebIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
151
|
+
* // const { STSClient, AssumeRoleWithWebIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
152
|
+
* const client = new STSClient(config);
|
|
153
|
+
* const input = { // AssumeRoleWithWebIdentityRequest
|
|
154
|
+
* RoleArn: "STRING_VALUE", // required
|
|
155
|
+
* RoleSessionName: "STRING_VALUE", // required
|
|
156
|
+
* WebIdentityToken: "STRING_VALUE", // required
|
|
157
|
+
* ProviderId: "STRING_VALUE",
|
|
158
|
+
* PolicyArns: [ // policyDescriptorListType
|
|
159
|
+
* { // PolicyDescriptorType
|
|
160
|
+
* arn: "STRING_VALUE",
|
|
161
|
+
* },
|
|
162
|
+
* ],
|
|
163
|
+
* Policy: "STRING_VALUE",
|
|
164
|
+
* DurationSeconds: Number("int"),
|
|
165
|
+
* };
|
|
166
|
+
* const command = new AssumeRoleWithWebIdentityCommand(input);
|
|
167
|
+
* const response = await client.send(command);
|
|
168
|
+
* // { // AssumeRoleWithWebIdentityResponse
|
|
169
|
+
* // Credentials: { // Credentials
|
|
170
|
+
* // AccessKeyId: "STRING_VALUE", // required
|
|
171
|
+
* // SecretAccessKey: "STRING_VALUE", // required
|
|
172
|
+
* // SessionToken: "STRING_VALUE", // required
|
|
173
|
+
* // Expiration: new Date("TIMESTAMP"), // required
|
|
174
|
+
* // },
|
|
175
|
+
* // SubjectFromWebIdentityToken: "STRING_VALUE",
|
|
176
|
+
* // AssumedRoleUser: { // AssumedRoleUser
|
|
177
|
+
* // AssumedRoleId: "STRING_VALUE", // required
|
|
178
|
+
* // Arn: "STRING_VALUE", // required
|
|
179
|
+
* // },
|
|
180
|
+
* // PackedPolicySize: Number("int"),
|
|
181
|
+
* // Provider: "STRING_VALUE",
|
|
182
|
+
* // Audience: "STRING_VALUE",
|
|
183
|
+
* // SourceIdentity: "STRING_VALUE",
|
|
184
|
+
* // };
|
|
185
|
+
*
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* @param AssumeRoleWithWebIdentityCommandInput - {@link AssumeRoleWithWebIdentityCommandInput}
|
|
189
|
+
* @returns {@link AssumeRoleWithWebIdentityCommandOutput}
|
|
190
|
+
* @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape.
|
|
191
|
+
* @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape.
|
|
192
|
+
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
193
|
+
*
|
|
194
|
+
* @throws {@link ExpiredTokenException} (client fault)
|
|
195
|
+
* <p>The web identity token that was passed is expired or is not valid. Get a new identity
|
|
196
|
+
* token from the identity provider and then retry the request.</p>
|
|
197
|
+
*
|
|
198
|
+
* @throws {@link IDPCommunicationErrorException} (client fault)
|
|
199
|
+
* <p>The request could not be fulfilled because the identity provider (IDP) that was asked
|
|
200
|
+
* to verify the incoming identity token could not be reached. This is often a transient
|
|
201
|
+
* error caused by network conditions. Retry the request a limited number of times so that
|
|
202
|
+
* you don't exceed the request rate. If the error persists, the identity provider might be
|
|
203
|
+
* down or not responding.</p>
|
|
204
|
+
*
|
|
205
|
+
* @throws {@link IDPRejectedClaimException} (client fault)
|
|
206
|
+
* <p>The identity provider (IdP) reported that authentication failed. This might be because
|
|
207
|
+
* the claim is invalid.</p>
|
|
208
|
+
* <p>If this error is returned for the <code>AssumeRoleWithWebIdentity</code> operation, it
|
|
209
|
+
* can also mean that the claim has expired or has been explicitly revoked. </p>
|
|
210
|
+
*
|
|
211
|
+
* @throws {@link InvalidIdentityTokenException} (client fault)
|
|
212
|
+
* <p>The web identity token that was passed could not be validated by Amazon Web Services. Get a new
|
|
213
|
+
* identity token from the identity provider and then retry the request.</p>
|
|
214
|
+
*
|
|
215
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
216
|
+
* <p>The request was rejected because the policy document was malformed. The error message
|
|
217
|
+
* describes the specific error.</p>
|
|
218
|
+
*
|
|
219
|
+
* @throws {@link PackedPolicyTooLargeException} (client fault)
|
|
220
|
+
* <p>The request was rejected because the total packed size of the session policies and
|
|
221
|
+
* session tags combined was too large. An Amazon Web Services conversion compresses the session policy
|
|
222
|
+
* document, session policy ARNs, and session tags into a packed binary format that has a
|
|
223
|
+
* separate limit. The error message indicates by percentage how close the policies and
|
|
224
|
+
* tags are to the upper size limit. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in
|
|
225
|
+
* the <i>IAM User Guide</i>.</p>
|
|
226
|
+
* <p>You could receive this error even though you meet other defined session policy and
|
|
227
|
+
* session tag limits. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length">IAM and STS Entity Character Limits</a> in the <i>IAM User
|
|
228
|
+
* Guide</i>.</p>
|
|
229
|
+
*
|
|
230
|
+
* @throws {@link RegionDisabledException} (client fault)
|
|
231
|
+
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
232
|
+
* generate credentials. The account administrator must use the IAM console to activate
|
|
233
|
+
* STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
|
|
234
|
+
* Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
|
|
235
|
+
* Guide</i>.</p>
|
|
236
|
+
*
|
|
237
|
+
* @throws {@link STSServiceException}
|
|
238
|
+
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
239
|
+
*
|
|
240
|
+
* @public
|
|
241
|
+
*/
|
|
242
|
+
export declare class AssumeRoleWithWebIdentityCommand extends AssumeRoleWithWebIdentityCommand_base {
|
|
243
|
+
/** @internal type navigation helper, not in runtime. */
|
|
244
|
+
protected static __types: {
|
|
245
|
+
api: {
|
|
246
|
+
input: AssumeRoleWithWebIdentityRequest;
|
|
247
|
+
output: AssumeRoleWithWebIdentityResponse;
|
|
248
|
+
};
|
|
249
|
+
sdk: {
|
|
250
|
+
input: AssumeRoleWithWebIdentityCommandInput;
|
|
251
|
+
output: AssumeRoleWithWebIdentityCommandOutput;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Pluggable } from "@smithy/types";
|
|
2
|
+
import { DefaultCredentialProvider, RoleAssumer, RoleAssumerWithWebIdentity, STSRoleAssumerOptions } from "./defaultStsRoleAssumers";
|
|
3
|
+
import { ServiceInputTypes, ServiceOutputTypes } from "./STSClient";
|
|
4
|
+
/**
|
|
5
|
+
* The default role assumer that used by credential providers when sts:AssumeRole API is needed.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getDefaultRoleAssumer: (stsOptions?: STSRoleAssumerOptions, stsPlugins?: Pluggable<ServiceInputTypes, ServiceOutputTypes>[]) => RoleAssumer;
|
|
8
|
+
/**
|
|
9
|
+
* The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getDefaultRoleAssumerWithWebIdentity: (stsOptions?: STSRoleAssumerOptions, stsPlugins?: Pluggable<ServiceInputTypes, ServiceOutputTypes>[]) => RoleAssumerWithWebIdentity;
|
|
12
|
+
/**
|
|
13
|
+
* The default credential providers depend STS client to assume role with desired API: sts:assumeRole,
|
|
14
|
+
* sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which
|
|
15
|
+
* encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular
|
|
16
|
+
* dependencies.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*
|
|
20
|
+
* @deprecated this is no longer needed. Use the defaultProvider directly,
|
|
21
|
+
* which will load STS if needed.
|
|
22
|
+
*/
|
|
23
|
+
export declare const decorateDefaultCredentialProvider: (provider: DefaultCredentialProvider) => DefaultCredentialProvider;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
|
+
import { AwsCredentialIdentity, Logger, Provider } from "@smithy/types";
|
|
3
|
+
import { AssumeRoleCommandInput } from "./commands/AssumeRoleCommand";
|
|
4
|
+
import { AssumeRoleWithWebIdentityCommandInput } from "./commands/AssumeRoleWithWebIdentityCommand";
|
|
5
|
+
import type { STSClient, STSClientConfig } from "./STSClient";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type STSRoleAssumerOptions = Pick<STSClientConfig, "logger" | "region" | "requestHandler"> & {
|
|
10
|
+
credentialProviderLogger?: Logger;
|
|
11
|
+
parentClientConfig?: CredentialProviderOptions["parentClientConfig"];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export type RoleAssumer = (sourceCreds: AwsCredentialIdentity, params: AssumeRoleCommandInput) => Promise<AwsCredentialIdentity>;
|
|
17
|
+
/**
|
|
18
|
+
* The default role assumer that used by credential providers when sts:AssumeRole API is needed.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare const getDefaultRoleAssumer: (stsOptions: STSRoleAssumerOptions, stsClientCtor: new (options: STSClientConfig) => STSClient) => RoleAssumer;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export type RoleAssumerWithWebIdentity = (params: AssumeRoleWithWebIdentityCommandInput) => Promise<AwsCredentialIdentity>;
|
|
26
|
+
/**
|
|
27
|
+
* The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare const getDefaultRoleAssumerWithWebIdentity: (stsOptions: STSRoleAssumerOptions, stsClientCtor: new (options: STSClientConfig) => STSClient) => RoleAssumerWithWebIdentity;
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export type DefaultCredentialProvider = (input: any) => Provider<AwsCredentialIdentity>;
|
|
35
|
+
/**
|
|
36
|
+
* The default credential providers depend STS client to assume role with desired API: sts:assumeRole,
|
|
37
|
+
* sts:assumeRoleWithWebIdentity, etc. This function decorates the default credential provider with role assumers which
|
|
38
|
+
* encapsulates the process of calling STS commands. This can only be imported by AWS client packages to avoid circular
|
|
39
|
+
* dependencies.
|
|
40
|
+
*
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export declare const decorateDefaultCredentialProvider: (provider: DefaultCredentialProvider) => DefaultCredentialProvider;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface ClientInputEndpointParameters {
|
|
6
|
+
region?: string | Provider<string>;
|
|
7
|
+
useDualstackEndpoint?: boolean | Provider<boolean>;
|
|
8
|
+
useFipsEndpoint?: boolean | Provider<boolean>;
|
|
9
|
+
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
|
|
10
|
+
useGlobalEndpoint?: boolean | Provider<boolean>;
|
|
11
|
+
}
|
|
12
|
+
export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & {
|
|
13
|
+
defaultSigningName: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const resolveClientEndpointParameters: <T>(options: T & ClientInputEndpointParameters) => T & ClientInputEndpointParameters & {
|
|
16
|
+
defaultSigningName: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const commonParams: {
|
|
19
|
+
readonly UseGlobalEndpoint: {
|
|
20
|
+
readonly type: "builtInParams";
|
|
21
|
+
readonly name: "useGlobalEndpoint";
|
|
22
|
+
};
|
|
23
|
+
readonly UseFIPS: {
|
|
24
|
+
readonly type: "builtInParams";
|
|
25
|
+
readonly name: "useFipsEndpoint";
|
|
26
|
+
};
|
|
27
|
+
readonly Endpoint: {
|
|
28
|
+
readonly type: "builtInParams";
|
|
29
|
+
readonly name: "endpoint";
|
|
30
|
+
};
|
|
31
|
+
readonly Region: {
|
|
32
|
+
readonly type: "builtInParams";
|
|
33
|
+
readonly name: "region";
|
|
34
|
+
};
|
|
35
|
+
readonly UseDualStack: {
|
|
36
|
+
readonly type: "builtInParams";
|
|
37
|
+
readonly name: "useDualstackEndpoint";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export interface EndpointParameters extends __EndpointParameters {
|
|
41
|
+
Region?: string;
|
|
42
|
+
UseDualStack?: boolean;
|
|
43
|
+
UseFIPS?: boolean;
|
|
44
|
+
Endpoint?: string;
|
|
45
|
+
UseGlobalEndpoint?: boolean;
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
2
|
+
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
3
|
+
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
4
|
+
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface STSExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <fullname>Security Token Service</fullname>
|
|
3
|
+
* <p>Security Token Service (STS) enables you to request temporary, limited-privilege
|
|
4
|
+
* credentials for users. This guide provides descriptions of the STS API. For
|
|
5
|
+
* 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>
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export * from "./STSClient";
|
|
10
|
+
export * from "./STS";
|
|
11
|
+
export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
|
|
12
|
+
export type { RuntimeExtension } from "./runtimeExtensions";
|
|
13
|
+
export type { STSExtensionConfiguration } from "./extensionConfiguration";
|
|
14
|
+
export * from "./commands";
|
|
15
|
+
export * from "./models";
|
|
16
|
+
export * from "./defaultRoleAssumers";
|
|
17
|
+
export { STSServiceException } from "./models/STSServiceException";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client";
|
|
2
|
+
export type { __ServiceExceptionOptions };
|
|
3
|
+
export { __ServiceException };
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*
|
|
7
|
+
* Base exception class for all service exceptions from STS service.
|
|
8
|
+
*/
|
|
9
|
+
export declare class STSServiceException extends __ServiceException {
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
constructor(options: __ServiceExceptionOptions);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models_0";
|