@aws-sdk/client-sts 3.35.0 → 3.38.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.
Files changed (135) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/STS.js +0 -8
  3. package/dist-cjs/STSClient.js +0 -13
  4. package/dist-cjs/commands/AssumeRoleCommand.js +0 -108
  5. package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js +0 -156
  6. package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js +0 -160
  7. package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +0 -60
  8. package/dist-cjs/commands/GetAccessKeyInfoCommand.js +0 -42
  9. package/dist-cjs/commands/GetCallerIdentityCommand.js +0 -34
  10. package/dist-cjs/commands/GetFederationTokenCommand.js +0 -163
  11. package/dist-cjs/commands/GetSessionTokenCommand.js +0 -76
  12. package/dist-cjs/commands/index.js +11 -0
  13. package/dist-cjs/defaultRoleAssumers.js +0 -17
  14. package/dist-cjs/defaultStsRoleAssumers.js +0 -21
  15. package/dist-cjs/endpoints.js +1 -2
  16. package/dist-cjs/index.js +3 -11
  17. package/dist-cjs/models/index.js +0 -1
  18. package/dist-cjs/models/models_0.js +0 -88
  19. package/dist-cjs/protocols/Aws_query.js +0 -3
  20. package/dist-cjs/runtimeConfig.browser.js +1 -6
  21. package/dist-cjs/runtimeConfig.js +3 -8
  22. package/dist-cjs/runtimeConfig.native.js +0 -4
  23. package/dist-cjs/runtimeConfig.shared.js +0 -4
  24. package/dist-es/STS.js +0 -1
  25. package/dist-es/STSClient.js +0 -1
  26. package/dist-es/commands/AssumeRoleCommand.js +0 -1
  27. package/dist-es/commands/AssumeRoleWithSAMLCommand.js +0 -1
  28. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +0 -1
  29. package/dist-es/commands/DecodeAuthorizationMessageCommand.js +0 -1
  30. package/dist-es/commands/GetAccessKeyInfoCommand.js +0 -1
  31. package/dist-es/commands/GetCallerIdentityCommand.js +0 -1
  32. package/dist-es/commands/GetFederationTokenCommand.js +0 -1
  33. package/dist-es/commands/GetSessionTokenCommand.js +0 -1
  34. package/dist-es/commands/index.js +8 -0
  35. package/dist-es/defaultRoleAssumers.js +0 -1
  36. package/dist-es/defaultStsRoleAssumers.js +0 -1
  37. package/dist-es/endpoints.js +1 -2
  38. package/dist-es/index.js +3 -11
  39. package/dist-es/models/index.js +0 -1
  40. package/dist-es/models/models_0.js +0 -1
  41. package/dist-es/protocols/Aws_query.js +0 -1
  42. package/dist-es/runtimeConfig.browser.js +1 -2
  43. package/dist-es/runtimeConfig.js +3 -4
  44. package/dist-es/runtimeConfig.native.js +0 -1
  45. package/dist-es/runtimeConfig.shared.js +0 -1
  46. package/dist-types/commands/index.d.ts +8 -0
  47. package/dist-types/index.d.ts +3 -10
  48. package/dist-types/ts3.4/STS.d.ts +9 -630
  49. package/dist-types/ts3.4/STSClient.d.ts +24 -93
  50. package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +2 -103
  51. package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +2 -151
  52. package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +2 -155
  53. package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +2 -55
  54. package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +2 -37
  55. package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +2 -29
  56. package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +2 -158
  57. package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +2 -71
  58. package/dist-types/ts3.4/commands/index.d.ts +8 -0
  59. package/dist-types/ts3.4/defaultRoleAssumers.d.ts +3 -14
  60. package/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +6 -25
  61. package/dist-types/ts3.4/index.d.ts +3 -10
  62. package/dist-types/ts3.4/models/models_0.d.ts +123 -948
  63. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  64. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  65. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  66. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  67. package/package.json +33 -30
  68. package/dist-cjs/STS.js.map +0 -1
  69. package/dist-cjs/STSClient.js.map +0 -1
  70. package/dist-cjs/commands/AssumeRoleCommand.js.map +0 -1
  71. package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
  72. package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
  73. package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
  74. package/dist-cjs/commands/GetAccessKeyInfoCommand.js.map +0 -1
  75. package/dist-cjs/commands/GetCallerIdentityCommand.js.map +0 -1
  76. package/dist-cjs/commands/GetFederationTokenCommand.js.map +0 -1
  77. package/dist-cjs/commands/GetSessionTokenCommand.js.map +0 -1
  78. package/dist-cjs/defaultRoleAssumers.js.map +0 -1
  79. package/dist-cjs/defaultStsRoleAssumers.js.map +0 -1
  80. package/dist-cjs/endpoints.js.map +0 -1
  81. package/dist-cjs/index.js.map +0 -1
  82. package/dist-cjs/models/index.js.map +0 -1
  83. package/dist-cjs/models/models_0.js.map +0 -1
  84. package/dist-cjs/protocols/Aws_query.js.map +0 -1
  85. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  86. package/dist-cjs/runtimeConfig.js.map +0 -1
  87. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  88. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  89. package/dist-es/STS.js.map +0 -1
  90. package/dist-es/STSClient.js.map +0 -1
  91. package/dist-es/commands/AssumeRoleCommand.js.map +0 -1
  92. package/dist-es/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
  93. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
  94. package/dist-es/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
  95. package/dist-es/commands/GetAccessKeyInfoCommand.js.map +0 -1
  96. package/dist-es/commands/GetCallerIdentityCommand.js.map +0 -1
  97. package/dist-es/commands/GetFederationTokenCommand.js.map +0 -1
  98. package/dist-es/commands/GetSessionTokenCommand.js.map +0 -1
  99. package/dist-es/defaultRoleAssumers.js.map +0 -1
  100. package/dist-es/defaultStsRoleAssumers.js.map +0 -1
  101. package/dist-es/endpoints.js.map +0 -1
  102. package/dist-es/index.js.map +0 -1
  103. package/dist-es/models/index.js.map +0 -1
  104. package/dist-es/models/models_0.js.map +0 -1
  105. package/dist-es/protocols/Aws_query.js.map +0 -1
  106. package/dist-es/runtimeConfig.browser.js.map +0 -1
  107. package/dist-es/runtimeConfig.js.map +0 -1
  108. package/dist-es/runtimeConfig.native.js.map +0 -1
  109. package/dist-es/runtimeConfig.shared.js.map +0 -1
  110. package/jest.config.js +0 -4
  111. package/src/STS.ts +0 -897
  112. package/src/STSClient.ts +0 -264
  113. package/src/commands/AssumeRoleCommand.ts +0 -177
  114. package/src/commands/AssumeRoleWithSAMLCommand.ts +0 -226
  115. package/src/commands/AssumeRoleWithWebIdentityCommand.ts +0 -233
  116. package/src/commands/DecodeAuthorizationMessageCommand.ts +0 -135
  117. package/src/commands/GetAccessKeyInfoCommand.ts +0 -114
  118. package/src/commands/GetCallerIdentityCommand.ts +0 -106
  119. package/src/commands/GetFederationTokenCommand.ts +0 -235
  120. package/src/commands/GetSessionTokenCommand.ts +0 -148
  121. package/src/defaultRoleAssumers.ts +0 -41
  122. package/src/defaultStsRoleAssumers.ts +0 -126
  123. package/src/endpoints.ts +0 -91
  124. package/src/index.ts +0 -12
  125. package/src/models/index.ts +0 -1
  126. package/src/models/models_0.ts +0 -1361
  127. package/src/protocols/Aws_query.ts +0 -1514
  128. package/src/runtimeConfig.browser.ts +0 -41
  129. package/src/runtimeConfig.native.ts +0 -17
  130. package/src/runtimeConfig.shared.ts +0 -17
  131. package/src/runtimeConfig.ts +0 -46
  132. package/test/defaultRoleAssumers.spec.ts +0 -149
  133. package/tsconfig.es.json +0 -10
  134. package/tsconfig.json +0 -33
  135. package/tsconfig.types.json +0 -9
