Interface GetWebIdentityTokenRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<GetWebIdentityTokenRequest.Builder,,GetWebIdentityTokenRequest> SdkBuilder<GetWebIdentityTokenRequest.Builder,,GetWebIdentityTokenRequest> SdkPojo,SdkRequest.Builder,StsRequest.Builder
- Enclosing class:
GetWebIdentityTokenRequest
-
Method Summary
Modifier and TypeMethodDescriptionThe intended recipient of the web identity token.audience(Collection<String> audience) The intended recipient of the web identity token.durationSeconds(Integer durationSeconds) The duration, in seconds, for which the JSON Web Token (JWT) will remain valid.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.One or more OAuth 2.0 scope values to include in the JSON Web Token (JWT).signingAlgorithm(String signingAlgorithm) The cryptographic algorithm to use for signing the JSON Web Token (JWT).subjectMode(String subjectMode) Specifies which identity STS puts in thesub(subject) claim of the JSON Web Token (JWT).subjectMode(WebIdentityTokenSubjectModeType subjectMode) Specifies which identity STS puts in thesub(subject) claim of the JSON Web Token (JWT).tags(Collection<Tag> tags) An optional list of tags to include in the JSON Web Token (JWT).tags(Consumer<Tag.Builder>... tags) An optional list of tags to include in the JSON Web Token (JWT).An optional list of tags to include in the JSON Web Token (JWT).Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFieldsMethods inherited from interface software.amazon.awssdk.services.sts.model.StsRequest.Builder
build
-
Method Details
-
audience
The intended recipient of the web identity token. This value populates the
audclaim 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.- Parameters:
audience- The intended recipient of the web identity token. This value populates theaudclaim 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
audience
The intended recipient of the web identity token. This value populates the
audclaim 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.- Parameters:
audience- The intended recipient of the web identity token. This value populates theaudclaim 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
durationSeconds
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.
- Parameters:
durationSeconds- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithm
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).
- Parameters:
signingAlgorithm- 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).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scope
One or more OAuth 2.0 scope values to include in the JSON Web Token (JWT). Amazon Web Services STS copies the value exactly as you send it into the top-level
scopeclaim of the token. If you don't specifyScope, the token doesn't include ascopeclaim.Separate multiple values with a single space, as defined in RFC 6749, section 3.3 on the IETF website. Don't begin or end
Scopewith a space. Each scope value can contain printable ASCII characters except spaces, double quotation marks ("), commas (,), and backslashes (\).You can't repeat a scope value. Scope values are case sensitive. This means that
readandREADare separate values.You can specify
Scopeonly whenSubjectModeisOriginIdentityand you request exactly one audience. To specifyScope, the calling principal must have permission for thests:SetWebIdentityTokenScopeaction in addition tosts:GetWebIdentityToken. You can use the multivaluedsts:IdentityTokenScopecondition key in a policy to control which scope values a principal can request.- Parameters:
scope- One or more OAuth 2.0 scope values to include in the JSON Web Token (JWT). Amazon Web Services STS copies the value exactly as you send it into the top-levelscopeclaim of the token. If you don't specifyScope, the token doesn't include ascopeclaim.Separate multiple values with a single space, as defined in RFC 6749, section 3.3 on the IETF website. Don't begin or end
Scopewith a space. Each scope value can contain printable ASCII characters except spaces, double quotation marks ("), commas (,), and backslashes (\).You can't repeat a scope value. Scope values are case sensitive. This means that
readandREADare separate values.You can specify
Scopeonly whenSubjectModeisOriginIdentityand you request exactly one audience. To specifyScope, the calling principal must have permission for thests:SetWebIdentityTokenScopeaction in addition tosts:GetWebIdentityToken. You can use the multivaluedsts:IdentityTokenScopecondition key in a policy to control which scope values a principal can request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
subjectMode
Specifies which identity STS puts in the
sub(subject) claim of the JSON Web Token (JWT). Valid values areAWSIdentityandOriginIdentity. If you don't specify a value, Amazon Web Services STS usesAWSIdentity.-
AWSIdentity– Thesubclaim contains the ARN of the calling Amazon Web Services principal. -
OriginIdentity– Thesubclaim contains the value of theaws:OriginIdentity/Subjectkey in the trusted identity propagation context of the calling session. For example, this can identify the human user or workload on whose behalf the calling session acts. Amazon Web Services STS also adds asubject_modeclaim to the token.To use
OriginIdentity, the trusted identity propagation context of the calling session must contain theaws:OriginIdentity/Subjectkey and either theaws:OriginIdentity/Issuerkey or theaws:OriginIdentity/FederatedProviderArnkey. If it doesn't, or if the subject is blank, Amazon Web Services STS rejects the request with a validation error.Amazon Web Services STS denies the request if the subject begins with the text
arn:, in any combination of uppercase and lowercase letters. Amazon Web Services STS also denies the request if the subject begins or ends with a space, or contains a control, format, or separator character other than a space.
You can use the
sts:SubjectModecondition key in a policy to control which subject modes a principal can request.- Parameters:
subjectMode- Specifies which identity STS puts in thesub(subject) claim of the JSON Web Token (JWT). Valid values areAWSIdentityandOriginIdentity. If you don't specify a value, Amazon Web Services STS usesAWSIdentity.-
AWSIdentity– Thesubclaim contains the ARN of the calling Amazon Web Services principal. -
OriginIdentity– Thesubclaim contains the value of theaws:OriginIdentity/Subjectkey in the trusted identity propagation context of the calling session. For example, this can identify the human user or workload on whose behalf the calling session acts. Amazon Web Services STS also adds asubject_modeclaim to the token.To use
OriginIdentity, the trusted identity propagation context of the calling session must contain theaws:OriginIdentity/Subjectkey and either theaws:OriginIdentity/Issuerkey or theaws:OriginIdentity/FederatedProviderArnkey. If it doesn't, or if the subject is blank, Amazon Web Services STS rejects the request with a validation error.Amazon Web Services STS denies the request if the subject begins with the text
arn:, in any combination of uppercase and lowercase letters. Amazon Web Services STS also denies the request if the subject begins or ends with a space, or contains a control, format, or separator character other than a space.
You can use the
sts:SubjectModecondition key in a policy to control which subject modes a principal can request.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
subjectMode
Specifies which identity STS puts in the
sub(subject) claim of the JSON Web Token (JWT). Valid values areAWSIdentityandOriginIdentity. If you don't specify a value, Amazon Web Services STS usesAWSIdentity.-
AWSIdentity– Thesubclaim contains the ARN of the calling Amazon Web Services principal. -
OriginIdentity– Thesubclaim contains the value of theaws:OriginIdentity/Subjectkey in the trusted identity propagation context of the calling session. For example, this can identify the human user or workload on whose behalf the calling session acts. Amazon Web Services STS also adds asubject_modeclaim to the token.To use
OriginIdentity, the trusted identity propagation context of the calling session must contain theaws:OriginIdentity/Subjectkey and either theaws:OriginIdentity/Issuerkey or theaws:OriginIdentity/FederatedProviderArnkey. If it doesn't, or if the subject is blank, Amazon Web Services STS rejects the request with a validation error.Amazon Web Services STS denies the request if the subject begins with the text
arn:, in any combination of uppercase and lowercase letters. Amazon Web Services STS also denies the request if the subject begins or ends with a space, or contains a control, format, or separator character other than a space.
You can use the
sts:SubjectModecondition key in a policy to control which subject modes a principal can request.- Parameters:
subjectMode- Specifies which identity STS puts in thesub(subject) claim of the JSON Web Token (JWT). Valid values areAWSIdentityandOriginIdentity. If you don't specify a value, Amazon Web Services STS usesAWSIdentity.-
AWSIdentity– Thesubclaim contains the ARN of the calling Amazon Web Services principal. -
OriginIdentity– Thesubclaim contains the value of theaws:OriginIdentity/Subjectkey in the trusted identity propagation context of the calling session. For example, this can identify the human user or workload on whose behalf the calling session acts. Amazon Web Services STS also adds asubject_modeclaim to the token.To use
OriginIdentity, the trusted identity propagation context of the calling session must contain theaws:OriginIdentity/Subjectkey and either theaws:OriginIdentity/Issuerkey or theaws:OriginIdentity/FederatedProviderArnkey. If it doesn't, or if the subject is blank, Amazon Web Services STS rejects the request with a validation error.Amazon Web Services STS denies the request if the subject begins with the text
arn:, in any combination of uppercase and lowercase letters. Amazon Web Services STS also denies the request if the subject begins or ends with a space, or contains a control, format, or separator character other than a space.
You can use the
sts:SubjectModecondition key in a policy to control which subject modes a principal can request.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
tags
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.
- Parameters:
tags- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
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.
- Parameters:
tags- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
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.
This is a convenience method that creates an instance of theTag.Builderavoiding the need to create one manually viaTag.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totags(List<Tag>).- Parameters:
tags- a consumer that will call methods onTag.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
GetWebIdentityTokenRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
GetWebIdentityTokenRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-