Skip to content

Commit 8bb1168

Browse files
author
AWS
committed
AWS Security Token Service Update: IAM now supports outbound identity federation via the STS GetWebIdentityToken API, enabling AWS workloads to securely authenticate with external services using short-lived JSON Web Tokens.
1 parent b1db5c7 commit 8bb1168

File tree

2 files changed

+136
-6
lines changed

2 files changed

+136
-6
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS Security Token Service",
4+
"contributor": "",
5+
"description": "IAM now supports outbound identity federation via the STS GetWebIdentityToken API, enabling AWS workloads to securely authenticate with external services using short-lived JSON Web Tokens."
6+
}

services/sts/src/main/resources/codegen-resources/service-2.json

Lines changed: 130 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,10 @@
153153
},
154154
"errors":[
155155
{"shape":"ExpiredTradeInTokenException"},
156-
{"shape":"RegionDisabledException"}
156+
{"shape":"RegionDisabledException"},
157+
{"shape":"PackedPolicyTooLargeException"}
157158
],
158-
"documentation":"<p>This API is currently unavailable for general use.</p>"
159+
"documentation":"<p>Exchanges a trade-in token for temporary Amazon Web Services credentials with the permissions associated with the assumed principal. This operation allows you to obtain credentials for a specific principal based on a trade-in token, enabling delegation of access to Amazon Web Services resources.</p>"
159160
},
160161
"GetFederationToken":{
161162
"name":"GetFederationToken",
@@ -190,6 +191,24 @@
190191
{"shape":"RegionDisabledException"}
191192
],
192193
"documentation":"<p>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 <code>GetSessionToken</code> if you want to use MFA to protect programmatic calls to specific Amazon Web Services API operations like Amazon EC2 <code>StopInstances</code>.</p> <p>MFA-enabled IAM users must call <code>GetSessionToken</code> 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 <code>GetSessionToken</code> with the other API operations that produce temporary credentials, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html\">Requesting Temporary Security Credentials</a> and <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html\">Compare STS credentials</a> in the <i>IAM User Guide</i>.</p> <note> <p>No permissions are required for users to perform this operation. The purpose of the <code>sts:GetSessionToken</code> operation is to authenticate the user using MFA. You cannot use policies to control authentication operations. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html\">Permissions for GetSessionToken</a> in the <i>IAM User Guide</i>.</p> </note> <p> <b>Session Duration</b> </p> <p>The <code>GetSessionToken</code> 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 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. </p> <p> <b>Permissions</b> </p> <p>The temporary security credentials created by <code>GetSessionToken</code> can be used to make API calls to any Amazon Web Services service with the following exceptions:</p> <ul> <li> <p>You cannot call any IAM API operations unless MFA authentication information is included in the request.</p> </li> <li> <p>You cannot call any STS API <i>except</i> <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p> </li> </ul> <p>The credentials that <code>GetSessionToken</code> 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.</p> <note> <p>Although it is possible to call <code>GetSessionToken</code> using the security credentials of an Amazon Web Services account root user rather than an IAM user, we do not recommend it. If <code>GetSessionToken</code> is called using root user credentials, the temporary credentials have root user permissions. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials\">Safeguard your root user credentials and don't use them for everyday tasks</a> in the <i>IAM User Guide</i> </p> </note> <p>For more information about using <code>GetSessionToken</code> to create temporary credentials, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken\">Temporary Credentials for Users in Untrusted Environments</a> in the <i>IAM User Guide</i>. </p>"
194+
},
195+
"GetWebIdentityToken":{
196+
"name":"GetWebIdentityToken",
197+
"http":{
198+
"method":"POST",
199+
"requestUri":"/"
200+
},
201+
"input":{"shape":"GetWebIdentityTokenRequest"},
202+
"output":{
203+
"shape":"GetWebIdentityTokenResponse",
204+
"resultWrapper":"GetWebIdentityTokenResult"
205+
},
206+
"errors":[
207+
{"shape":"SessionDurationEscalationException"},
208+
{"shape":"OutboundWebIdentityFederationDisabledException"},
209+
{"shape":"JWTPayloadSizeExceededException"}
210+
],
211+
"documentation":"<p>Returns a signed JSON Web Token (JWT) that represents the calling Amazon Web Services identity. The returned JWT can be used to authenticate with external services that support OIDC discovery. The token is signed by Amazon Web Services STS and can be publicly verified using the verification keys published at the issuer's JWKS endpoint.</p>"
193212
}
194213
},
195214
"shapes":{
@@ -539,7 +558,7 @@
539558
"members":{
540559
"message":{"shape":"expiredTradeInTokenExceptionMessage"}
541560
},
542-
"documentation":"<p/>",
561+
"documentation":"<p>The trade-in token provided in the request has expired and can no longer be exchanged for credentials. Request a new token and retry the operation.</p>",
543562
"error":{
544563
"code":"ExpiredTradeInTokenException",
545564
"httpStatusCode":400,
@@ -612,7 +631,7 @@
612631
"members":{
613632
"TradeInToken":{
614633
"shape":"tradeInTokenType",
615-
"documentation":"<p/>"
634+
"documentation":"<p>The token to exchange for temporary Amazon Web Services credentials. This token must be valid and unexpired at the time of the request.</p>"
616635
}
617636
}
618637
},
@@ -622,11 +641,11 @@
622641
"Credentials":{"shape":"Credentials"},
623642
"PackedPolicySize":{
624643
"shape":"nonNegativeIntegerType",
625-
"documentation":"<p/>"
644+
"documentation":"<p>The percentage of the maximum policy size that is used by the session policy. The policy size is calculated as the sum of all the session policies and permission boundaries attached to the session. If the packed size exceeds 100%, the request fails.</p>"
626645
},
627646
"AssumedPrincipal":{
628647
"shape":"arnType",
629-
"documentation":"<p/>"
648+
"documentation":"<p>The Amazon Resource Name (ARN) of the principal that was assumed when obtaining the delegated access token. This ARN identifies the IAM entity whose permissions are granted by the temporary credentials.</p>"
630649
}
631650
}
632651
},
@@ -701,6 +720,44 @@
701720
},
702721
"documentation":"<p>Contains the response to a successful <a>GetSessionToken</a> request, including temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests. </p>"
703722
},
723+
"GetWebIdentityTokenRequest":{
724+
"type":"structure",
725+
"required":[
726+
"Audience",
727+
"SigningAlgorithm"
728+
],
729+
"members":{
730+
"Audience":{
731+
"shape":"webIdentityTokenAudienceListType",
732+
"documentation":"<p>The intended recipient of the web identity token. This value populates the <code>aud</code> claim in the JWT and should identify the service or application that will validate and use the token. The external service should verify this claim to ensure the token was intended for their use.</p>"
733+
},
734+
"DurationSeconds":{
735+
"shape":"webIdentityTokenDurationSecondsType",
736+
"documentation":"<p>The duration, in seconds, for which the JSON Web Token (JWT) will remain valid. The value can range from 60 seconds (1 minute) to 3600 seconds (1 hour). If not specified, the default duration is 300 seconds (5 minutes). The token is designed to be short-lived and should be used for proof of identity, then exchanged for credentials or short-lived tokens in the external service.</p>"
737+
},
738+
"SigningAlgorithm":{
739+
"shape":"jwtAlgorithmType",
740+
"documentation":"<p>The cryptographic algorithm to use for signing the JSON Web Token (JWT). Valid values are RS256 (RSA with SHA-256) and ES384 (ECDSA using P-384 curve with SHA-384). </p>"
741+
},
742+
"Tags":{
743+
"shape":"tagListType",
744+
"documentation":"<p>An optional list of tags to include in the JSON Web Token (JWT). These tags are added as custom claims to the JWT and can be used by the downstream service for authorization decisions. </p>"
745+
}
746+
}
747+
},
748+
"GetWebIdentityTokenResponse":{
749+
"type":"structure",
750+
"members":{
751+
"WebIdentityToken":{
752+
"shape":"webIdentityTokenType",
753+
"documentation":"<p>A signed JSON Web Token (JWT) that represents the caller's Amazon Web Services identity. The token contains standard JWT claims such as subject, audience, expiration time, and additional identity attributes added by STS as custom claims. You can also add your own custom claims to the token by passing tags as request parameters to the <code>GetWebIdentityToken</code> API. The token is signed using the specified signing algorithm and can be verified using the verification keys available at the issuer's JWKS endpoint.</p>"
754+
},
755+
"Expiration":{
756+
"shape":"dateType",
757+
"documentation":"<p>The date and time when the web identity token expires, in UTC. The expiration is determined by adding the <code>DurationSeconds</code> value to the time the token was issued. After this time, the token should no longer be considered valid.</p>"
758+
}
759+
}
760+
},
704761
"IDPCommunicationErrorException":{
705762
"type":"structure",
706763
"members":{
@@ -754,6 +811,19 @@
754811
"exception":true
755812
},
756813
"Issuer":{"type":"string"},
814+
"JWTPayloadSizeExceededException":{
815+
"type":"structure",
816+
"members":{
817+
"message":{"shape":"jwtPayloadSizeExceededException"}
818+
},
819+
"documentation":"<p>The requested token payload size exceeds the maximum allowed size. Reduce the number of request tags included in the <code>GetWebIdentityToken</code> API call to reduce the token payload size.</p>",
820+
"error":{
821+
"code":"JWTPayloadSizeExceededException",
822+
"httpStatusCode":400,
823+
"senderFault":true
824+
},
825+
"exception":true
826+
},
757827
"MalformedPolicyDocumentException":{
758828
"type":"structure",
759829
"members":{
@@ -768,6 +838,19 @@
768838
"exception":true
769839
},
770840
"NameQualifier":{"type":"string"},
841+
"OutboundWebIdentityFederationDisabledException":{
842+
"type":"structure",
843+
"members":{
844+
"message":{"shape":"outboundWebIdentityFederationDisabledException"}
845+
},
846+
"documentation":"<p>The outbound web identity federation feature is not enabled for this account. To use this feature, you must first enable it through the Amazon Web Services Management Console or API.</p>",
847+
"error":{
848+
"code":"OutboundWebIdentityFederationDisabledException",
849+
"httpStatusCode":403,
850+
"senderFault":true
851+
},
852+
"exception":true
853+
},
771854
"PackedPolicyTooLargeException":{
772855
"type":"structure",
773856
"members":{
@@ -835,6 +918,19 @@
835918
"min":4,
836919
"sensitive":true
837920
},
921+
"SessionDurationEscalationException":{
922+
"type":"structure",
923+
"members":{
924+
"message":{"shape":"sessionDurationEscalationException"}
925+
},
926+
"documentation":"<p>The requested token duration would extend the session beyond its original expiration time. You cannot use this operation to extend the lifetime of a session beyond what was granted when the session was originally created.</p>",
927+
"error":{
928+
"code":"SessionDurationEscalationException",
929+
"httpStatusCode":403,
930+
"senderFault":true
931+
},
932+
"exception":true
933+
},
838934
"Subject":{"type":"string"},
839935
"SubjectType":{"type":"string"},
840936
"Tag":{
@@ -924,11 +1020,18 @@
9241020
"idpRejectedClaimMessage":{"type":"string"},
9251021
"invalidAuthorizationMessage":{"type":"string"},
9261022
"invalidIdentityTokenMessage":{"type":"string"},
1023+
"jwtAlgorithmType":{
1024+
"type":"string",
1025+
"max":5,
1026+
"min":5
1027+
},
1028+
"jwtPayloadSizeExceededException":{"type":"string"},
9271029
"malformedPolicyDocumentMessage":{"type":"string"},
9281030
"nonNegativeIntegerType":{
9291031
"type":"integer",
9301032
"min":0
9311033
},
1034+
"outboundWebIdentityFederationDisabledException":{"type":"string"},
9321035
"packedPolicyTooLargeMessage":{"type":"string"},
9331036
"policyDescriptorListType":{
9341037
"type":"list",
@@ -952,6 +1055,7 @@
9521055
"min":9,
9531056
"pattern":"[\\w+=/:,.@-]*"
9541057
},
1058+
"sessionDurationEscalationException":{"type":"string"},
9551059
"sessionPolicyDocumentType":{
9561060
"type":"string",
9571061
"max":2048,
@@ -1018,6 +1122,26 @@
10181122
"type":"string",
10191123
"max":255,
10201124
"min":6
1125+
},
1126+
"webIdentityTokenAudienceListType":{
1127+
"type":"list",
1128+
"member":{"shape":"webIdentityTokenAudienceStringType"},
1129+
"max":10,
1130+
"min":1
1131+
},
1132+
"webIdentityTokenAudienceStringType":{
1133+
"type":"string",
1134+
"max":1000,
1135+
"min":1
1136+
},
1137+
"webIdentityTokenDurationSecondsType":{
1138+
"type":"integer",
1139+
"max":3600,
1140+
"min":60
1141+
},
1142+
"webIdentityTokenType":{
1143+
"type":"string",
1144+
"sensitive":true
10211145
}
10221146
},
10231147
"documentation":"<fullname>Security Token Service</fullname> <p>Security Token Service (STS) enables you to request temporary, limited-privilege credentials for users. This guide provides descriptions of the STS API. For more information about using this service, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html\">Temporary Security Credentials</a>.</p>"

0 commit comments

Comments
 (0)