@@ -17,128 +17,59 @@ import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./com
17
17
  export declare type ServiceInputTypes = AssumeRoleCommandInput | AssumeRoleWithSAMLCommandInput | AssumeRoleWithWebIdentityCommandInput | DecodeAuthorizationMessageCommandInput | GetAccessKeyInfoCommandInput | GetCallerIdentityCommandInput | GetFederationTokenCommandInput | GetSessionTokenCommandInput;
18
18
  export declare type ServiceOutputTypes = AssumeRoleCommandOutput | AssumeRoleWithSAMLCommandOutput | AssumeRoleWithWebIdentityCommandOutput | DecodeAuthorizationMessageCommandOutput | GetAccessKeyInfoCommandOutput | GetCallerIdentityCommandOutput | GetFederationTokenCommandOutput | GetSessionTokenCommandOutput;
19
19
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
20
- /**
21
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
22
- */
20
+
23
21
  requestHandler?: __HttpHandler;
24
- /**
25
- * A constructor for a class implementing the {@link __Hash} interface
26
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
27
- * @internal
28
- */
22
+
29
23
  sha256?: __HashConstructor;
30
- /**
31
- * The function that will be used to convert strings into HTTP endpoints.
32
- * @internal
33
- */
24
+
34
25
  urlParser?: __UrlParser;
