@aws-sdk/client-sts 3.31.0 → 3.35.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 (211) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/{dist/cjs → dist-cjs}/STS.js +1 -1
  3. package/dist-cjs/STS.js.map +1 -0
  4. package/{dist/cjs → dist-cjs}/STSClient.js +13 -13
  5. package/dist-cjs/STSClient.js.map +1 -0
  6. package/{dist/cjs → dist-cjs}/commands/AssumeRoleCommand.js +6 -6
  7. package/dist-cjs/commands/AssumeRoleCommand.js.map +1 -0
  8. package/{dist/cjs → dist-cjs}/commands/AssumeRoleWithSAMLCommand.js +5 -5
  9. package/dist-cjs/commands/AssumeRoleWithSAMLCommand.js.map +1 -0
  10. package/{dist/cjs → dist-cjs}/commands/AssumeRoleWithWebIdentityCommand.js +5 -5
  11. package/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js.map +1 -0
  12. package/{dist/cjs → dist-cjs}/commands/DecodeAuthorizationMessageCommand.js +6 -6
  13. package/dist-cjs/commands/DecodeAuthorizationMessageCommand.js.map +1 -0
  14. package/{dist/cjs → dist-cjs}/commands/GetAccessKeyInfoCommand.js +6 -6
  15. package/dist-cjs/commands/GetAccessKeyInfoCommand.js.map +1 -0
  16. package/{dist/cjs → dist-cjs}/commands/GetCallerIdentityCommand.js +6 -6
  17. package/dist-cjs/commands/GetCallerIdentityCommand.js.map +1 -0
  18. package/{dist/cjs → dist-cjs}/commands/GetFederationTokenCommand.js +6 -6
  19. package/dist-cjs/commands/GetFederationTokenCommand.js.map +1 -0
  20. package/{dist/cjs → dist-cjs}/commands/GetSessionTokenCommand.js +6 -6
  21. package/dist-cjs/commands/GetSessionTokenCommand.js.map +1 -0
  22. package/{dist/cjs → dist-cjs}/defaultRoleAssumers.js +4 -4
  23. package/dist-cjs/defaultRoleAssumers.js.map +1 -0
  24. package/{dist/cjs → dist-cjs}/defaultStsRoleAssumers.js +2 -2
  25. package/dist-cjs/defaultStsRoleAssumers.js.map +1 -0
  26. package/{dist/cjs → dist-cjs}/endpoints.js +1 -1
  27. package/dist-cjs/endpoints.js.map +1 -0
  28. package/dist-cjs/index.js +16 -0
  29. package/dist-cjs/index.js.map +1 -0
  30. package/{dist/cjs → dist-cjs}/models/index.js +1 -1
  31. package/{dist/cjs → dist-cjs}/models/index.js.map +1 -1
  32. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -0
  33. package/dist-cjs/models/models_0.js.map +1 -0
  34. package/{dist/cjs → dist-cjs}/protocols/Aws_query.js +62 -62
  35. package/dist-cjs/protocols/Aws_query.js.map +1 -0
  36. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +5 -4
  37. package/dist-cjs/runtimeConfig.browser.js.map +1 -0
  38. package/{dist/cjs → dist-cjs}/runtimeConfig.js +11 -10
  39. package/dist-cjs/runtimeConfig.js.map +1 -0
  40. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +1 -1
  41. package/dist-cjs/runtimeConfig.native.js.map +1 -0
  42. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -1
  43. package/dist-cjs/runtimeConfig.shared.js.map +1 -0
  44. package/{dist/es → dist-es}/STS.js +2 -9
  45. package/dist-es/STS.js.map +1 -0
  46. package/{dist/es → dist-es}/STSClient.js +2 -14
  47. package/dist-es/STSClient.js.map +1 -0
  48. package/dist-es/commands/AssumeRoleCommand.js +42 -0
  49. package/dist-es/commands/AssumeRoleCommand.js.map +1 -0
  50. package/dist-es/commands/AssumeRoleWithSAMLCommand.js +40 -0
  51. package/dist-es/commands/AssumeRoleWithSAMLCommand.js.map +1 -0
  52. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +40 -0
  53. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js.map +1 -0
  54. package/dist-es/commands/DecodeAuthorizationMessageCommand.js +42 -0
  55. package/dist-es/commands/DecodeAuthorizationMessageCommand.js.map +1 -0
  56. package/dist-es/commands/GetAccessKeyInfoCommand.js +42 -0
  57. package/dist-es/commands/GetAccessKeyInfoCommand.js.map +1 -0
  58. package/{dist/es → dist-es}/commands/GetCallerIdentityCommand.js +4 -38
  59. package/dist-es/commands/GetCallerIdentityCommand.js.map +1 -0
  60. package/dist-es/commands/GetFederationTokenCommand.js +42 -0
  61. package/dist-es/commands/GetFederationTokenCommand.js.map +1 -0
  62. package/dist-es/commands/GetSessionTokenCommand.js +42 -0
  63. package/dist-es/commands/GetSessionTokenCommand.js.map +1 -0
  64. package/dist-es/defaultRoleAssumers.js +17 -0
  65. package/dist-es/defaultRoleAssumers.js.map +1 -0
  66. package/{dist/es → dist-es}/defaultStsRoleAssumers.js +10 -31
  67. package/dist-es/defaultStsRoleAssumers.js.map +1 -0
  68. package/{dist/es → dist-es}/endpoints.js +1 -1
  69. package/dist-es/endpoints.js.map +1 -0
  70. package/{dist/es → dist-es}/index.js +0 -0
  71. package/dist-es/index.js.map +1 -0
  72. package/{dist/es → dist-es}/models/index.js +0 -0
  73. package/dist-es/models/index.js.map +1 -0
  74. package/{dist/es → dist-es}/models/models_0.js +0 -87
  75. package/dist-es/models/models_0.js.map +1 -0
  76. package/{dist/es → dist-es}/protocols/Aws_query.js +152 -154
  77. package/dist-es/protocols/Aws_query.js.map +1 -0
  78. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -4
  79. package/dist-es/runtimeConfig.browser.js.map +1 -0
  80. package/{dist/es → dist-es}/runtimeConfig.js +3 -6
  81. package/dist-es/runtimeConfig.js.map +1 -0
  82. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -3
  83. package/dist-es/runtimeConfig.native.js.map +1 -0
  84. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -4
  85. package/dist-es/runtimeConfig.shared.js.map +1 -0
  86. package/{dist/types → dist-types}/STS.d.ts +2 -2
  87. package/{dist/types → dist-types}/STSClient.d.ts +8 -8
  88. package/{dist/types → dist-types}/commands/AssumeRoleCommand.d.ts +3 -3
  89. package/{dist/types → dist-types}/commands/AssumeRoleWithSAMLCommand.d.ts +3 -3
  90. package/{dist/types → dist-types}/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -3
  91. package/{dist/types → dist-types}/commands/DecodeAuthorizationMessageCommand.d.ts +3 -3
  92. package/{dist/types → dist-types}/commands/GetAccessKeyInfoCommand.d.ts +3 -3
  93. package/{dist/types → dist-types}/commands/GetCallerIdentityCommand.d.ts +3 -3
  94. package/{dist/types → dist-types}/commands/GetFederationTokenCommand.d.ts +3 -3
  95. package/{dist/types → dist-types}/commands/GetSessionTokenCommand.d.ts +3 -3
  96. package/{dist/types → dist-types}/defaultRoleAssumers.d.ts +0 -0
  97. package/{dist/types → dist-types}/defaultStsRoleAssumers.d.ts +0 -0
  98. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  99. package/{dist/types → dist-types}/index.d.ts +0 -0
  100. package/{dist/types → dist-types}/models/index.d.ts +0 -0
  101. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  102. package/{dist/types → dist-types}/protocols/Aws_query.d.ts +2 -2
  103. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +1 -0
  104. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.d.ts +37 -36
  105. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.native.d.ts +36 -35
  106. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  107. package/{dist/types → dist-types}/ts3.4/STS.d.ts +2 -2
  108. package/{dist/types → dist-types}/ts3.4/STSClient.d.ts +8 -8
  109. package/{dist/types → dist-types}/ts3.4/commands/AssumeRoleCommand.d.ts +3 -3
  110. package/{dist/types → dist-types}/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +3 -3
  111. package/{dist/types → dist-types}/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -3
  112. package/{dist/types → dist-types}/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +3 -3
  113. package/{dist/types → dist-types}/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +3 -3
  114. package/{dist/types → dist-types}/ts3.4/commands/GetCallerIdentityCommand.d.ts +3 -3
  115. package/{dist/types → dist-types}/ts3.4/commands/GetFederationTokenCommand.d.ts +3 -3
  116. package/{dist/types → dist-types}/ts3.4/commands/GetSessionTokenCommand.d.ts +3 -3
  117. package/{dist/types → dist-types}/ts3.4/defaultRoleAssumers.d.ts +0 -0
  118. package/{dist/types → dist-types}/ts3.4/defaultStsRoleAssumers.d.ts +0 -0
  119. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  120. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  121. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  122. package/{dist/types → dist-types}/ts3.4/models/models_0.d.ts +0 -0
  123. package/{dist/types → dist-types}/ts3.4/protocols/Aws_query.d.ts +2 -2
  124. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -0
  125. package/{dist/types → dist-types/ts3.4}/runtimeConfig.d.ts +37 -36
  126. package/{dist/types → dist-types/ts3.4}/runtimeConfig.native.d.ts +36 -35
  127. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +0 -0
  128. package/package.json +50 -50
  129. package/{STS.ts → src/STS.ts} +3 -2
  130. package/{STSClient.ts → src/STSClient.ts} +30 -29
  131. package/{commands → src/commands}/AssumeRoleCommand.ts +5 -4
  132. package/{commands → src/commands}/AssumeRoleWithSAMLCommand.ts +8 -7
  133. package/{commands → src/commands}/AssumeRoleWithWebIdentityCommand.ts +8 -7
  134. package/{commands → src/commands}/DecodeAuthorizationMessageCommand.ts +8 -7
  135. package/{commands → src/commands}/GetAccessKeyInfoCommand.ts +8 -7
  136. package/{commands → src/commands}/GetCallerIdentityCommand.ts +8 -7
  137. package/{commands → src/commands}/GetFederationTokenCommand.ts +8 -7
  138. package/{commands → src/commands}/GetSessionTokenCommand.ts +8 -7
  139. package/{defaultRoleAssumers.ts → src/defaultRoleAssumers.ts} +0 -0
  140. package/{defaultStsRoleAssumers.ts → src/defaultStsRoleAssumers.ts} +0 -0
  141. package/{endpoints.ts → src/endpoints.ts} +1 -1
  142. package/{index.ts → src/index.ts} +0 -0
  143. package/{models → src/models}/index.ts +0 -0
  144. package/{models → src/models}/models_0.ts +0 -0
  145. package/{protocols → src/protocols}/Aws_query.ts +51 -50
  146. package/{runtimeConfig.browser.ts → src/runtimeConfig.browser.ts} +4 -3
  147. package/{runtimeConfig.native.ts → src/runtimeConfig.native.ts} +2 -1
  148. package/{runtimeConfig.shared.ts → src/runtimeConfig.shared.ts} +2 -1
  149. package/{runtimeConfig.ts → src/runtimeConfig.ts} +6 -5
  150. package/{defaultRoleAssumers.spec.ts → test/defaultRoleAssumers.spec.ts} +6 -5
  151. package/tsconfig.es.json +1 -3
  152. package/tsconfig.json +7 -7
  153. package/tsconfig.types.json +9 -0
  154. package/dist/cjs/STS.js.map +0 -1
  155. package/dist/cjs/STSClient.js.map +0 -1
  156. package/dist/cjs/commands/AssumeRoleCommand.js.map +0 -1
  157. package/dist/cjs/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
  158. package/dist/cjs/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
  159. package/dist/cjs/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
  160. package/dist/cjs/commands/GetAccessKeyInfoCommand.js.map +0 -1
  161. package/dist/cjs/commands/GetCallerIdentityCommand.js.map +0 -1
  162. package/dist/cjs/commands/GetFederationTokenCommand.js.map +0 -1
  163. package/dist/cjs/commands/GetSessionTokenCommand.js.map +0 -1
  164. package/dist/cjs/defaultRoleAssumers.js.map +0 -1
  165. package/dist/cjs/defaultRoleAssumers.spec.js +0 -135
  166. package/dist/cjs/defaultRoleAssumers.spec.js.map +0 -1
  167. package/dist/cjs/defaultStsRoleAssumers.js.map +0 -1
  168. package/dist/cjs/endpoints.js.map +0 -1
  169. package/dist/cjs/index.js +0 -16
  170. package/dist/cjs/index.js.map +0 -1
  171. package/dist/cjs/models/models_0.js.map +0 -1
  172. package/dist/cjs/package.json +0 -93
  173. package/dist/cjs/protocols/Aws_query.js.map +0 -1
  174. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  175. package/dist/cjs/runtimeConfig.js.map +0 -1
  176. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  177. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  178. package/dist/es/STS.js.map +0 -1
  179. package/dist/es/STSClient.js.map +0 -1
  180. package/dist/es/commands/AssumeRoleCommand.js +0 -150
  181. package/dist/es/commands/AssumeRoleCommand.js.map +0 -1
  182. package/dist/es/commands/AssumeRoleWithSAMLCommand.js +0 -196
  183. package/dist/es/commands/AssumeRoleWithSAMLCommand.js.map +0 -1
  184. package/dist/es/commands/AssumeRoleWithWebIdentityCommand.js +0 -200
  185. package/dist/es/commands/AssumeRoleWithWebIdentityCommand.js.map +0 -1
  186. package/dist/es/commands/DecodeAuthorizationMessageCommand.js +0 -102
  187. package/dist/es/commands/DecodeAuthorizationMessageCommand.js.map +0 -1
  188. package/dist/es/commands/GetAccessKeyInfoCommand.js +0 -84
  189. package/dist/es/commands/GetAccessKeyInfoCommand.js.map +0 -1
  190. package/dist/es/commands/GetCallerIdentityCommand.js.map +0 -1
  191. package/dist/es/commands/GetFederationTokenCommand.js +0 -205
  192. package/dist/es/commands/GetFederationTokenCommand.js.map +0 -1
  193. package/dist/es/commands/GetSessionTokenCommand.js +0 -118
  194. package/dist/es/commands/GetSessionTokenCommand.js.map +0 -1
  195. package/dist/es/defaultRoleAssumers.js +0 -33
  196. package/dist/es/defaultRoleAssumers.js.map +0 -1
  197. package/dist/es/defaultRoleAssumers.spec.js +0 -142
  198. package/dist/es/defaultRoleAssumers.spec.js.map +0 -1
  199. package/dist/es/defaultStsRoleAssumers.js.map +0 -1
  200. package/dist/es/endpoints.js.map +0 -1
  201. package/dist/es/index.js.map +0 -1
  202. package/dist/es/models/index.js.map +0 -1
  203. package/dist/es/models/models_0.js.map +0 -1
  204. package/dist/es/package.json +0 -93
  205. package/dist/es/protocols/Aws_query.js.map +0 -1
  206. package/dist/es/runtimeConfig.browser.js.map +0 -1
  207. package/dist/es/runtimeConfig.js.map +0 -1
  208. package/dist/es/runtimeConfig.native.js.map +0 -1
  209. package/dist/es/runtimeConfig.shared.js.map +0 -1
  210. package/dist/types/defaultRoleAssumers.spec.d.ts +0 -1
  211. package/dist/types/ts3.4/defaultRoleAssumers.spec.d.ts +0 -1
