From b01ad93f0fc59349c159a355196835493f7787e1 Mon Sep 17 00:00:00 2001
From: awstools
A user who wants to access a role in a different account must also have permissions that
- * are delegated from the account administrator. The administrator must attach a policy
- * that allows the user to call AssumeRole
for the ARN of the role in the other
+ * are delegated from the account administrator. The administrator must attach a policy that
+ * allows the user to call AssumeRole
for the ARN of the role in the other
* account.
To allow a user to assume a role in the same account, you can do either of the * following:
@@ -154,6 +154,12 @@ export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataB * SerialNumber: "STRING_VALUE", * TokenCode: "STRING_VALUE", * SourceIdentity: "STRING_VALUE", + * ProvidedContexts: [ // ProvidedContextsListType + * { // ProvidedContext + * ProviderArn: "STRING_VALUE", + * ContextAssertion: "STRING_VALUE", + * }, + * ], * }; * const command = new AssumeRoleCommand(input); * const response = await client.send(command); diff --git a/clients/client-sts/src/commands/AssumeRoleWithWebIdentityCommand.ts b/clients/client-sts/src/commands/AssumeRoleWithWebIdentityCommand.ts index ace47bce86af..7b8fa672c569 100644 --- a/clients/client-sts/src/commands/AssumeRoleWithWebIdentityCommand.ts +++ b/clients/client-sts/src/commands/AssumeRoleWithWebIdentityCommand.ts @@ -50,8 +50,8 @@ export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWe * Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely * identify a user. You can also supply the user with a consistent identity throughout the * lifetime of an application. - *To learn more about Amazon Cognito, see Amazon Cognito identity pools in - * Amazon Cognito Developer Guide.
+ *To learn more about Amazon Cognito, see Amazon Cognito identity + * pools in Amazon Cognito Developer Guide.
* *Calling AssumeRoleWithWebIdentity
does not require the use of Amazon Web Services
* security credentials. Therefore, you can distribute an application (for example, on mobile
diff --git a/clients/client-sts/src/commands/GetAccessKeyInfoCommand.ts b/clients/client-sts/src/commands/GetAccessKeyInfoCommand.ts
index 11ad3068b865..14976b28ec6c 100644
--- a/clients/client-sts/src/commands/GetAccessKeyInfoCommand.ts
+++ b/clients/client-sts/src/commands/GetAccessKeyInfoCommand.ts
@@ -45,13 +45,12 @@ export interface GetAccessKeyInfoCommandOutput extends GetAccessKeyInfoResponse,
* Users in the IAM User Guide.
When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account
* to which the keys belong. Access key IDs beginning with AKIA
are long-term
- * credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with
- * ASIA
are temporary credentials that are created using STS operations. If
- * the account in the response belongs to you, you can sign in as the root user and review
- * your root user access keys. Then, you can pull a credentials report to
- * learn which IAM user owns the keys. To learn who requested the temporary credentials for
- * an ASIA
access key, view the STS events in your CloudTrail logs in the
- * IAM User Guide.
ASIA
are temporary credentials that are created using STS
+ * operations. If the account in the response belongs to you, you can sign in as the root user and review your root user access keys. Then, you can pull a credentials
+ * report to learn which IAM user owns the keys. To learn who
+ * requested the temporary credentials for an ASIA
access key, view the STS
+ * events in your CloudTrail logs in the IAM User Guide.
* This operation does not indicate the state of the access key. The key might be active, * inactive, or deleted. Active keys might not have permissions to perform an operation. * Providing a deleted access key might return an error that the key doesn't exist.
diff --git a/clients/client-sts/src/commands/GetCallerIdentityCommand.ts b/clients/client-sts/src/commands/GetCallerIdentityCommand.ts index 4e9afd75edc9..f20ea2659a2a 100644 --- a/clients/client-sts/src/commands/GetCallerIdentityCommand.ts +++ b/clients/client-sts/src/commands/GetCallerIdentityCommand.ts @@ -37,12 +37,14 @@ export interface GetCallerIdentityCommandOutput extends GetCallerIdentityRespons /** * @public - *Returns details about the IAM user or role whose credentials are used to call the operation.
+ *Returns details about the IAM user or role whose credentials are used to + * call the operation.
*No permissions are required to perform this operation. If an administrator - * attaches a policy to your identity that explicitly denies access to the + *
No permissions are required to perform this operation. If an administrator attaches a
+ * policy to your identity that explicitly denies access to the
* sts:GetCallerIdentity
action, you can still perform this operation.
- * Permissions are not required because the same information is returned when access is denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the
+ * Permissions are not required because the same information is returned when access is
+ * denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the
* IAM User Guide.
You must call the You must call the Although it is possible to call Although it is possible to call You can create a mobile-based or browser-based app that can authenticate users using
* a web identity provider like Login with Amazon, Facebook, Google, or an OpenID
@@ -67,7 +69,8 @@ export interface GetFederationTokenCommandOutput extends GetFederationTokenRespo
* The temporary credentials are valid for the specified duration, from 900 seconds (15
* minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is
- * 43,200 seconds (12 hours). Temporary credentials obtained by using the root user credentials have a maximum duration of 3,600 seconds (1 hour).GetFederationToken
operation
- * using the long-term security credentials of an IAM user. As a result, this call is
- * appropriate in contexts where those credentials can be safeguarded, usually in a
- * server-based application. For a comparison of GetFederationToken
with the
- * other API operations that produce temporary credentials, see Requesting Temporary Security
+ * GetFederationToken
operation using the long-term security
+ * credentials of an IAM user. As a result, this call is appropriate in
+ * contexts where those credentials can be safeguarded, usually in a server-based application.
+ * For a comparison of GetFederationToken
with the other API operations that
+ * produce temporary credentials, see Requesting Temporary Security
* Credentials and Comparing the
* Amazon Web Services STS API operations in the IAM User Guide.GetFederationToken
using the security credentials of an
- * Amazon Web Services account root user rather than an IAM user that you create for the purpose of a proxy application, we do not recommend it. For more information, see Safeguard your root user credentials and don't use them for everyday tasks in the
- * IAM User Guide. GetFederationToken
using the security
+ * credentials of an Amazon Web Services account root user rather than an IAM user that you
+ * create for the purpose of a proxy application, we do not recommend it. For more
+ * information, see Safeguard your root user credentials and don't use them for everyday tasks in the
+ * IAM User Guide.
* Permissions *
@@ -75,7 +78,8 @@ export interface GetFederationTokenCommandOutput extends GetFederationTokenRespo * Amazon Web Services service with the following exceptions: *You cannot call any IAM operations using the CLI or the Amazon Web Services API. This limitation does not apply to console sessions.
+ *You cannot call any IAM operations using the CLI or the Amazon Web Services API. This + * limitation does not apply to console sessions.
*You cannot call any STS operations except GetCallerIdentity
.
Though the session policy parameters are optional, if you do not pass a policy, then the
* resulting federated user session has no permissions. When you pass session policies, the
- * session permissions are the intersection of the IAM user policies and the session
- * policies that you pass. This gives you a way to further restrict the permissions for a
- * federated user. You cannot use session policies to grant more permissions than those that
- * are defined in the permissions policy of the IAM user. For more information, see Session
- * Policies in the IAM User Guide. For information about
- * using GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.
GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.
* You can use the credentials to access a resource that has a resource-based policy. If
* that policy specifically references the federated user session in the
* Principal
element of the policy, the session has the permissions allowed by
diff --git a/clients/client-sts/src/commands/GetSessionTokenCommand.ts b/clients/client-sts/src/commands/GetSessionTokenCommand.ts
index f007e9c34cd1..1b3bb1bf1f53 100644
--- a/clients/client-sts/src/commands/GetSessionTokenCommand.ts
+++ b/clients/client-sts/src/commands/GetSessionTokenCommand.ts
@@ -41,15 +41,17 @@ export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, _
/**
* @public
- *
Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The - * credentials consist of an access key ID, a secret access key, and a security token. + *
Returns a set of temporary credentials for an Amazon Web Services account or IAM user.
+ * The credentials consist of an access key ID, a secret access key, and a security token.
* Typically, you use GetSessionToken
if you want to use MFA to protect
- * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 StopInstances
.
MFA-enabled IAM users must call GetSessionToken
and submit an MFA
- * code that is associated with their MFA device. Using the temporary security credentials
- * that the call returns, IAM users can then make programmatic calls to API
- * operations that require MFA authentication. An incorrect MFA code causes the API to return an access denied error. For a comparison of GetSessionToken
- * with the other API operations that produce temporary credentials, see Requesting
+ * programmatic calls to specific Amazon Web Services API operations like Amazon EC2
+ * StopInstances
.
MFA-enabled IAM users must call GetSessionToken
and submit
+ * an MFA code that is associated with their MFA device. Using the temporary security
+ * credentials that the call returns, IAM users can then make programmatic
+ * calls to API operations that require MFA authentication. An incorrect MFA code causes the
+ * API to return an access denied error. For a comparison of GetSessionToken
with
+ * the other API operations that produce temporary credentials, see Requesting
* Temporary Security Credentials and Comparing the
* Amazon Web Services STS API operations in the IAM User Guide.
The GetSessionToken
operation must be called by using the long-term Amazon Web Services
- * security credentials of an IAM user. Credentials that are
- * created by IAM users are valid for the duration that you specify. This duration can range
+ * security credentials of an IAM user. Credentials that are created by IAM users are valid for the duration that you specify. This duration can range
* from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
* of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900
* seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.
AssumeRole
or GetCallerIdentity
.
* The credentials that GetSessionToken
returns are based on
- * permissions associated with the IAM user whose credentials were used to call the operation. The
- * temporary credentials have the same permissions as the IAM user.
The credentials that GetSessionToken
returns are based on permissions
+ * associated with the IAM user whose credentials were used to call the
+ * operation. The temporary credentials have the same permissions as the IAM user.
Although it is possible to call GetSessionToken
using the security credentials of an
- * Amazon Web Services account root user rather than an IAM user, we do not recommend it. If
- * GetSessionToken
is called using root user credentials, the
- * temporary credentials have root user permissions. For more information, see Safeguard your root user credentials and don't use them for everyday tasks in the
- * IAM User Guide
+ *
Although it is possible to call GetSessionToken
using the security
+ * credentials of an Amazon Web Services account root user rather than an IAM user, we do
+ * not recommend it. If GetSessionToken
is called using root user
+ * credentials, the temporary credentials have root user permissions. For more
+ * information, see Safeguard your root user credentials and don't use them for everyday tasks in the
+ * IAM User Guide
*
For more information about using GetSessionToken
to create temporary
diff --git a/clients/client-sts/src/models/models_0.ts b/clients/client-sts/src/models/models_0.ts
index a9b3a1a83ed0..d68a731af981 100644
--- a/clients/client-sts/src/models/models_0.ts
+++ b/clients/client-sts/src/models/models_0.ts
@@ -37,6 +37,22 @@ export interface PolicyDescriptorType {
arn?: string;
}
+/**
+ * @public
+ *
Reserved for future use.
+ */ +export interface ProvidedContext { + /** + *Reserved for future use.
+ */ + ProviderArn?: string; + + /** + *Reserved for future use.
+ */ + ContextAssertion?: string; +} + /** * @public *You can pass custom key-value pair attributes when you assume a role or federate a user.
@@ -264,6 +280,11 @@ export interface AssumeRoleRequest {
* aws:
. This prefix is reserved for Amazon Web Services internal use.
Reserved for future use.
+ */ + ProvidedContexts?: ProvidedContext[]; } /** @@ -704,7 +725,8 @@ export interface AssumeRoleWithWebIdentityRequest { *The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity
* provider. Your application must get this token by authenticating the user who is using your
* application with a web identity provider before the application makes an
- * AssumeRoleWithWebIdentity
call.
AssumeRoleWithWebIdentity
call. Only tokens with RSA algorithms (RS256) are
+ * supported.
*/
WebIdentityToken: string | undefined;
@@ -1014,10 +1036,10 @@ export interface GetFederationTokenRequest {
* This parameter is optional. However, if you do not pass any session policies, then the * resulting federated user session has no permissions.
*When you pass session policies, the session permissions are the intersection of the - * IAM user policies and the session policies that you pass. This gives you a way to further - * restrict the permissions for a federated user. You cannot use session policies to grant - * more permissions than those that are defined in the permissions policy of the IAM user. - * For more information, see Session Policies in + * IAM user policies and the session policies that you pass. This gives you + * a way to further restrict the permissions for a federated user. You cannot use session + * policies to grant more permissions than those that are defined in the permissions policy of + * the IAM user. For more information, see Session Policies in * the IAM User Guide.
*The resulting credentials can be used to access a resource that has a resource-based * policy. If that policy specifically references the federated user session in the @@ -1041,8 +1063,7 @@ export interface GetFederationTokenRequest { /** *
The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as a - * managed session policy. The policies must exist in the same account as the IAM user that - * is requesting federated access.
+ * managed session policy. The policies must exist in the same account as the IAM user that is requesting federated access. *You must pass an inline or managed session policy to * this operation. You can pass a single JSON policy document to use as an inline session * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as @@ -1053,10 +1074,10 @@ export interface GetFederationTokenRequest { *
This parameter is optional. However, if you do not pass any session policies, then the * resulting federated user session has no permissions.
*When you pass session policies, the session permissions are the intersection of the - * IAM user policies and the session policies that you pass. This gives you a way to further - * restrict the permissions for a federated user. You cannot use session policies to grant - * more permissions than those that are defined in the permissions policy of the IAM user. - * For more information, see Session Policies in + * IAM user policies and the session policies that you pass. This gives you + * a way to further restrict the permissions for a federated user. You cannot use session + * policies to grant more permissions than those that are defined in the permissions policy of + * the IAM user. For more information, see Session Policies in * the IAM User Guide.
*The resulting credentials can be used to access a resource that has a resource-based * policy. If that policy specifically references the federated user session in the @@ -1078,8 +1099,8 @@ export interface GetFederationTokenRequest { * federation sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with * 43,200 seconds (12 hours) as the default. Sessions obtained using root user * credentials are restricted to a maximum of 3,600 seconds (one hour). If the specified - * duration is longer than one hour, the session obtained by using root user credentials - * defaults to one hour.
+ * duration is longer than one hour, the session obtained by using root user + * credentials defaults to one hour. */ DurationSeconds?: number; @@ -1167,21 +1188,19 @@ export interface GetFederationTokenResponse { export interface GetSessionTokenRequest { /** *The duration, in seconds, that the credentials should remain valid. Acceptable durations - * for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), - * with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account owners are - * restricted to a maximum of 3,600 seconds (one hour). If the duration is longer than one - * hour, the session for Amazon Web Services account owners defaults to one hour.
+ * for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds + * (36 hours), with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account + * owners are restricted to a maximum of 3,600 seconds (one hour). If the duration is longer + * than one hour, the session for Amazon Web Services account owners defaults to one hour. */ DurationSeconds?: number; /** - *The identification number of the MFA device that is associated with the IAM user who
- * is making the GetSessionToken
call. Specify this value if the IAM user has a
- * policy that requires MFA authentication. The value is either the serial number for a
- * hardware device (such as GAHT12345678
) or an Amazon Resource Name (ARN) for a
- * virtual device (such as arn:aws:iam::123456789012:mfa/user
). You can find the
- * device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security
- * credentials.
The identification number of the MFA device that is associated with the IAM user who is making the GetSessionToken
call. Specify this value
+ * if the IAM user has a policy that requires MFA authentication. The value is
+ * either the serial number for a hardware device (such as GAHT12345678
) or an
+ * Amazon Resource Name (ARN) for a virtual device (such as
+ * arn:aws:iam::123456789012:mfa/user
). You can find the device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security credentials.
The regex used to validate this parameter is a string of * characters consisting of upper- and lower-case alphanumeric characters with no spaces. * You can also include underscores or any of the following characters: =,.@:/-
@@ -1190,10 +1209,10 @@ export interface GetSessionTokenRequest { /** *The value provided by the MFA device, if MFA is required. If any policy requires the - * IAM user to submit an MFA code, specify this value. If MFA authentication is required, - * the user must provide a code when requesting a set of temporary security credentials. A - * user who fails to provide the code receives an "access denied" response when requesting - * resources that require MFA authentication.
+ * IAM user to submit an MFA code, specify this value. If MFA authentication + * is required, the user must provide a code when requesting a set of temporary security + * credentials. A user who fails to provide the code receives an "access denied" response when + * requesting resources that require MFA authentication. *The format for this parameter, as described by its regex pattern, is a sequence of six * numeric digits.
*/ diff --git a/clients/client-sts/src/protocols/Aws_query.ts b/clients/client-sts/src/protocols/Aws_query.ts index ca210b75fac0..a56f3c6c08cb 100644 --- a/clients/client-sts/src/protocols/Aws_query.ts +++ b/clients/client-sts/src/protocols/Aws_query.ts @@ -61,6 +61,7 @@ import { MalformedPolicyDocumentException, PackedPolicyTooLargeException, PolicyDescriptorType, + ProvidedContext, RegionDisabledException, Tag, } from "../models/models_0"; @@ -793,6 +794,16 @@ const se_AssumeRoleRequest = (input: AssumeRoleRequest, context: __SerdeContext) if (input.SourceIdentity != null) { entries["SourceIdentity"] = input.SourceIdentity; } + if (input.ProvidedContexts != null) { + const memberEntries = se_ProvidedContextsListType(input.ProvidedContexts, context); + if (input.ProvidedContexts?.length === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } return entries; }; @@ -982,6 +993,39 @@ const se_PolicyDescriptorType = (input: PolicyDescriptorType, context: __SerdeCo return entries; }; +/** + * serializeAws_queryProvidedContext + */ +const se_ProvidedContext = (input: ProvidedContext, context: __SerdeContext): any => { + const entries: any = {}; + if (input.ProviderArn != null) { + entries["ProviderArn"] = input.ProviderArn; + } + if (input.ContextAssertion != null) { + entries["ContextAssertion"] = input.ContextAssertion; + } + return entries; +}; + +/** + * serializeAws_queryProvidedContextsListType + */ +const se_ProvidedContextsListType = (input: ProvidedContext[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; + /** * serializeAws_queryTag */ diff --git a/codegen/sdk-codegen/aws-models/sts.json b/codegen/sdk-codegen/aws-models/sts.json index d41c06bf3679..122e4c76069a 100644 --- a/codegen/sdk-codegen/aws-models/sts.json +++ b/codegen/sdk-codegen/aws-models/sts.json @@ -1701,9 +1701,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1733,9 +1733,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1765,9 +1765,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1797,9 +1797,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1829,9 +1829,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1861,9 +1861,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1893,9 +1893,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1925,9 +1925,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1957,9 +1957,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -1989,9 +1989,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -2021,9 +2021,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -2053,9 +2053,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -2085,9 +2085,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -2117,9 +2117,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -2149,9 +2149,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -2181,9 +2181,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-1", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-1" } ] }, @@ -2213,9 +2213,9 @@ "properties": { "authSchemes": [ { - "signingRegion": "us-east-3", "signingName": "sts", - "name": "sigv4" + "name": "sigv4", + "signingRegion": "us-east-3" } ] }, @@ -2305,7 +2305,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns a set of temporary security credentials that you can use to access Amazon Web Services\n resources. These temporary credentials consist of an access key ID, a secret access key,\n and a security token. Typically, you use AssumeRole
within your account or for\n cross-account access. For a comparison of AssumeRole
with other API operations\n that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRole
can be used to\n make API calls to any Amazon Web Services service with the following exception: You cannot call the\n Amazon Web Services STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nWhen you create a role, you create two policies: a role trust policy that specifies\n who can assume the role, and a permissions policy that specifies\n what can be done with the role. You specify the trusted principal\n that is allowed to assume the role in the role trust policy.
\nTo assume a role from a different account, your Amazon Web Services account must be trusted by the\n role. The trust relationship is defined in the role's trust policy when the role is\n created. That trust policy states which accounts are allowed to delegate that access to\n users in the account.
\nA user who wants to access a role in a different account must also have permissions that\n are delegated from the account administrator. The administrator must attach a policy\n that allows the user to call AssumeRole
for the ARN of the role in the other\n account.
To allow a user to assume a role in the same account, you can do either of the\n following:
\nAttach a policy to the user that allows the user to call AssumeRole
\n (as long as the role's trust policy trusts the account).
Add the user as a principal directly in the role's trust policy.
\nYou can do either because the role’s trust policy acts as an IAM resource-based\n policy. When a resource-based policy grants access to a principal in the same account, no\n additional identity-based policy is required. For more information about trust policies and\n resource-based policies, see IAM Policies in the\n IAM User Guide.
\n\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These tags are called\n session tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Using MFA with AssumeRole\n
\n(Optional) You can include multi-factor authentication (MFA) information when you call\n AssumeRole
. This is useful for cross-account scenarios to ensure that the\n user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that\n scenario, the trust policy of the role being assumed includes a condition that tests for\n MFA authentication. If the caller does not include valid MFA information, the request to\n assume the role is denied. The condition in a trust policy that tests for MFA\n authentication might look like the following example.
\n \"Condition\": {\"Bool\": {\"aws:MultiFactorAuthPresent\": true}}
\n
For more information, see Configuring MFA-Protected API Access\n in the IAM User Guide guide.
\nTo use MFA with AssumeRole
, you pass values for the\n SerialNumber
and TokenCode
parameters. The\n SerialNumber
value identifies the user's hardware or virtual MFA device.\n The TokenCode
is the time-based one-time password (TOTP) that the MFA device\n produces.
Returns a set of temporary security credentials that you can use to access Amazon Web Services\n resources. These temporary credentials consist of an access key ID, a secret access key,\n and a security token. Typically, you use AssumeRole
within your account or for\n cross-account access. For a comparison of AssumeRole
with other API operations\n that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRole
can be used to\n make API calls to any Amazon Web Services service with the following exception: You cannot call the\n Amazon Web Services STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nWhen you create a role, you create two policies: a role trust policy that specifies\n who can assume the role, and a permissions policy that specifies\n what can be done with the role. You specify the trusted principal\n that is allowed to assume the role in the role trust policy.
\nTo assume a role from a different account, your Amazon Web Services account must be trusted by the\n role. The trust relationship is defined in the role's trust policy when the role is\n created. That trust policy states which accounts are allowed to delegate that access to\n users in the account.
\nA user who wants to access a role in a different account must also have permissions that\n are delegated from the account administrator. The administrator must attach a policy that\n allows the user to call AssumeRole
for the ARN of the role in the other\n account.
To allow a user to assume a role in the same account, you can do either of the\n following:
\nAttach a policy to the user that allows the user to call AssumeRole
\n (as long as the role's trust policy trusts the account).
Add the user as a principal directly in the role's trust policy.
\nYou can do either because the role’s trust policy acts as an IAM resource-based\n policy. When a resource-based policy grants access to a principal in the same account, no\n additional identity-based policy is required. For more information about trust policies and\n resource-based policies, see IAM Policies in the\n IAM User Guide.
\n\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These tags are called\n session tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Using MFA with AssumeRole\n
\n(Optional) You can include multi-factor authentication (MFA) information when you call\n AssumeRole
. This is useful for cross-account scenarios to ensure that the\n user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that\n scenario, the trust policy of the role being assumed includes a condition that tests for\n MFA authentication. If the caller does not include valid MFA information, the request to\n assume the role is denied. The condition in a trust policy that tests for MFA\n authentication might look like the following example.
\n \"Condition\": {\"Bool\": {\"aws:MultiFactorAuthPresent\": true}}
\n
For more information, see Configuring MFA-Protected API Access\n in the IAM User Guide guide.
\nTo use MFA with AssumeRole
, you pass values for the\n SerialNumber
and TokenCode
parameters. The\n SerialNumber
value identifies the user's hardware or virtual MFA device.\n The TokenCode
is the time-based one-time password (TOTP) that the MFA device\n produces.
The source identity specified by the principal that is calling the\n AssumeRole
operation.
You can require users to specify a source identity when they assume a role. You do this\n by using the sts:SourceIdentity
condition key in a role trust policy. You can\n use source identity information in CloudTrail logs to determine who took actions with a role.\n You can use the aws:SourceIdentity
condition key to further control access to\n Amazon Web Services resources based on the value of source identity. For more information about using\n source identity, see Monitor and control\n actions taken with assumed roles in the\n IAM User Guide.
The regex used to validate this parameter is a string of characters consisting of upper-\n and lower-case alphanumeric characters with no spaces. You can also include underscores or\n any of the following characters: =,.@-. You cannot use a value that begins with the text\n aws:
. This prefix is reserved for Amazon Web Services internal use.
Reserved for future use.
" + } } }, "traits": { @@ -2591,7 +2597,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns a set of temporary security credentials for users who have been authenticated in\n a mobile or web application with a web identity provider. Example providers include the\n OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible\n identity provider such as Google or Amazon Cognito federated identities.
\nFor mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the\n Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely\n identify a user. You can also supply the user with a consistent identity throughout the\n lifetime of an application.
\nTo learn more about Amazon Cognito, see Amazon Cognito identity pools in\n Amazon Cognito Developer Guide.
\nCalling AssumeRoleWithWebIdentity
does not require the use of Amazon Web Services\n security credentials. Therefore, you can distribute an application (for example, on mobile\n devices) that requests temporary security credentials without including long-term Amazon Web Services\n credentials in the application. You also don't need to deploy server-based proxy services\n that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by\n using a token from the web identity provider. For a comparison of\n AssumeRoleWithWebIdentity
with the other API operations that produce\n temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
The temporary security credentials returned by this API consist of an access key ID, a\n secret access key, and a security token. Applications can use these temporary security\n credentials to sign calls to Amazon Web Services service API operations.
\n\n Session Duration\n
\nBy default, the temporary security credentials created by\n AssumeRoleWithWebIdentity
last for one hour. However, you can use the\n optional DurationSeconds
parameter to specify the duration of your session.\n You can provide a value from 900 seconds (15 minutes) up to the maximum session duration\n setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how\n to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole*
API operations or the assume-role*
CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRoleWithWebIdentity
can\n be used to make API calls to any Amazon Web Services service with the following exception: you cannot\n call the STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\n\n Tags\n
\n(Optional) You can configure your IdP to pass attributes into your web identity token as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.
\nAn Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize
response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.
You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, the session tag overrides the role tag with the same key.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Identities\n
\nBefore your application can call AssumeRoleWithWebIdentity
, you must have\n an identity token from a supported identity provider and create a role that the application\n can assume. The role that your application assumes must trust the identity provider that is\n associated with the identity token. In other words, the identity provider must be specified\n in the role's trust policy.
Calling AssumeRoleWithWebIdentity
can result in an entry in your\n CloudTrail logs. The entry includes the Subject of\n the provided web identity token. We recommend that you avoid using any personally\n identifiable information (PII) in this field. For example, you could instead use a GUID\n or a pairwise identifier, as suggested\n in the OIDC specification.
For more information about how to use web identity federation and the\n AssumeRoleWithWebIdentity
API, see the following resources:
\n Using Web Identity Federation API Operations for Mobile Apps and Federation Through a Web-based Identity Provider.
\n\n Web Identity Federation Playground. Walk through the process of\n authenticating through Login with Amazon, Facebook, or Google, getting temporary\n security credentials, and then using those credentials to make a request to Amazon Web Services.\n
\n\n Amazon Web Services SDK for iOS Developer Guide and Amazon Web Services SDK for Android Developer Guide. These toolkits\n contain sample apps that show how to invoke the identity providers. The toolkits then\n show how to use the information from these providers to get and use temporary\n security credentials.
\n\n Web Identity\n Federation with Mobile Applications. This article discusses web identity\n federation and shows an example of how to use web identity federation to get access\n to content in Amazon S3.
\nReturns a set of temporary security credentials for users who have been authenticated in\n a mobile or web application with a web identity provider. Example providers include the\n OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible\n identity provider such as Google or Amazon Cognito federated identities.
\nFor mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the\n Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely\n identify a user. You can also supply the user with a consistent identity throughout the\n lifetime of an application.
\nTo learn more about Amazon Cognito, see Amazon Cognito identity\n pools in Amazon Cognito Developer Guide.
\nCalling AssumeRoleWithWebIdentity
does not require the use of Amazon Web Services\n security credentials. Therefore, you can distribute an application (for example, on mobile\n devices) that requests temporary security credentials without including long-term Amazon Web Services\n credentials in the application. You also don't need to deploy server-based proxy services\n that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by\n using a token from the web identity provider. For a comparison of\n AssumeRoleWithWebIdentity
with the other API operations that produce\n temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
The temporary security credentials returned by this API consist of an access key ID, a\n secret access key, and a security token. Applications can use these temporary security\n credentials to sign calls to Amazon Web Services service API operations.
\n\n Session Duration\n
\nBy default, the temporary security credentials created by\n AssumeRoleWithWebIdentity
last for one hour. However, you can use the\n optional DurationSeconds
parameter to specify the duration of your session.\n You can provide a value from 900 seconds (15 minutes) up to the maximum session duration\n setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how\n to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole*
API operations or the assume-role*
CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRoleWithWebIdentity
can\n be used to make API calls to any Amazon Web Services service with the following exception: you cannot\n call the STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\n\n Tags\n
\n(Optional) You can configure your IdP to pass attributes into your web identity token as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.
\nAn Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize
response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.
You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, the session tag overrides the role tag with the same key.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Identities\n
\nBefore your application can call AssumeRoleWithWebIdentity
, you must have\n an identity token from a supported identity provider and create a role that the application\n can assume. The role that your application assumes must trust the identity provider that is\n associated with the identity token. In other words, the identity provider must be specified\n in the role's trust policy.
Calling AssumeRoleWithWebIdentity
can result in an entry in your\n CloudTrail logs. The entry includes the Subject of\n the provided web identity token. We recommend that you avoid using any personally\n identifiable information (PII) in this field. For example, you could instead use a GUID\n or a pairwise identifier, as suggested\n in the OIDC specification.
For more information about how to use web identity federation and the\n AssumeRoleWithWebIdentity
API, see the following resources:
\n Using Web Identity Federation API Operations for Mobile Apps and Federation Through a Web-based Identity Provider.
\n\n Web Identity Federation Playground. Walk through the process of\n authenticating through Login with Amazon, Facebook, or Google, getting temporary\n security credentials, and then using those credentials to make a request to Amazon Web Services.\n
\n\n Amazon Web Services SDK for iOS Developer Guide and Amazon Web Services SDK for Android Developer Guide. These toolkits\n contain sample apps that show how to invoke the identity providers. The toolkits then\n show how to use the information from these providers to get and use temporary\n security credentials.
\n\n Web Identity\n Federation with Mobile Applications. This article discusses web identity\n federation and shows an example of how to use web identity federation to get access\n to content in Amazon S3.
\nThe OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity\n provider. Your application must get this token by authenticating the user who is using your\n application with a web identity provider before the application makes an\n AssumeRoleWithWebIdentity
call.
The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity\n provider. Your application must get this token by authenticating the user who is using your\n application with a web identity provider before the application makes an\n AssumeRoleWithWebIdentity
call. Only tokens with RSA algorithms (RS256) are\n supported.
Returns the account identifier for the specified access key ID.
\nAccess keys consist of two parts: an access key ID (for example,\n AKIAIOSFODNN7EXAMPLE
) and a secret access key (for example,\n wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
). For more information about\n access keys, see Managing Access Keys for IAM\n Users in the IAM User Guide.
When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account\n to which the keys belong. Access key IDs beginning with AKIA
are long-term\n credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with\n ASIA
are temporary credentials that are created using STS operations. If\n the account in the response belongs to you, you can sign in as the root user and review\n your root user access keys. Then, you can pull a credentials report to\n learn which IAM user owns the keys. To learn who requested the temporary credentials for\n an ASIA
access key, view the STS events in your CloudTrail logs in the\n IAM User Guide.
This operation does not indicate the state of the access key. The key might be active,\n inactive, or deleted. Active keys might not have permissions to perform an operation.\n Providing a deleted access key might return an error that the key doesn't exist.
" + "smithy.api#documentation": "Returns the account identifier for the specified access key ID.
\nAccess keys consist of two parts: an access key ID (for example,\n AKIAIOSFODNN7EXAMPLE
) and a secret access key (for example,\n wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
). For more information about\n access keys, see Managing Access Keys for IAM\n Users in the IAM User Guide.
When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account\n to which the keys belong. Access key IDs beginning with AKIA
are long-term\n credentials for an IAM user or the Amazon Web Services account root user. Access key IDs\n beginning with ASIA
are temporary credentials that are created using STS\n operations. If the account in the response belongs to you, you can sign in as the root user and review your root user access keys. Then, you can pull a credentials\n report to learn which IAM user owns the keys. To learn who\n requested the temporary credentials for an ASIA
access key, view the STS\n events in your CloudTrail logs in the IAM User Guide.
This operation does not indicate the state of the access key. The key might be active,\n inactive, or deleted. Active keys might not have permissions to perform an operation.\n Providing a deleted access key might return an error that the key doesn't exist.
" } }, "com.amazonaws.sts#GetAccessKeyInfoRequest": { @@ -2895,7 +2901,7 @@ "target": "com.amazonaws.sts#GetCallerIdentityResponse" }, "traits": { - "smithy.api#documentation": "Returns details about the IAM user or role whose credentials are used to call the operation.
\nNo permissions are required to perform this operation. If an administrator\n attaches a policy to your identity that explicitly denies access to the\n sts:GetCallerIdentity
action, you can still perform this operation.\n Permissions are not required because the same information is returned when access is denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the\n IAM User Guide.
Returns details about the IAM user or role whose credentials are used to\n call the operation.
\nNo permissions are required to perform this operation. If an administrator attaches a\n policy to your identity that explicitly denies access to the\n sts:GetCallerIdentity
action, you can still perform this operation.\n Permissions are not required because the same information is returned when access is\n denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the\n IAM User Guide.
Returns a set of temporary security credentials (consisting of an access key ID, a\n secret access key, and a security token) for a user. A typical use is in a proxy\n application that gets temporary security credentials on behalf of distributed applications\n inside a corporate network.
\nYou must call the GetFederationToken
operation\n using the long-term security credentials of an IAM user. As a result, this call is\n appropriate in contexts where those credentials can be safeguarded, usually in a\n server-based application. For a comparison of GetFederationToken
with the\n other API operations that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
Although it is possible to call GetFederationToken
using the security credentials of an\n Amazon Web Services account root user rather than an IAM user that you create for the purpose of a proxy application, we do not recommend it. For more information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide.
You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
\n Session duration\n
\nThe temporary credentials are valid for the specified duration, from 900 seconds (15\n minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n 43,200 seconds (12 hours). Temporary credentials obtained by using the root user credentials have a maximum duration of 3,600 seconds (1 hour).
\n\n Permissions\n
\nYou can use the temporary credentials created by GetFederationToken
in any\n Amazon Web Services service with the following exceptions:
You cannot call any IAM operations using the CLI or the Amazon Web Services API. This limitation does not apply to console sessions.
\nYou cannot call any STS operations except GetCallerIdentity
.
You can use temporary credentials for single sign-on (SSO) to the console.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters.
\nThough the session policy parameters are optional, if you do not pass a policy, then the\n resulting federated user session has no permissions. When you pass session policies, the\n session permissions are the intersection of the IAM user policies and the session\n policies that you pass. This gives you a way to further restrict the permissions for a\n federated user. You cannot use session policies to grant more permissions than those that\n are defined in the permissions policy of the IAM user. For more information, see Session\n Policies in the IAM User Guide. For information about\n using GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.
You can use the credentials to access a resource that has a resource-based policy. If\n that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions granted by the\n session policies.
\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These are called session\n tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys. Assume\n that the user that you are federating has the\n Department
=Marketing
tag and you pass the\n department
=engineering
session tag. Department
\n and department
are not saved as separate tags, and the session tag passed in\n the request takes precedence over the user tag.
Returns a set of temporary security credentials (consisting of an access key ID, a\n secret access key, and a security token) for a user. A typical use is in a proxy\n application that gets temporary security credentials on behalf of distributed applications\n inside a corporate network.
\nYou must call the GetFederationToken
operation using the long-term security\n credentials of an IAM user. As a result, this call is appropriate in\n contexts where those credentials can be safeguarded, usually in a server-based application.\n For a comparison of GetFederationToken
with the other API operations that\n produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
Although it is possible to call GetFederationToken
using the security\n credentials of an Amazon Web Services account root user rather than an IAM user that you\n create for the purpose of a proxy application, we do not recommend it. For more\n information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide.
You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
\n Session duration\n
\nThe temporary credentials are valid for the specified duration, from 900 seconds (15\n minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n 43,200 seconds (12 hours). Temporary credentials obtained by using the root user\n credentials have a maximum duration of 3,600 seconds (1 hour).
\n\n Permissions\n
\nYou can use the temporary credentials created by GetFederationToken
in any\n Amazon Web Services service with the following exceptions:
You cannot call any IAM operations using the CLI or the Amazon Web Services API. This\n limitation does not apply to console sessions.
\nYou cannot call any STS operations except GetCallerIdentity
.
You can use temporary credentials for single sign-on (SSO) to the console.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters.
\nThough the session policy parameters are optional, if you do not pass a policy, then the\n resulting federated user session has no permissions. When you pass session policies, the\n session permissions are the intersection of the IAM user policies and the\n session policies that you pass. This gives you a way to further restrict the permissions\n for a federated user. You cannot use session policies to grant more permissions than those\n that are defined in the permissions policy of the IAM user. For more\n information, see Session Policies in\n the IAM User Guide. For information about using\n GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.
You can use the credentials to access a resource that has a resource-based policy. If\n that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions granted by the\n session policies.
\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These are called session\n tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys. Assume\n that the user that you are federating has the\n Department
=Marketing
tag and you pass the\n department
=engineering
session tag. Department
\n and department
are not saved as separate tags, and the session tag passed in\n the request takes precedence over the user tag.
An IAM policy in JSON format that you want to use as an inline session policy.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you a way to further\n restrict the permissions for a federated user. You cannot use session policies to grant\n more permissions than those that are defined in the permissions policy of the IAM user.\n For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
The plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\nAn Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize
response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.
An IAM policy in JSON format that you want to use as an inline session policy.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you\n a way to further restrict the permissions for a federated user. You cannot use session\n policies to grant more permissions than those that are defined in the permissions policy of\n the IAM user. For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
The plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\nAn Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize
response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.
The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as a\n managed session policy. The policies must exist in the same account as the IAM user that\n is requesting federated access.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. You can provide up to 10 managed policy ARNs. For\n more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you a way to further\n restrict the permissions for a federated user. You cannot use session policies to grant\n more permissions than those that are defined in the permissions policy of the IAM user.\n For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize
response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.
The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as a\n managed session policy. The policies must exist in the same account as the IAM user that is requesting federated access.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. You can provide up to 10 managed policy ARNs. For\n more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you\n a way to further restrict the permissions for a federated user. You cannot use session\n policies to grant more permissions than those that are defined in the permissions policy of\n the IAM user. For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize
response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.
The duration, in seconds, that the session should last. Acceptable durations for\n federation sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with\n 43,200 seconds (12 hours) as the default. Sessions obtained using root user\n credentials are restricted to a maximum of 3,600 seconds (one hour). If the specified\n duration is longer than one hour, the session obtained by using root user credentials\n defaults to one hour.
" + "smithy.api#documentation": "The duration, in seconds, that the session should last. Acceptable durations for\n federation sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with\n 43,200 seconds (12 hours) as the default. Sessions obtained using root user\n credentials are restricted to a maximum of 3,600 seconds (one hour). If the specified\n duration is longer than one hour, the session obtained by using root user\n credentials defaults to one hour.
" } }, "Tags": { @@ -3035,7 +3041,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The\n credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken
if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2 StopInstances
.
MFA-enabled IAM users must call GetSessionToken
and submit an MFA\n code that is associated with their MFA device. Using the temporary security credentials\n that the call returns, IAM users can then make programmatic calls to API\n operations that require MFA authentication. An incorrect MFA code causes the API to return an access denied error. For a comparison of GetSessionToken
\n with the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
No permissions are required for users to perform this operation. The purpose of the\n sts:GetSessionToken
operation is to authenticate the user using MFA. You\n cannot use policies to control authentication operations. For more information, see\n Permissions for GetSessionToken in the\n IAM User Guide.
\n Session Duration\n
\nThe GetSessionToken
operation must be called by using the long-term Amazon Web Services\n security credentials of an IAM user. Credentials that are\n created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.
\n Permissions\n
\nThe temporary security credentials created by GetSessionToken
can be used\n to make API calls to any Amazon Web Services service with the following exceptions:
You cannot call any IAM API operations unless MFA authentication information is\n included in the request.
\nYou cannot call any STS API except\n AssumeRole
or GetCallerIdentity
.
The credentials that GetSessionToken
returns are based on\n permissions associated with the IAM user whose credentials were used to call the operation. The\n temporary credentials have the same permissions as the IAM user.
Although it is possible to call GetSessionToken
using the security credentials of an\n Amazon Web Services account root user rather than an IAM user, we do not recommend it. If\n GetSessionToken
is called using root user credentials, the\n temporary credentials have root user permissions. For more information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide\n
For more information about using GetSessionToken
to create temporary\n credentials, see Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.
Returns a set of temporary credentials for an Amazon Web Services account or IAM user.\n The credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken
if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2\n StopInstances
.
MFA-enabled IAM users must call GetSessionToken
and submit\n an MFA code that is associated with their MFA device. Using the temporary security\n credentials that the call returns, IAM users can then make programmatic\n calls to API operations that require MFA authentication. An incorrect MFA code causes the\n API to return an access denied error. For a comparison of GetSessionToken
with\n the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
No permissions are required for users to perform this operation. The purpose of the\n sts:GetSessionToken
operation is to authenticate the user using MFA. You\n cannot use policies to control authentication operations. For more information, see\n Permissions for GetSessionToken in the\n IAM User Guide.
\n Session Duration\n
\nThe GetSessionToken
operation must be called by using the long-term Amazon Web Services\n security credentials of an IAM user. Credentials that are created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.
\n Permissions\n
\nThe temporary security credentials created by GetSessionToken
can be used\n to make API calls to any Amazon Web Services service with the following exceptions:
You cannot call any IAM API operations unless MFA authentication information is\n included in the request.
\nYou cannot call any STS API except\n AssumeRole
or GetCallerIdentity
.
The credentials that GetSessionToken
returns are based on permissions\n associated with the IAM user whose credentials were used to call the\n operation. The temporary credentials have the same permissions as the IAM user.
Although it is possible to call GetSessionToken
using the security\n credentials of an Amazon Web Services account root user rather than an IAM user, we do\n not recommend it. If GetSessionToken
is called using root user\n credentials, the temporary credentials have root user permissions. For more\n information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide\n
For more information about using GetSessionToken
to create temporary\n credentials, see Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.
The duration, in seconds, that the credentials should remain valid. Acceptable durations\n for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours),\n with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account owners are\n restricted to a maximum of 3,600 seconds (one hour). If the duration is longer than one\n hour, the session for Amazon Web Services account owners defaults to one hour.
" + "smithy.api#documentation": "The duration, in seconds, that the credentials should remain valid. Acceptable durations\n for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds\n (36 hours), with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account\n owners are restricted to a maximum of 3,600 seconds (one hour). If the duration is longer\n than one hour, the session for Amazon Web Services account owners defaults to one hour.
" } }, "SerialNumber": { "target": "com.amazonaws.sts#serialNumberType", "traits": { - "smithy.api#documentation": "The identification number of the MFA device that is associated with the IAM user who\n is making the GetSessionToken
call. Specify this value if the IAM user has a\n policy that requires MFA authentication. The value is either the serial number for a\n hardware device (such as GAHT12345678
) or an Amazon Resource Name (ARN) for a\n virtual device (such as arn:aws:iam::123456789012:mfa/user
). You can find the\n device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security\n credentials.
The regex used to validate this parameter is a string of \n characters consisting of upper- and lower-case alphanumeric characters with no spaces. \n You can also include underscores or any of the following characters: =,.@:/-
" + "smithy.api#documentation": "The identification number of the MFA device that is associated with the IAM user who is making the GetSessionToken
call. Specify this value\n if the IAM user has a policy that requires MFA authentication. The value is\n either the serial number for a hardware device (such as GAHT12345678
) or an\n Amazon Resource Name (ARN) for a virtual device (such as\n arn:aws:iam::123456789012:mfa/user
). You can find the device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security credentials.
The regex used to validate this parameter is a string of \n characters consisting of upper- and lower-case alphanumeric characters with no spaces. \n You can also include underscores or any of the following characters: =,.@:/-
" } }, "TokenCode": { "target": "com.amazonaws.sts#tokenCodeType", "traits": { - "smithy.api#documentation": "The value provided by the MFA device, if MFA is required. If any policy requires the\n IAM user to submit an MFA code, specify this value. If MFA authentication is required,\n the user must provide a code when requesting a set of temporary security credentials. A\n user who fails to provide the code receives an \"access denied\" response when requesting\n resources that require MFA authentication.
\nThe format for this parameter, as described by its regex pattern, is a sequence of six\n numeric digits.
" + "smithy.api#documentation": "The value provided by the MFA device, if MFA is required. If any policy requires the\n IAM user to submit an MFA code, specify this value. If MFA authentication\n is required, the user must provide a code when requesting a set of temporary security\n credentials. A user who fails to provide the code receives an \"access denied\" response when\n requesting resources that require MFA authentication.
\nThe format for this parameter, as described by its regex pattern, is a sequence of six\n numeric digits.
" } } }, @@ -3201,6 +3207,38 @@ "smithy.api#documentation": "A reference to the IAM managed policy that is passed as a session policy for a role\n session or a federated user session.
" } }, + "com.amazonaws.sts#ProvidedContext": { + "type": "structure", + "members": { + "ProviderArn": { + "target": "com.amazonaws.sts#arnType", + "traits": { + "smithy.api#documentation": "Reserved for future use.
" + } + }, + "ContextAssertion": { + "target": "com.amazonaws.sts#contextAssertionType", + "traits": { + "smithy.api#documentation": "Reserved for future use.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Reserved for future use.
" + } + }, + "com.amazonaws.sts#ProvidedContextsListType": { + "type": "list", + "member": { + "target": "com.amazonaws.sts#ProvidedContext" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5 + } + } + }, "com.amazonaws.sts#RegionDisabledException": { "type": "structure", "members": { @@ -3305,6 +3343,15 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.sts#contextAssertionType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 4, + "max": 2048 + } + } + }, "com.amazonaws.sts#dateType": { "type": "timestamp" },