35
- /**
36
- * A function that can calculate the length of a request body.
37
- * @internal
38
- */
26
+
39
27
  bodyLengthChecker?: (body: any) => number | undefined;
40
- /**
41
- * A function that converts a stream into an array of bytes.
42
- * @internal
43
- */
28
+
44
29
  streamCollector?: __StreamCollector;
45
- /**
46
- * The function that will be used to convert a base64-encoded string to a byte array.
47
- * @internal
48
- */
30
+
49
31
  base64Decoder?: __Decoder;
50
- /**
51
- * The function that will be used to convert binary data to a base64-encoded string.
52
- * @internal
53
- */
32
+
54
33
  base64Encoder?: __Encoder;
55
- /**
56
- * The function that will be used to convert a UTF8-encoded string to a byte array.
57
- * @internal
58
- */
34
+
59
35
  utf8Decoder?: __Decoder;
60
- /**
61
- * The function that will be used to convert binary data to a UTF-8 encoded string.
62
- * @internal
63
- */
36
+
64
37
  utf8Encoder?: __Encoder;
65
- /**
66
- * The runtime environment.
67
- * @internal
68
- */
38
+
69
39
  runtime?: string;
70
- /**
71
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
72
- * trait of an operation.
73
- */
40
+
74
41
  disableHostPrefix?: boolean;
75
- /**
76
- * Value for how many times a request will be made at most in case of retry.
77
- */
42
+
78
43
  maxAttempts?: number | __Provider<number>;
79
- /**
80
- * Specifies which retry algorithm to use.
81
- */
44
+
82
45
  retryMode?: string | __Provider<string>;
83
- /**
84
- * Optional logger for logging debug/info/warn/error.
85
- */
46
+
86
47
  logger?: __Logger;
87
- /**
88
- * Unique service identifier.
89
- * @internal
90
- */
48
+
91
49
  serviceId?: string;
92
- /**
93
- * The AWS region to which this client will send requests
94
- */
50
+
95
51
  region?: string | __Provider<string>;
96
- /**
97
- * Default credentials provider; Not available in browser runtime.
98
- * @internal
99
- */
52
+
100
53
  credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
101
- /**
102
- * Fetch related hostname, signing name or signing region with given region.
103
- * @internal
104
- */
54
+
105
55
  regionInfoProvider?: RegionInfoProvider;
106
- /**
107
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
108
- * @internal
109
- */
56
+
110
57
  defaultUserAgentProvider?: Provider<__UserAgent>;
111
58
  }
112
59
  declare type STSClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & StsAuthInputConfig & UserAgentInputConfig;
113
- /**
114
- * The configuration interface of STSClient class constructor that set the region, credentials and other options.
115
- */
60
+
116
61
  export interface STSClientConfig extends STSClientConfigType {
117
62
  }
118
63
  declare type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & StsAuthResolvedConfig & UserAgentResolvedConfig;
119
- /**
120
- * The resolved configuration interface of STSClient class. This is resolved and normalized from the {@link STSClientConfig | constructor configuration interface}.
121
- */
64
+
122
65
  export interface STSClientResolvedConfig extends STSClientResolvedConfigType {
123
66
  }
124
- /**
125
- * <fullname>Security Token Service</fullname>
126
- * <p>Security Token Service (STS) enables you to request temporary, limited-privilege
127
- * credentials for Identity and Access Management (IAM) users or for users that you
128
- * authenticate (federated users). This guide provides descriptions of the STS API. For
129
- * 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>
130
- */
67
+
131
68
  export declare class STSClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig> {
132
- /**
133
- * The resolved configuration of STSClient class. This is resolved and normalized from the {@link STSClientConfig | constructor configuration interface}.
134
- */
69
+
135
70
  readonly config: STSClientResolvedConfig;
136
71
  constructor(configuration: STSClientConfig);
137
- /**
138
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
139
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
140
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
141
- */
72
+
142
73
  destroy(): void;
143
74
  }
144
75
  export {};