@@ -1,150 +0,0 @@
1
- import { __extends } from "tslib";
2
- import { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0";
3
- import { deserializeAws_queryAssumeRoleCommand, serializeAws_queryAssumeRoleCommand } from "../protocols/Aws_query";
4
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
- import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
6
- import { Command as $Command } from "@aws-sdk/smithy-client";
7
- /**
8
- * <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
9
- * resources that you might not normally have access to. These temporary credentials
10
- * consist of an access key ID, a secret access key, and a security token. Typically, you
11
- * use <code>AssumeRole</code> within your account or for cross-account access. For a
12
- * comparison of <code>AssumeRole</code> with other API operations that produce temporary
13
- * 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
15
- * the STS API operations</a> in the
16
- * <i>IAM User Guide</i>.</p>
17
- * <p>
18
- * <b>Permissions</b>
19
- * </p>
20
- * <p>The temporary security credentials created by <code>AssumeRole</code> can be used to
21
- * make API calls to any Amazon Web Services service with the following exception: You cannot call the
22
- * STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
23
- * operations.</p>
24
- * <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
25
- * this operation. You can pass a single JSON policy document to use as an inline session
26
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
27
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
28
- * characters. Passing policies to this operation returns new
29
- * temporary credentials. The resulting session's permissions are the intersection of the
30
- * role's identity-based policy and the session policies. You can use the role's temporary
31
- * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
32
- * the role. You cannot use session policies to grant more permissions than those allowed
33
- * by the identity-based policy of the role that is being assumed. For more information, see
34
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
35
- * Policies</a> in the <i>IAM User Guide</i>.</p>
36
- * <p>To assume a role from a different account, your account must be trusted by the
37
- * role. The trust relationship is defined in the role's trust policy when the role is
38
- * created. That trust policy states which accounts are allowed to delegate that access to
39
- * users in the account. </p>
40
- * <p>A user who wants to access a role in a different account must also have permissions that
41
- * are delegated from the user account administrator. The administrator must attach a policy
42
- * that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other
43
- * account. If the user is in the same account as the role, then you can do either of the
44
- * following:</p>
45
- * <ul>
46
- * <li>
47
- * <p>Attach a policy to the user (identical to the previous user in a different
48
- * account).</p>
49
- * </li>
50
- * <li>
51
- * <p>Add the user as a principal directly in the role's trust policy.</p>
52
- * </li>
53
- * </ul>
54
- * <p>In this case, the trust policy acts as an IAM resource-based policy. Users in the same
55
- * account as the role do not need explicit permission to assume the role. For more
56
- * 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
57
- * the <i>IAM User Guide</i>.</p>
58
- * <p>
59
- * <b>Tags</b>
60
- * </p>
61
- * <p>(Optional) You can pass tag key-value pairs to your session. These tags are called
62
- * 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
63
- * <i>IAM User Guide</i>.</p>
64
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
65
- * administrator can also create granular permissions to allow you to pass only specific
66
- * 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
67
- * for Attribute-Based Access Control</a> in the
68
- * <i>IAM User Guide</i>.</p>
69
- * <p>You can set the session tags as transitive. Transitive tags persist during role
70
- * 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
71
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
72
- * <p>
73
- * <b>Using MFA with AssumeRole</b>
74
- * </p>
75
- * <p>(Optional) You can include multi-factor authentication (MFA) information when you call
76
- * <code>AssumeRole</code>. This is useful for cross-account scenarios to ensure that the
77
- * user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that
78
- * scenario, the trust policy of the role being assumed includes a condition that tests for
79
- * MFA authentication. If the caller does not include valid MFA information, the request to
80
- * assume the role is denied. The condition in a trust policy that tests for MFA
81
- * authentication might look like the following example.</p>
82
- * <p>
83
- * <code>"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}</code>
84
- * </p>
85
- * <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html">Configuring MFA-Protected API Access</a>
86
- * in the <i>IAM User Guide</i> guide.</p>
87
- * <p>To use MFA with <code>AssumeRole</code>, you pass values for the
88
- * <code>SerialNumber</code> and <code>TokenCode</code> parameters. The
89
- * <code>SerialNumber</code> value identifies the user's hardware or virtual MFA device.
90
- * The <code>TokenCode</code> is the time-based one-time password (TOTP) that the MFA device
91
- * produces. </p>
92
- * @example
93
- * Use a bare-bones client and the command you need to make an API call.
94
- * ```javascript
95
- * import { STSClient, AssumeRoleCommand } from "@aws-sdk/client-sts"; // ES Modules import
96
- * // const { STSClient, AssumeRoleCommand } = require("@aws-sdk/client-sts"); // CommonJS import
97
- * const client = new STSClient(config);
98
- * const command = new AssumeRoleCommand(input);
99
- * const response = await client.send(command);
100
- * ```
101
- *
102
- * @see {@link AssumeRoleCommandInput} for command's `input` shape.
103
- * @see {@link AssumeRoleCommandOutput} for command's `response` shape.
104
- * @see {@link STSClientResolvedConfig | config} for command's `input` shape.
105
- *
106
- */
107
- var AssumeRoleCommand = /** @class */ (function (_super) {
108
- __extends(AssumeRoleCommand, _super);
109
- // Start section: command_properties
110
- // End section: command_properties
111
- function AssumeRoleCommand(input) {
112
- var _this =
113
- // Start section: command_constructor
114
- _super.call(this) || this;
115
- _this.input = input;
116
- return _this;
117
- // End section: command_constructor
118
- }
119
- /**
120
- * @internal
121
- */
122
- AssumeRoleCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
123
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
124
- this.middlewareStack.use(getAwsAuthPlugin(configuration));
125
- var stack = clientStack.concat(this.middlewareStack);
126
- var logger = configuration.logger;
127
- var clientName = "STSClient";
128
- var commandName = "AssumeRoleCommand";
129
- var handlerExecutionContext = {
130
- logger: logger,
131
- clientName: clientName,
132
- commandName: commandName,
133
- inputFilterSensitiveLog: AssumeRoleRequest.filterSensitiveLog,
134
- outputFilterSensitiveLog: AssumeRoleResponse.filterSensitiveLog,
135
- };
136
- var requestHandler = configuration.requestHandler;
137
- return stack.resolve(function (request) {
138
- return requestHandler.handle(request.request, options || {});
139
- }, handlerExecutionContext);
140
- };
141
- AssumeRoleCommand.prototype.serialize = function (input, context) {
142
- return serializeAws_queryAssumeRoleCommand(input, context);
143
- };
144
- AssumeRoleCommand.prototype.deserialize = function (output, context) {
145
- return deserializeAws_queryAssumeRoleCommand(output, context);
146
- };
147
- return AssumeRoleCommand;
148
- }($Command));
149
- export { AssumeRoleCommand };
150
- //# sourceMappingURL=AssumeRoleCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssumeRoleCommand.js","sourceRoot":"","sources":["../../../commands/AssumeRoleCommand.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,qCAAqC,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AACpH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAc7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmGG;AACH;IAAuC,qCAItC;IACC,oCAAoC;IACpC,kCAAkC;IAElC,2BAAqB,KAA6B;QAAlD;QACE,qCAAqC;QACrC,iBAAO,SAER;QAJoB,WAAK,GAAL,KAAK,CAAwB;;QAGhD,mCAAmC;IACrC,CAAC;IAED;;OAEG;IACH,6CAAiB,GAAjB,UACE,WAAmE,EACnE,aAAsC,EACtC,OAA8B;QAE9B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1F,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC;QAE1D,IAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAE/C,IAAA,MAAM,GAAK,aAAa,OAAlB,CAAmB;QACjC,IAAM,UAAU,GAAG,WAAW,CAAC;QAC/B,IAAM,WAAW,GAAG,mBAAmB,CAAC;QACxC,IAAM,uBAAuB,GAA4B;YACvD,MAAM,QAAA;YACN,UAAU,YAAA;YACV,WAAW,aAAA;YACX,uBAAuB,EAAE,iBAAiB,CAAC,kBAAkB;YAC7D,wBAAwB,EAAE,kBAAkB,CAAC,kBAAkB;SAChE,CAAC;QACM,IAAA,cAAc,GAAK,aAAa,eAAlB,CAAmB;QACzC,OAAO,KAAK,CAAC,OAAO,CAClB,UAAC,OAAsC;YACrC,OAAA,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAwB,EAAE,OAAO,IAAI,EAAE,CAAC;QAAtE,CAAsE,EACxE,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAEO,qCAAS,GAAjB,UAAkB,KAA6B,EAAE,OAAuB;QACtE,OAAO,mCAAmC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAEO,uCAAW,GAAnB,UAAoB,MAAsB,EAAE,OAAuB;QACjE,OAAO,qCAAqC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAIH,wBAAC;AAAD,CAAC,AAvDD,CAAuC,QAAQ,GAuD9C"}
@@ -1,196 +0,0 @@
1
- import { __extends } from "tslib";
2
- import { AssumeRoleWithSAMLRequest, AssumeRoleWithSAMLResponse } from "../models/models_0";
3
- import { deserializeAws_queryAssumeRoleWithSAMLCommand, serializeAws_queryAssumeRoleWithSAMLCommand, } from "../protocols/Aws_query";
4
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
- import { Command as $Command } from "@aws-sdk/smithy-client";
6
- /**
7
- * <p>Returns a set of temporary security credentials for users who have been authenticated
8
- * via a SAML authentication response. This operation provides a mechanism for tying an
9
- * enterprise identity store or directory to role-based Amazon Web Services access without user-specific
10
- * credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the
11
- * 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
12
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
13
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
14
- * <p>The temporary security credentials returned by this operation consist of an access key
15
- * ID, a secret access key, and a security token. Applications can use these temporary
16
- * security credentials to sign calls to Amazon Web Services services.</p>
17
- * <p>
18
- * <b>Session Duration</b>
19
- * </p>
20
- * <p>By default, the temporary security credentials created by
21
- * <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional
22
- * <code>DurationSeconds</code> parameter to specify the duration of your session. Your
23
- * role session lasts for the duration that you specify, or until the time specified in the
24
- * SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is
25
- * shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes)
26
- * up to the maximum session duration setting for the role. This setting can have a value from
27
- * 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
28
- * Maximum Session Duration Setting for a Role</a> in the
29
- * <i>IAM User Guide</i>. The maximum session duration limit applies when
30
- * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
31
- * commands. However the limit does not apply when you use those operations to create a
32
- * 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
33
- * <i>IAM User Guide</i>.</p>
34
- * <note>
35
- * <p>
36
- * <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
37
- * role session to a maximum of one hour. When you use the <code>AssumeRole</code> API
38
- * operation to assume a role, you can specify the duration of your role session with
39
- * the <code>DurationSeconds</code> parameter. You can specify a parameter value of up
40
- * to 43200 seconds (12 hours), depending on the maximum session duration setting for
41
- * your role. However, if you assume a role using role chaining and provide a
42
- * <code>DurationSeconds</code> parameter value greater than one hour, the
43
- * operation fails.</p>
44
- * </note>
45
- * <p>
46
- * <b>Permissions</b>
47
- * </p>
48
- * <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be
49
- * used to make API calls to any Amazon Web Services service with the following exception: you cannot call
50
- * the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API
51
- * operations.</p>
52
- * <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
53
- * this operation. You can pass a single JSON policy document to use as an inline session
54
- * policy. You can also specify up to 10 managed policies to use as managed session policies.
55
- * The plaintext that you use for both inline and managed session policies can't exceed 2,048
56
- * characters. Passing policies to this operation returns new
57
- * temporary credentials. The resulting session's permissions are the intersection of the
58
- * role's identity-based policy and the session policies. You can use the role's temporary
59
- * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns
60
- * the role. You cannot use session policies to grant more permissions than those allowed
61
- * by the identity-based policy of the role that is being assumed. For more information, see
62
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session
63
- * Policies</a> in the <i>IAM User Guide</i>.</p>
64
- * <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security
65
- * credentials. The identity of the caller is validated by using keys in the metadata document
66
- * that is uploaded for the SAML provider entity for your identity provider. </p>
67
- * <important>
68
- * <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs.
69
- * The entry includes the value in the <code>NameID</code> element of the SAML assertion.
70
- * We recommend that you use a <code>NameIDType</code> that is not associated with any
71
- * personally identifiable information (PII). For example, you could instead use the
72
- * persistent identifier
73
- * (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p>
74
- * </important>
75
- * <p>
76
- * <b>Tags</b>
77
- * </p>
78
- * <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as
79
- * session tags. Each session tag consists of a key name and an associated value. For more
80
- * 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
81
- * <i>IAM User Guide</i>.</p>
82
- * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
83
- * characters and the values can’t exceed 256 characters. For these and additional limits, see
84
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
85
- * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
86
- *
87
- * <note>
88
- * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
89
- * packed binary format that has a separate limit. Your request can fail for this limit
90
- * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
91
- * response element indicates by percentage how close the policies and tags for your
92
- * request are to the upper size limit.
93
- * </p>
94
- * </note>
95
- * <p>You can pass a session tag with the same key as a tag that is
96
- * attached to the role. When you do, session tags override the role's tags with the same
97
- * key.</p>
98
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
99
- * administrator can also create granular permissions to allow you to pass only specific
100
- * 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
101
- * for Attribute-Based Access Control</a> in the
102
- * <i>IAM User Guide</i>.</p>
103
- * <p>You can set the session tags as transitive. Transitive tags persist during role
104
- * 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
105
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
106
- * <p>
107
- * <b>SAML Configuration</b>
108
- * </p>
109
- * <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure
110
- * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you
111
- * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that
112
- * represents your identity provider. You must also create an IAM role that specifies this
113
- * SAML provider in its trust policy. </p>
114
- * <p>For more information, see the following resources:</p>
115
- * <ul>
116
- * <li>
117
- * <p>
118
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html">About
119
- * SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
120
- * </p>
121
- * </li>
122
- * <li>
123
- * <p>
124
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the
125
- * <i>IAM User Guide</i>. </p>
126
- * </li>
127
- * <li>
128
- * <p>
129
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring
130
- * a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
131
- * </p>
132
- * </li>
133
- * <li>
134
- * <p>
135
- * <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
136
- * <i>IAM User Guide</i>. </p>
137
- * </li>
138
- * </ul>
139
- * @example
140
- * Use a bare-bones client and the command you need to make an API call.
141
- * ```javascript
142
- * import { STSClient, AssumeRoleWithSAMLCommand } from "@aws-sdk/client-sts"; // ES Modules import
143
- * // const { STSClient, AssumeRoleWithSAMLCommand } = require("@aws-sdk/client-sts"); // CommonJS import
144
- * const client = new STSClient(config);
145
- * const command = new AssumeRoleWithSAMLCommand(input);
146
- * const response = await client.send(command);
147
- * ```
148
- *
149
- * @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape.
150
- * @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape.
151
- * @see {@link STSClientResolvedConfig | config} for command's `input` shape.
152
- *
153
- */
154
- var AssumeRoleWithSAMLCommand = /** @class */ (function (_super) {
155
- __extends(AssumeRoleWithSAMLCommand, _super);
156
- // Start section: command_properties
157
- // End section: command_properties
158
- function AssumeRoleWithSAMLCommand(input) {
159
- var _this =
160
- // Start section: command_constructor
161
- _super.call(this) || this;
162
- _this.input = input;
163
- return _this;
164
- // End section: command_constructor
165
- }
166
- /**
167
- * @internal
168
- */
169
- AssumeRoleWithSAMLCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
170
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
171
- var stack = clientStack.concat(this.middlewareStack);
172
- var logger = configuration.logger;
173
- var clientName = "STSClient";
174
- var commandName = "AssumeRoleWithSAMLCommand";
175
- var handlerExecutionContext = {
176
- logger: logger,
177
- clientName: clientName,
178
- commandName: commandName,
179
- inputFilterSensitiveLog: AssumeRoleWithSAMLRequest.filterSensitiveLog,
180
- outputFilterSensitiveLog: AssumeRoleWithSAMLResponse.filterSensitiveLog,
181
- };
182
- var requestHandler = configuration.requestHandler;
183
- return stack.resolve(function (request) {
184
- return requestHandler.handle(request.request, options || {});
185
- }, handlerExecutionContext);
186
- };
187
- AssumeRoleWithSAMLCommand.prototype.serialize = function (input, context) {
188
- return serializeAws_queryAssumeRoleWithSAMLCommand(input, context);
189
- };
190
- AssumeRoleWithSAMLCommand.prototype.deserialize = function (output, context) {
191
- return deserializeAws_queryAssumeRoleWithSAMLCommand(output, context);
192
- };
193
- return AssumeRoleWithSAMLCommand;
194
- }($Command));
195
- export { AssumeRoleWithSAMLCommand };
196
- //# sourceMappingURL=AssumeRoleWithSAMLCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssumeRoleWithSAMLCommand.js","sourceRoot":"","sources":["../../../commands/AssumeRoleWithSAMLCommand.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EACL,6CAA6C,EAC7C,2CAA2C,GAC5C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAc7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmJG;AACH;IAA+C,6CAI9C;IACC,oCAAoC;IACpC,kCAAkC;IAElC,mCAAqB,KAAqC;QAA1D;QACE,qCAAqC;QACrC,iBAAO,SAER;QAJoB,WAAK,GAAL,KAAK,CAAgC;;QAGxD,mCAAmC;IACrC,CAAC;IAED;;OAEG;IACH,qDAAiB,GAAjB,UACE,WAAmE,EACnE,aAAsC,EACtC,OAA8B;QAE9B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE1F,IAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAE/C,IAAA,MAAM,GAAK,aAAa,OAAlB,CAAmB;QACjC,IAAM,UAAU,GAAG,WAAW,CAAC;QAC/B,IAAM,WAAW,GAAG,2BAA2B,CAAC;QAChD,IAAM,uBAAuB,GAA4B;YACvD,MAAM,QAAA;YACN,UAAU,YAAA;YACV,WAAW,aAAA;YACX,uBAAuB,EAAE,yBAAyB,CAAC,kBAAkB;YACrE,wBAAwB,EAAE,0BAA0B,CAAC,kBAAkB;SACxE,CAAC;QACM,IAAA,cAAc,GAAK,aAAa,eAAlB,CAAmB;QACzC,OAAO,KAAK,CAAC,OAAO,CAClB,UAAC,OAAsC;YACrC,OAAA,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAwB,EAAE,OAAO,IAAI,EAAE,CAAC;QAAtE,CAAsE,EACxE,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAEO,6CAAS,GAAjB,UAAkB,KAAqC,EAAE,OAAuB;QAC9E,OAAO,2CAA2C,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAEO,+CAAW,GAAnB,UAAoB,MAAsB,EAAE,OAAuB;QACjE,OAAO,6CAA6C,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAIH,gCAAC;AAAD,CAAC,AAtDD,CAA+C,QAAQ,GAsDtD"}
@@ -1,200 +0,0 @@
1
- import { __extends } from "tslib";
2
- import { AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse } from "../models/models_0";
3
- import { deserializeAws_queryAssumeRoleWithWebIdentityCommand, serializeAws_queryAssumeRoleWithWebIdentityCommand, } from "../protocols/Aws_query";
4
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
- import { Command as $Command } from "@aws-sdk/smithy-client";
6
- /**
7
- * <p>Returns a set of temporary security credentials for users who have been authenticated in
8
- * a mobile or web application with a web identity provider. Example providers include Amazon Cognito,
9
- * Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity
10
- * provider.</p>
11
- * <note>
12
- * <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the
13
- * <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
14
- * identify a user. You can also supply the user with a consistent identity throughout the
15
- * lifetime of an application.</p>
16
- * <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
17
- * <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
18
- * <i>Amazon Web Services SDK for iOS Developer Guide</i>.</p>
19
- * </note>
20
- * <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services
21
- * security credentials. Therefore, you can distribute an application (for example, on mobile
22
- * devices) that requests temporary security credentials without including long-term Amazon Web Services
23
- * credentials in the application. You also don't need to deploy server-based proxy services
24
- * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by
25
- * using a token from the web identity provider. For a comparison of
26
- * <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce
27
- * temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security
28
- * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the
29
- * STS API operations</a> in the <i>IAM User Guide</i>.</p>
30
- * <p>The temporary security credentials returned by this API consist of an access key ID, a
31
- * secret access key, and a security token. Applications can use these temporary security
32
- * credentials to sign calls to Amazon Web Services service API operations.</p>
33
- * <p>
34
- * <b>Session Duration</b>
35
- * </p>
36
- * <p>By default, the temporary security credentials created by
37
- * <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the
38
- * optional <code>DurationSeconds</code> parameter to specify the duration of your session.
39
- * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration
40
- * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how
41
- * 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
42
- * Maximum Session Duration Setting for a Role</a> in the
43
- * <i>IAM User Guide</i>. The maximum session duration limit applies when
44
- * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI
45
- * commands. However the limit does not apply when you use those operations to create a
46
- * 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
47
- * <i>IAM User Guide</i>. </p>
48
- * <p>
49
- * <b>Permissions</b>
50
- * </p>
51
- * <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can
52
- * be used to make API calls to any Amazon Web Services service with the following exception: you cannot
53
- * call 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>
68
- * <b>Tags</b>
69
- * </p>
70
- * <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
71
- * session tags. Each session tag consists of a key name and an associated value. For more
72
- * 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
73
- * <i>IAM User Guide</i>.</p>
74
- * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
75
- * characters and the values can’t exceed 256 characters. For these and additional limits, see
76
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM
77
- * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p>
78
- *
79
- * <note>
80
- * <p>An Amazon Web Services conversion compresses the passed session policies and session tags into a
81
- * packed binary format that has a separate limit. Your request can fail for this limit
82
- * even if your plaintext meets the other requirements. The <code>PackedPolicySize</code>
83
- * response element indicates by percentage how close the policies and tags for your
84
- * request are to the upper size limit.
85
- * </p>
86
- * </note>
87
- * <p>You can pass a session tag with the same key as a tag that is
88
- * attached to the role. When you do, the session tag overrides the role tag with the same
89
- * key.</p>
90
- * <p>An administrator must grant you the permissions necessary to pass session tags. The
91
- * administrator can also create granular permissions to allow you to pass only specific
92
- * 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
93
- * for Attribute-Based Access Control</a> in the
94
- * <i>IAM User Guide</i>.</p>
95
- * <p>You can set the session tags as transitive. Transitive tags persist during role
96
- * 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
97
- * with Session Tags</a> in the <i>IAM User Guide</i>.</p>
98
- * <p>
99
- * <b>Identities</b>
100
- * </p>
101
- * <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have
102
- * an identity token from a supported identity provider and create a role that the application
103
- * can assume. The role that your application assumes must trust the identity provider that is
104
- * associated with the identity token. In other words, the identity provider must be specified
105
- * in the role's trust policy. </p>
106
- * <important>
107
- * <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your
108
- * CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of
109
- * the provided web identity token. We recommend that you avoid using any personally
110
- * identifiable information (PII) in this field. For example, you could instead use a GUID
111
- * or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested
112
- * in the OIDC specification</a>.</p>
113
- * </important>
114
- * <p>For more information about how to use web identity federation and the
115
- * <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p>
116
- * <ul>
117
- * <li>
118
- * <p>
119
- * <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>
120
- * </li>
121
- * <li>
122
- * <p>
123
- * <a href="https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/"> Web Identity Federation Playground</a>. Walk through the process of
124
- * authenticating through Login with Amazon, Facebook, or Google, getting temporary
125
- * security credentials, and then using those credentials to make a request to Amazon Web Services.
126
- * </p>
127
- * </li>
128
- * <li>
129
- * <p>
130
- * <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
131
- * contain sample apps that show how to invoke the identity providers. The toolkits then
132
- * show how to use the information from these providers to get and use temporary
133
- * security credentials. </p>
134
- * </li>
135
- * <li>
136
- * <p>
137
- * <a href="http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications">Web Identity
138
- * Federation with Mobile Applications</a>. This article discusses web identity
139
- * federation and shows an example of how to use web identity federation to get access
140
- * to content in Amazon S3. </p>
141
- * </li>
142
- * </ul>
143
- * @example
144
- * Use a bare-bones client and the command you need to make an API call.
145
- * ```javascript
146
- * import { STSClient, AssumeRoleWithWebIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import
147
- * // const { STSClient, AssumeRoleWithWebIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import
148
- * const client = new STSClient(config);
149
- * const command = new AssumeRoleWithWebIdentityCommand(input);
150
- * const response = await client.send(command);
151
- * ```
152
- *
153
- * @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape.
154
- * @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape.
155
- * @see {@link STSClientResolvedConfig | config} for command's `input` shape.
156
- *
157
- */
158
- var AssumeRoleWithWebIdentityCommand = /** @class */ (function (_super) {
159
- __extends(AssumeRoleWithWebIdentityCommand, _super);
160
- // Start section: command_properties
161
- // End section: command_properties
162
- function AssumeRoleWithWebIdentityCommand(input) {
163
- var _this =
164
- // Start section: command_constructor
165
- _super.call(this) || this;
166
- _this.input = input;
167
- return _this;
168
- // End section: command_constructor
169
- }
170
- /**
171
- * @internal
172
- */
173
- AssumeRoleWithWebIdentityCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
174
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
175
- var stack = clientStack.concat(this.middlewareStack);
176
- var logger = configuration.logger;
177
- var clientName = "STSClient";
178
- var commandName = "AssumeRoleWithWebIdentityCommand";
179
- var handlerExecutionContext = {
180
- logger: logger,
181
- clientName: clientName,
182
- commandName: commandName,
183
- inputFilterSensitiveLog: AssumeRoleWithWebIdentityRequest.filterSensitiveLog,
184
- outputFilterSensitiveLog: AssumeRoleWithWebIdentityResponse.filterSensitiveLog,
185
- };
186
- var requestHandler = configuration.requestHandler;
187
- return stack.resolve(function (request) {
188
- return requestHandler.handle(request.request, options || {});
189
- }, handlerExecutionContext);
190
- };
191
- AssumeRoleWithWebIdentityCommand.prototype.serialize = function (input, context) {
192
- return serializeAws_queryAssumeRoleWithWebIdentityCommand(input, context);
193
- };
194
- AssumeRoleWithWebIdentityCommand.prototype.deserialize = function (output, context) {
195
- return deserializeAws_queryAssumeRoleWithWebIdentityCommand(output, context);
196
- };
197
- return AssumeRoleWithWebIdentityCommand;
198
- }($Command));
199
- export { AssumeRoleWithWebIdentityCommand };
200
- //# sourceMappingURL=AssumeRoleWithWebIdentityCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssumeRoleWithWebIdentityCommand.js","sourceRoot":"","sources":["../../../commands/AssumeRoleWithWebIdentityCommand.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,gCAAgC,EAAE,iCAAiC,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,EACL,oDAAoD,EACpD,kDAAkD,GACnD,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAc7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuJG;AACH;IAAsD,oDAIrD;IACC,oCAAoC;IACpC,kCAAkC;IAElC,0CAAqB,KAA4C;QAAjE;QACE,qCAAqC;QACrC,iBAAO,SAER;QAJoB,WAAK,GAAL,KAAK,CAAuC;;QAG/D,mCAAmC;IACrC,CAAC;IAED;;OAEG;IACH,4DAAiB,GAAjB,UACE,WAAmE,EACnE,aAAsC,EACtC,OAA8B;QAE9B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE1F,IAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAE/C,IAAA,MAAM,GAAK,aAAa,OAAlB,CAAmB;QACjC,IAAM,UAAU,GAAG,WAAW,CAAC;QAC/B,IAAM,WAAW,GAAG,kCAAkC,CAAC;QACvD,IAAM,uBAAuB,GAA4B;YACvD,MAAM,QAAA;YACN,UAAU,YAAA;YACV,WAAW,aAAA;YACX,uBAAuB,EAAE,gCAAgC,CAAC,kBAAkB;YAC5E,wBAAwB,EAAE,iCAAiC,CAAC,kBAAkB;SAC/E,CAAC;QACM,IAAA,cAAc,GAAK,aAAa,eAAlB,CAAmB;QACzC,OAAO,KAAK,CAAC,OAAO,CAClB,UAAC,OAAsC;YACrC,OAAA,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAwB,EAAE,OAAO,IAAI,EAAE,CAAC;QAAtE,CAAsE,EACxE,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAEO,oDAAS,GAAjB,UAAkB,KAA4C,EAAE,OAAuB;QACrF,OAAO,kDAAkD,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAEO,sDAAW,GAAnB,UACE,MAAsB,EACtB,OAAuB;QAEvB,OAAO,oDAAoD,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAIH,uCAAC;AAAD,CAAC,AAzDD,CAAsD,QAAQ,GAyD7D"}