Skip to content

Commit e31564c

Browse files
feat(aws-android-sdk-core): update models to latest (#2445)
Co-authored-by: Richard McClellan <[email protected]>
1 parent d328875 commit e31564c

File tree

66 files changed

+1940
-602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1940
-602
lines changed

aws-android-sdk-core/src/main/java/com/amazonaws/auth/policy/actions/SecurityTokenServiceActions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.

aws-android-sdk-core/src/main/java/com/amazonaws/services/securitytoken/AWSSecurityTokenService.java

Lines changed: 121 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.
@@ -105,46 +105,6 @@ public interface AWSSecurityTokenService {
105105
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison"
106106
* >Comparing the AWS STS API operations</a> in the <i>IAM User Guide</i>.
107107
* </p>
108-
* <important>
109-
* <p>
110-
* You cannot use AWS account root user credentials to call
111-
* <code>AssumeRole</code>. You must use credentials for an IAM user or an
112-
* IAM role to call <code>AssumeRole</code>.
113-
* </p>
114-
* </important>
115-
* <p>
116-
* For cross-account access, imagine that you own multiple accounts and need
117-
* to access resources in each account. You could create long-term
118-
* credentials in each account to access those resources. However, managing
119-
* all those credentials and remembering which one can access which account
120-
* can be time consuming. Instead, you can create one set of long-term
121-
* credentials in one account. Then use temporary security credentials to
122-
* access all the other accounts by assuming roles in those accounts. For
123-
* more information about roles, see <a
124-
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM
125-
* Roles</a> in the <i>IAM User Guide</i>.
126-
* </p>
127-
* <p>
128-
* <b>Session Duration</b>
129-
* </p>
130-
* <p>
131-
* By default, the temporary security credentials created by
132-
* <code>AssumeRole</code> last for one hour. However, you can use the
133-
* optional <code>DurationSeconds</code> parameter to specify the duration
134-
* of your session. You can provide a value from 900 seconds (15 minutes) up
135-
* to the maximum session duration setting for the role. This setting can
136-
* have a value from 1 hour to 12 hours. To learn how to view the maximum
137-
* value for your role, see <a href=
138-
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session"
139-
* >View the Maximum Session Duration Setting for a Role</a> in the <i>IAM
140-
* User Guide</i>. The maximum session duration limit applies when you use
141-
* the <code>AssumeRole*</code> API operations or the
142-
* <code>assume-role*</code> CLI commands. However the limit does not apply
143-
* when you use those operations to create a console URL. For more
144-
* information, see <a href=
145-
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html"
146-
* >Using IAM Roles</a> in the <i>IAM User Guide</i>.
147-
* </p>
148108
* <p>
149109
* <b>Permissions</b>
150110
* </p>
@@ -159,8 +119,8 @@ public interface AWSSecurityTokenService {
159119
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
160120
* >session policies</a> to this operation. You can pass a single JSON
161121
* policy document to use as an inline session policy. You can also specify
162-
* up to 10 managed policies to use as managed session policies. The plain
163-
* text that you use for both inline and managed session policies can't
122+
* up to 10 managed policies to use as managed session policies. The
123+
* plaintext that you use for both inline and managed session policies can't
164124
* exceed 2,048 characters. Passing policies to this operation returns new
165125
* temporary credentials. The resulting session's permissions are the
166126
* intersection of the role's identity-based policy and the session
@@ -322,6 +282,20 @@ AssumeRoleResult assumeRole(AssumeRoleRequest assumeRoleRequest) throws AmazonCl
322282
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html"
323283
* >Using IAM Roles</a> in the <i>IAM User Guide</i>.
324284
* </p>
285+
* <note>
286+
* <p>
287+
* <a href=
288+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining"
289+
* >Role chaining</a> limits your AWS CLI or AWS API role session to a
290+
* maximum of one hour. When you use the <code>AssumeRole</code> API
291+
* operation to assume a role, you can specify the duration of your role
292+
* session with the <code>DurationSeconds</code> parameter. You can specify
293+
* a parameter value of up to 43200 seconds (12 hours), depending on the
294+
* maximum session duration setting for your role. However, if you assume a
295+
* role using role chaining and provide a <code>DurationSeconds</code>
296+
* parameter value greater than one hour, the operation fails.
297+
* </p>
298+
* </note>
325299
* <p>
326300
* <b>Permissions</b>
327301
* </p>
@@ -337,8 +311,8 @@ AssumeRoleResult assumeRole(AssumeRoleRequest assumeRoleRequest) throws AmazonCl
337311
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
338312
* >session policies</a> to this operation. You can pass a single JSON
339313
* policy document to use as an inline session policy. You can also specify
340-
* up to 10 managed policies to use as managed session policies. The plain
341-
* text that you use for both inline and managed session policies can't
314+
* up to 10 managed policies to use as managed session policies. The
315+
* plaintext that you use for both inline and managed session policies can't
342316
* exceed 2,048 characters. Passing policies to this operation returns new
343317
* temporary credentials. The resulting session's permissions are the
344318
* intersection of the role's identity-based policy and the session
@@ -378,7 +352,7 @@ AssumeRoleResult assumeRole(AssumeRoleRequest assumeRoleRequest) throws AmazonCl
378352
* >Passing Session Tags in STS</a> in the <i>IAM User Guide</i>.
379353
* </p>
380354
* <p>
381-
* You can pass up to 50 session tags. The plain text session tag keys can’t
355+
* You can pass up to 50 session tags. The plaintext session tag keys can’t
382356
* exceed 128 characters and the values can’t exceed 256 characters. For
383357
* these and additional limits, see <a href=
384358
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length"
@@ -388,7 +362,7 @@ AssumeRoleResult assumeRole(AssumeRoleRequest assumeRoleRequest) throws AmazonCl
388362
* <p>
389363
* An AWS conversion compresses the passed session policies and session tags
390364
* into a packed binary format that has a separate limit. Your request can
391-
* fail for this limit even if your plain text meets the other requirements.
365+
* fail for this limit even if your plaintext meets the other requirements.
392366
* The <code>PackedPolicySize</code> response element indicates by
393367
* percentage how close the policies and tags for your request are to the
394368
* upper size limit.
@@ -563,8 +537,8 @@ AssumeRoleWithSAMLResult assumeRoleWithSAML(AssumeRoleWithSAMLRequest assumeRole
563537
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
564538
* >session policies</a> to this operation. You can pass a single JSON
565539
* policy document to use as an inline session policy. You can also specify
566-
* up to 10 managed policies to use as managed session policies. The plain
567-
* text that you use for both inline and managed session policies can't
540+
* up to 10 managed policies to use as managed session policies. The
541+
* plaintext that you use for both inline and managed session policies can't
568542
* exceed 2,048 characters. Passing policies to this operation returns new
569543
* temporary credentials. The resulting session's permissions are the
570544
* intersection of the role's identity-based policy and the session
@@ -588,7 +562,7 @@ AssumeRoleWithSAMLResult assumeRoleWithSAML(AssumeRoleWithSAMLRequest assumeRole
588562
* >Passing Session Tags in STS</a> in the <i>IAM User Guide</i>.
589563
* </p>
590564
* <p>
591-
* You can pass up to 50 session tags. The plain text session tag keys can’t
565+
* You can pass up to 50 session tags. The plaintext session tag keys can’t
592566
* exceed 128 characters and the values can’t exceed 256 characters. For
593567
* these and additional limits, see <a href=
594568
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length"
@@ -598,7 +572,7 @@ AssumeRoleWithSAMLResult assumeRoleWithSAML(AssumeRoleWithSAMLRequest assumeRole
598572
* <p>
599573
* An AWS conversion compresses the passed session policies and session tags
600574
* into a packed binary format that has a separate limit. Your request can
601-
* fail for this limit even if your plain text meets the other requirements.
575+
* fail for this limit even if your plaintext meets the other requirements.
602576
* The <code>PackedPolicySize</code> response element indicates by
603577
* percentage how close the policies and tags for your request are to the
604578
* upper size limit.
@@ -639,7 +613,7 @@ AssumeRoleWithSAMLResult assumeRoleWithSAML(AssumeRoleWithSAMLRequest assumeRole
639613
* Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in
640614
* your AWS CloudTrail logs. The entry includes the <a
641615
* href="http://openid.net/specs/openid-connect-core-1_0.html#Claims"
642-
* >Subject</a> of the provided Web Identity Token. We recommend that you
616+
* >Subject</a> of the provided web identity token. We recommend that you
643617
* avoid using any personally identifiable information (PII) in this field.
644618
* For example, you could instead use a GUID or a pairwise identifier, as <a
645619
* href
@@ -951,6 +925,101 @@ GetCallerIdentityResult getCallerIdentity(GetCallerIdentityRequest getCallerIden
951925
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
952926
* >session policy</a> to this operation. You can pass a single JSON policy
953927
* document to use as an inline session policy. You can also specify up to
928+
* 10 managed policies to use as managed session policies. The plaintext
929+
* that you use for both inline and managed session policies can't exceed
930+
* 2,048 characters.
931+
* </p>
932+
* <p>
933+
* Though the session policy parameters are optional, if you do not pass a
934+
* policy, then the resulting federated user session has no permissions.
935+
* When you pass session policies, the session permissions are the
936+
* intersection of the IAM user policies and the session policies that you
937+
* pass. This gives you a way to further restrict the permissions for a
938+
* federated user. You cannot use session policies to grant more permissions
939+
* than those that are defined in the permissions policy of the IAM user.
940+
* For more information, see <a href=
941+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
942+
* >Session Policies</a> in the <i>IAM User Guide</i>. For information about
943+
* using <code>GetFederationToken</code> to create temporary security
944+
* credentials, see <a href=
945+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken"
946+
* >GetFederationToken—Federation Through a Custom Identity Broker</a>.
947+
* </p>
948+
* <p>
949+
* You can use the credentials to access a resource that has a
950+
* resource-based policy. If that policy specifically references the
951+
* federated user session in the <code>Principal</code> element of the
952+
* policy, the session has the permissions allowed by the policy. These
953+
* permissions are granted in addition to the permissions granted by the
954+
* session policies.
955+
* </p>
956+
* <p>
957+
* <b>Tags</b>
958+
* </p>
959+
* <p>
960+
* (Optional) You can pass tag key-value pairs to your session. These are
961+
* called session tags. For more information about session tags, see <a
962+
* href=
963+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html"
964+
* >Passing Session Tags in STS</a> in the <i>IAM User Guide</i>.
965+
* </p>
966+
* <note>
967+
* <p>
968+
* You can create a mobile-based or browser-based app that can authenticate
969+
* users using a web identity provider like Login with Amazon, Facebook,
970+
* Google, or an OpenID Connect-compatible identity provider. In this case,
971+
* we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon
972+
* Cognito</a> or <code>AssumeRoleWithWebIdentity</code>. For more
973+
* information, see <a href=
974+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity"
975+
* >Federation Through a Web-based Identity Provider</a> in the <i>IAM User
976+
* Guide</i>.
977+
* </p>
978+
* </note>
979+
* <p>
980+
* You can also call <code>GetFederationToken</code> using the security
981+
* credentials of an AWS account root user, but we do not recommend it.
982+
* Instead, we recommend that you create an IAM user for the purpose of the
983+
* proxy application. Then attach a policy to the IAM user that limits
984+
* federated users to only the actions and resources that they need to
985+
* access. For more information, see <a href=
986+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html"
987+
* >IAM Best Practices</a> in the <i>IAM User Guide</i>.
988+
* </p>
989+
* <p>
990+
* <b>Session duration</b>
991+
* </p>
992+
* <p>
993+
* The temporary credentials are valid for the specified duration, from 900
994+
* seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The
995+
* default session duration is 43,200 seconds (12 hours). Temporary
996+
* credentials that are obtained by using AWS account root user credentials
997+
* have a maximum duration of 3,600 seconds (1 hour).
998+
* </p>
999+
* <p>
1000+
* <b>Permissions</b>
1001+
* </p>
1002+
* <p>
1003+
* You can use the temporary credentials created by
1004+
* <code>GetFederationToken</code> in any AWS service except the following:
1005+
* </p>
1006+
* <ul>
1007+
* <li>
1008+
* <p>
1009+
* You cannot call any IAM operations using the AWS CLI or the AWS API.
1010+
* </p>
1011+
* </li>
1012+
* <li>
1013+
* <p>
1014+
* You cannot call any STS operations except <code>GetCallerIdentity</code>.
1015+
* </p>
1016+
* </li>
1017+
* </ul>
1018+
* <p>
1019+
* You must pass an inline or managed <a href=
1020+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
1021+
* >session policy</a> to this operation. You can pass a single JSON policy
1022+
* document to use as an inline session policy. You can also specify up to
9541023
* 10 managed policies to use as managed session policies. The plain text
9551024
* that you use for both inline and managed session policies can't exceed
9561025
* 2,048 characters.

0 commit comments

Comments
 (0)