@@ -6,112 +6,11 @@ export interface AssumeRoleCommandInput extends AssumeRoleRequest {
6
6
  }
7
7
  export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataBearer {
8
8
  }
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
- */
9
+
109
10
  export declare class AssumeRoleCommand extends $Command<AssumeRoleCommandInput, AssumeRoleCommandOutput, STSClientResolvedConfig> {
110
11
  readonly input: AssumeRoleCommandInput;
111
12
  constructor(input: AssumeRoleCommandInput);
112
- /**
113
- * @internal
114
- */
13
+
115
14
  resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleCommandInput, AssumeRoleCommandOutput>;
116
15
  private serialize;
117
16
  private deserialize;
@@ -6,160 +6,11 @@ export interface AssumeRoleWithSAMLCommandInput extends AssumeRoleWithSAMLReques
6
6
  }
7
7
  export interface AssumeRoleWithSAMLCommandOutput extends AssumeRoleWithSAMLResponse, __MetadataBearer {
8
8
  }
9
- /**
10
- * <p>Returns a set of temporary security credentials for users who have been authenticated
11
- * via a SAML authentication response. This operation provides a mechanism for tying an
12
- * enterprise identity store or directory to role-based Amazon Web Services access without user-specific
13
- * credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the
14
- * 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
15
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
16
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
17
- * <p>The temporary security credentials returned by this operation consist of an access key
18
- * ID, a secret access key, and a security token. Applications can use these temporary
19
- * security credentials to sign calls to Amazon Web Services services.</p>
20
- * <p>
21
- * <b>Session Duration</b>
22
- * </p>
23
- * <p>By default, the temporary security credentials created by
24
- * <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional
25
- * <code>DurationSeconds</code> parameter to specify the duration of your session. Your
26
- * role session lasts for the duration that you specify, or until the time specified in the
27
- * SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is
28
- * shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes)
29
- * up to the maximum session duration setting for the role. This setting can have a value from
30
- * 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
31
- * Maximum Session Duration Setting for a Role</a> in the
32
- * <i>IAM User Guide</i>. The maximum session duration limit applies when
33
- * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
34
- * commands. However the limit does not apply when you use those operations to create a
35
- * 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
36
- * <i>IAM User Guide</i>.</p>
37
- * <note>
38
- * <p>
39
- * <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
40
- * role session to a maximum of one hour. When you use the <code>AssumeRole</code> API
41
- * operation to assume a role, you can specify the duration of your role session with
42
- * the <code>DurationSeconds</code> parameter. You can specify a parameter value of up
43
- * to 43200 seconds (12 hours), depending on the maximum session duration setting for
44
- * your role. However, if you assume a role using role chaining and provide a
45
- * <code>DurationSeconds</code> parameter value greater than one hour, the
46
- * operation fails.</p>
47
- * </note>
48
- * <p>
49
- * <b>Permissions</b>
50
- * </p>
51
- * <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be
52
- * used to make API calls to any Amazon Web Services service with the following exception: you cannot call
53
- * the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
54
- * operations.</p>
55
- * <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
56
- * this operation. You can pass a single JSON policy document to use as an inline session
57
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
58
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
59
- * characters. Passing policies to this operation returns new
60
- * temporary credentials. The resulting session's permissions are the intersection of the
61
- * role's identity-based policy and the session policies. You can use the role's temporary
62
- * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
63
- * the role. You cannot use session policies to grant more permissions than those allowed
64
- * by the identity-based policy of the role that is being assumed. For more information, see
65
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
66
- * Policies</a> in the <i>IAM User Guide</i>.</p>
67
- * <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security
68
- * credentials. The identity of the caller is validated by using keys in the metadata document
69
- * that is uploaded for the SAML provider entity for your identity provider. </p>
70
- * <important>
71
- * <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs.
72
- * The entry includes the value in the <code>NameID</code> element of the SAML assertion.
73
- * We recommend that you use a <code>NameIDType</code> that is not associated with any
74
- * personally identifiable information (PII). For example, you could instead use the
75
- * persistent identifier
76
- * (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p>
77
- * </important>
78
- * <p>
79
- * <b>Tags</b>
80
- * </p>
81
- * <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as
82
- * session tags. Each session tag consists of a key name and an associated value. For more
83
- * 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
84
- * <i>IAM User Guide</i>.</p>
85
- * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
86
- * characters and the values can’t exceed 256 characters. For these and additional limits, see
87
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
88
- * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
89
- *
90
- * <note>
91
- * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
92
- * packed binary format that has a separate limit. Your request can fail for this limit
93
- * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
94
- * response element indicates by percentage how close the policies and tags for your
95
- * request are to the upper size limit.
96
- * </p>
97
- * </note>
98
- * <p>You can pass a session tag with the same key as a tag that is
99
- * attached to the role. When you do, session tags override the role's tags with the same
100
- * key.</p>
101
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
102
- * administrator can also create granular permissions to allow you to pass only specific
103
- * 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
104
- * for Attribute-Based Access Control</a> in the
105
- * <i>IAM User Guide</i>.</p>
106
- * <p>You can set the session tags as transitive. Transitive tags persist during role
107
- * 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
108
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
109
- * <p>
110
- * <b>SAML Configuration</b>
111
- * </p>
112
- * <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure
113
- * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you
114
- * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that
115
- * represents your identity provider. You must also create an IAM role that specifies this
116
- * SAML provider in its trust policy. </p>
117
- * <p>For more information, 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_saml.html">About
122
- * SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
123
- * </p>
124
- * </li>
125
- * <li>
126
- * <p>
127
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the
128
- * <i>IAM User Guide</i>. </p>
129
- * </li>
130
- * <li>
131
- * <p>
132
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring
133
- * a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
134
- * </p>
135
- * </li>
136
- * <li>
137
- * <p>
138
- * <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
139
- * <i>IAM User Guide</i>. </p>
140
- * </li>
141
- * </ul>
142
- * @example
143
- * Use a bare-bones client and the command you need to make an API call.
144
- * ```javascript
145
- * import { STSClient, AssumeRoleWithSAMLCommand } from "@aws-sdk/client-sts"; // ES Modules import
146
- * // const { STSClient, AssumeRoleWithSAMLCommand } = require("@aws-sdk/client-sts"); // CommonJS import
147
- * const client = new STSClient(config);
148
- * const command = new AssumeRoleWithSAMLCommand(input);
149
- * const response = await client.send(command);
150
- * ```
151
- *
152
- * @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape.
153
- * @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape.
154
- * @see {@link STSClientResolvedConfig | config} for command's `input` shape.
155
- *
156
- */
9
+
157
10
  export declare class AssumeRoleWithSAMLCommand extends $Command<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, STSClientResolvedConfig> {
158
11
  readonly input: AssumeRoleWithSAMLCommandInput;
159
12
  constructor(input: AssumeRoleWithSAMLCommandInput);
160
- /**
161
- * @internal
162
- */
13
+
163
14
  resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput>;
164
15
  private serialize;
165
16
  private deserialize;
@@ -6,164 +6,11 @@ export interface AssumeRoleWithWebIdentityCommandInput extends AssumeRoleWithWeb
6
6
  }
