Skip to content

Commit d5bec62

Browse files
awsmobilesdkraphkim
authored andcommitted
[aws-android-sdk-core-sts] Update models to latest (#1228)
1 parent 3c2bb39 commit d5bec62

13 files changed

+3444
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ public enum SecurityTokenServiceActions implements Action {
2828
/** Action for the AssumeRole operation. */
2929
AssumeRole("sts:AssumeRole"),
3030

31+
/** Action for the AssumeRoleWithSAML operation. */
32+
AssumeRoleWithSAML("sts:AssumeRoleWithSAML"),
33+
3134
/** Action for the AssumeRoleWithWebIdentity operation. */
3235
AssumeRoleWithWebIdentity("sts:AssumeRoleWithWebIdentity"),
3336

37+
/** Action for the DecodeAuthorizationMessage operation. */
38+
DecodeAuthorizationMessage("sts:DecodeAuthorizationMessage"),
39+
3440
/** Action for the GetAccessKeyInfo operation. */
3541
GetAccessKeyInfo("sts:GetAccessKeyInfo"),
3642

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

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,151 @@ public interface AWSSecurityTokenService {
346346
AssumeRoleResult assumeRole(AssumeRoleRequest assumeRoleRequest) throws AmazonClientException,
347347
AmazonServiceException;
348348

349+
/**
350+
* <p>
351+
* Returns a set of temporary security credentials for users who have been
352+
* authenticated via a SAML authentication response. This operation provides
353+
* a mechanism for tying an enterprise identity store or directory to
354+
* role-based AWS access without user-specific credentials or configuration.
355+
* For a comparison of <code>AssumeRoleWithSAML</code> with the other API
356+
* operations that produce temporary credentials, see <a href=
357+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html"
358+
* >Requesting Temporary Security Credentials</a> and <a href=
359+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison"
360+
* >Comparing the AWS STS API operations</a> in the <i>IAM User Guide</i>.
361+
* </p>
362+
* <p>
363+
* The temporary security credentials returned by this operation consist of
364+
* an access key ID, a secret access key, and a security token. Applications
365+
* can use these temporary security credentials to sign calls to AWS
366+
* services.
367+
* </p>
368+
* <p>
369+
* By default, the temporary security credentials created by
370+
* <code>AssumeRoleWithSAML</code> last for one hour. However, you can use
371+
* the optional <code>DurationSeconds</code> parameter to specify the
372+
* duration of your session. Your role session lasts for the duration that
373+
* you specify, or until the time specified in the SAML authentication
374+
* response's <code>SessionNotOnOrAfter</code> value, whichever is shorter.
375+
* You can provide a <code>DurationSeconds</code> value from 900 seconds (15
376+
* minutes) up to the maximum session duration setting for the role. This
377+
* setting can have a value from 1 hour to 12 hours. To learn how to view
378+
* the maximum value for your role, see <a href=
379+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session"
380+
* >View the Maximum Session Duration Setting for a Role</a> in the <i>IAM
381+
* User Guide</i>. The maximum session duration limit applies when you use
382+
* the <code>AssumeRole*</code> API operations or the
383+
* <code>assume-role*</code> CLI commands. However the limit does not apply
384+
* when you use those operations to create a console URL. For more
385+
* information, see <a href=
386+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html"
387+
* >Using IAM Roles</a> in the <i>IAM User Guide</i>.
388+
* </p>
389+
* <p>
390+
* The temporary security credentials created by
391+
* <code>AssumeRoleWithSAML</code> can be used to make API calls to any AWS
392+
* service with the following exception: you cannot call the STS
393+
* <code>GetFederationToken</code> or <code>GetSessionToken</code> API
394+
* operations.
395+
* </p>
396+
* <p>
397+
* (Optional) You can pass inline or managed <a href=
398+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
399+
* >session policies</a> to this operation. You can pass a single JSON
400+
* policy document to use as an inline session policy. You can also specify
401+
* up to 10 managed policies to use as managed session policies. The plain
402+
* text that you use for both inline and managed session policies shouldn't
403+
* exceed 2048 characters. Passing policies to this operation returns new
404+
* temporary credentials. The resulting session's permissions are the
405+
* intersection of the role's identity-based policy and the session
406+
* policies. You can use the role's temporary credentials in subsequent AWS
407+
* API calls to access resources in the account that owns the role. You
408+
* cannot use session policies to grant more permissions than those allowed
409+
* by the identity-based policy of the role that is being assumed. For more
410+
* information, see <a href=
411+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session"
412+
* >Session Policies</a> in the <i>IAM User Guide</i>.
413+
* </p>
414+
* <p>
415+
* Before your application can call <code>AssumeRoleWithSAML</code>, you
416+
* must configure your SAML identity provider (IdP) to issue the claims
417+
* required by AWS. Additionally, you must use AWS Identity and Access
418+
* Management (IAM) to create a SAML provider entity in your AWS account
419+
* that represents your identity provider. You must also create an IAM role
420+
* that specifies this SAML provider in its trust policy.
421+
* </p>
422+
* <p>
423+
* Calling <code>AssumeRoleWithSAML</code> does not require the use of AWS
424+
* security credentials. The identity of the caller is validated by using
425+
* keys in the metadata document that is uploaded for the SAML provider
426+
* entity for your identity provider.
427+
* </p>
428+
* <important>
429+
* <p>
430+
* Calling <code>AssumeRoleWithSAML</code> can result in an entry in your
431+
* AWS CloudTrail logs. The entry includes the value in the
432+
* <code>NameID</code> element of the SAML assertion. We recommend that you
433+
* use a <code>NameIDType</code> that is not associated with any personally
434+
* identifiable information (PII). For example, you could instead use the
435+
* Persistent Identifier (
436+
* <code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).
437+
* </p>
438+
* </important>
439+
* <p>
440+
* For more information, see the following resources:
441+
* </p>
442+
* <ul>
443+
* <li>
444+
* <p>
445+
* <a href=
446+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html"
447+
* >About SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>.
448+
* </p>
449+
* </li>
450+
* <li>
451+
* <p>
452+
* <a href=
453+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html"
454+
* >Creating SAML Identity Providers</a> in the <i>IAM User Guide</i>.
455+
* </p>
456+
* </li>
457+
* <li>
458+
* <p>
459+
* <a href=
460+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html"
461+
* >Configuring a Relying Party and Claims</a> in the <i>IAM User Guide</i>.
462+
* </p>
463+
* </li>
464+
* <li>
465+
* <p>
466+
* <a href=
467+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html"
468+
* >Creating a Role for SAML 2.0 Federation</a> in the <i>IAM User
469+
* Guide</i>.
470+
* </p>
471+
* </li>
472+
* </ul>
473+
*
474+
* @param assumeRoleWithSAMLRequest
475+
* @return assumeRoleWithSAMLResult The response from the AssumeRoleWithSAML
476+
* service method, as returned by AWS Security Token Service.
477+
* @throws MalformedPolicyDocumentException
478+
* @throws PackedPolicyTooLargeException
479+
* @throws IDPRejectedClaimException
480+
* @throws InvalidIdentityTokenException
481+
* @throws ExpiredTokenException
482+
* @throws RegionDisabledException
483+
* @throws AmazonClientException If any internal errors are encountered
484+
* inside the client while attempting to make the request or
485+
* handle the response. For example if a network connection is
486+
* not available.
487+
* @throws AmazonServiceException If an error response is returned by AWS
488+
* Security Token Service indicating either a problem with the
489+
* data in the request, or a server side issue.
490+
*/
491+
AssumeRoleWithSAMLResult assumeRoleWithSAML(AssumeRoleWithSAMLRequest assumeRoleWithSAMLRequest)
492+
throws AmazonClientException, AmazonServiceException;
493+
349494
/**
350495
* <p>
351496
* Returns a set of temporary security credentials for users who have been
@@ -526,6 +671,86 @@ AssumeRoleWithWebIdentityResult assumeRoleWithWebIdentity(
526671
AssumeRoleWithWebIdentityRequest assumeRoleWithWebIdentityRequest)
527672
throws AmazonClientException, AmazonServiceException;
528673

674+
/**
675+
* <p>
676+
* Decodes additional information about the authorization status of a
677+
* request from an encoded message returned in response to an AWS request.
678+
* </p>
679+
* <p>
680+
* For example, if a user is not authorized to perform an operation that he
681+
* or she has requested, the request returns a
682+
* <code>Client.UnauthorizedOperation</code> response (an HTTP 403
683+
* response). Some AWS operations additionally return an encoded message
684+
* that can provide details about this authorization failure.
685+
* </p>
686+
* <note>
687+
* <p>
688+
* Only certain AWS operations return an encoded authorization message. The
689+
* documentation for an individual operation indicates whether that
690+
* operation returns an encoded message in addition to returning an HTTP
691+
* code.
692+
* </p>
693+
* </note>
694+
* <p>
695+
* The message is encoded because the details of the authorization status
696+
* can constitute privileged information that the user who requested the
697+
* operation should not see. To decode an authorization status message, a
698+
* user must be granted permissions via an IAM policy to request the
699+
* <code>DecodeAuthorizationMessage</code> (
700+
* <code>sts:DecodeAuthorizationMessage</code>) action.
701+
* </p>
702+
* <p>
703+
* The decoded message includes the following type of information:
704+
* </p>
705+
* <ul>
706+
* <li>
707+
* <p>
708+
* Whether the request was denied due to an explicit deny or due to the
709+
* absence of an explicit allow. For more information, see <a href=
710+
* "https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow"
711+
* >Determining Whether a Request is Allowed or Denied</a> in the <i>IAM
712+
* User Guide</i>.
713+
* </p>
714+
* </li>
715+
* <li>
716+
* <p>
717+
* The principal who made the request.
718+
* </p>
719+
* </li>
720+
* <li>
721+
* <p>
722+
* The requested action.
723+
* </p>
724+
* </li>
725+
* <li>
726+
* <p>
727+
* The requested resource.
728+
* </p>
729+
* </li>
730+
* <li>
731+
* <p>
732+
* The values of condition keys in the context of the user's request.
733+
* </p>
734+
* </li>
735+
* </ul>
736+
*
737+
* @param decodeAuthorizationMessageRequest
738+
* @return decodeAuthorizationMessageResult The response from the
739+
* DecodeAuthorizationMessage service method, as returned by AWS
740+
* Security Token Service.
741+
* @throws InvalidAuthorizationMessageException
742+
* @throws AmazonClientException If any internal errors are encountered
743+
* inside the client while attempting to make the request or
744+
* handle the response. For example if a network connection is
745+
* not available.
746+
* @throws AmazonServiceException If an error response is returned by AWS
747+
* Security Token Service indicating either a problem with the
748+
* data in the request, or a server side issue.
749+
*/
750+
DecodeAuthorizationMessageResult decodeAuthorizationMessage(
751+
DecodeAuthorizationMessageRequest decodeAuthorizationMessageRequest)
752+
throws AmazonClientException, AmazonServiceException;
753+
529754
/**
530755
* <p>
531756
* Returns the account identifier for the specified access key ID.

0 commit comments

Comments
 (0)