7
7
  export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWebIdentityResponse, __MetadataBearer {
8
8
  }
9
- /**
10
- * <p>Returns a set of temporary security credentials for users who have been authenticated in
11
- * a mobile or web application with a web identity provider. Example providers include Amazon Cognito,
12
- * Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity
13
- * provider.</p>
14
- * <note>
15
- * <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the
16
- * <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
17
- * identify a user. You can also supply the user with a consistent identity throughout the
18
- * lifetime of an application.</p>
19
- * <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
20
- * <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
21
- * <i>Amazon Web Services SDK for iOS Developer Guide</i>.</p>
22
- * </note>
23
- * <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
24
- * security credentials. Therefore, you can distribute an application (for example, on mobile
25
- * devices) that requests temporary security credentials without including long-term Amazon Web Services
26
- * credentials in the application. You also don't need to deploy server-based proxy services
27
- * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by
28
- * using a token from the web identity provider. For a comparison of
29
- * <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce
30
- * temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
31
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
32
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
33
- * <p>The temporary security credentials returned by this API consist of an access key ID, a
34
- * secret access key, and a security token. Applications can use these temporary security
35
- * credentials to sign calls to Amazon Web Services service API operations.</p>
36
- * <p>
37
- * <b>Session Duration</b>
38
- * </p>
39
- * <p>By default, the temporary security credentials created by
40
- * <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the
41
- * optional <code>DurationSeconds</code> parameter to specify the duration of your session.
42
- * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration
43
- * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how
44
- * 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
45
- * Maximum Session Duration Setting for a Role</a> in the
46
- * <i>IAM User Guide</i>. The maximum session duration limit applies when
47
- * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
48
- * commands. However the limit does not apply when you use those operations to create a
49
- * 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
50
- * <i>IAM User Guide</i>. </p>
51
- * <p>
52
- * <b>Permissions</b>
53
- * </p>
54
- * <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can
55
- * be used to make API calls to any Amazon Web Services service with the following exception: you cannot
56
- * call the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
57
- * operations.</p>
58
- * <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
59
- * this operation. You can pass a single JSON policy document to use as an inline session
60
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
61
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
62
- * characters. Passing policies to this operation returns new
63
- * temporary credentials. The resulting session's permissions are the intersection of the
64
- * role's identity-based policy and the session policies. You can use the role's temporary
65
- * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
66
- * the role. You cannot use session policies to grant more permissions than those allowed
67
- * by the identity-based policy of the role that is being assumed. For more information, see
68
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
69
- * Policies</a> in the <i>IAM User Guide</i>.</p>
70
- * <p>
71
- * <b>Tags</b>
72
- * </p>
73
- * <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
74
- * session tags. Each session tag consists of a key name and an associated value. For more
75
- * 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
76
- * <i>IAM User Guide</i>.</p>
77
- * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
78
- * characters and the values can’t exceed 256 characters. For these and additional limits, see
79
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
80
- * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
81
- *
82
- * <note>
83
- * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
84
- * packed binary format that has a separate limit. Your request can fail for this limit
85
- * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
86
- * response element indicates by percentage how close the policies and tags for your
87
- * request are to the upper size limit.
88
- * </p>
89
- * </note>
90
- * <p>You can pass a session tag with the same key as a tag that is
91
- * attached to the role. When you do, the session tag overrides the role tag with the same
92
- * key.</p>
93
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
94
- * administrator can also create granular permissions to allow you to pass only specific
95
- * 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
96
- * for Attribute-Based Access Control</a> in the
97
- * <i>IAM User Guide</i>.</p>
98
- * <p>You can set the session tags as transitive. Transitive tags persist during role
99
- * 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
100
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
101
- * <p>
102
- * <b>Identities</b>
103
- * </p>
104
- * <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have
105
- * an identity token from a supported identity provider and create a role that the application
106
- * can assume. The role that your application assumes must trust the identity provider that is
107
- * associated with the identity token. In other words, the identity provider must be specified
108
- * in the role's trust policy. </p>
109
- * <important>
110
- * <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your
111
- * CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of
112
- * the provided web identity token. We recommend that you avoid using any personally
113
- * identifiable information (PII) in this field. For example, you could instead use a GUID
114
- * or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested
115
- * in the OIDC specification</a>.</p>
116
- * </important>
117
- * <p>For more information about how to use web identity federation and the
118
- * <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p>
119
- * <ul>
120
- * <li>
121
- * <p>
122
- * <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>
123
- * </li>
124
- * <li>
125
- * <p>
126
- * <a href="https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/"> Web Identity Federation Playground</a>. Walk through the process of
127
- * authenticating through Login with Amazon, Facebook, or Google, getting temporary
128
- * security credentials, and then using those credentials to make a request to Amazon Web Services.
129
- * </p>
130
- * </li>
131
- * <li>
132
- * <p>
133
- * <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
134
- * contain sample apps that show how to invoke the identity providers. The toolkits then
135
- * show how to use the information from these providers to get and use temporary
136
- * security credentials. </p>
137
- * </li>
138
- * <li>
139
- * <p>
140
- * <a href="http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications">Web Identity
141
- * Federation with Mobile Applications</a>. This article discusses web identity
142
- * federation and shows an example of how to use web identity federation to get access
143
- * to content in Amazon S3. </p>
144
- * </li>
145
- * </ul>
146
- * @example
147
- * Use a bare-bones client and the command you need to make an API call.
148
- * ```javascript
149
- * import { STSClient, AssumeRoleWithWebIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import
150
- * // const { STSClient, AssumeRoleWithWebIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import
151
- * const client = new STSClient(config);
152
- * const command = new AssumeRoleWithWebIdentityCommand(input);
153
- * const response = await client.send(command);
154
- * ```
155
- *
156
- * @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape.
157
- * @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape.
158
- * @see {@link STSClientResolvedConfig | config} for command's `input` shape.
159
- *
160
- */
9
+
161
10
  export declare class AssumeRoleWithWebIdentityCommand extends $Command<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig> {
162
11
  readonly input: AssumeRoleWithWebIdentityCommandInput;
163
12
  constructor(input: AssumeRoleWithWebIdentityCommandInput);
164
- /**
165
- * @internal
166
- */
13
+
167
14
  resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput>;
168
15
  private serialize;
169
16
  private deserialize;