-
Notifications
You must be signed in to change notification settings - Fork 937
Description
Describe the bug
StsWebIdentityCredentialsProvider does not support properties to configure custom STS endpoint (like aws.endpointUrlSTS
and AWS_ENDPOINT_URL_STS
). Due to this problem, StsWebIdentityCredentialsProvider cannot access custom STS endpoint even if it is configured using those properties.
I would think the problem exists in the code below:
https://github.com/aws/aws-sdk-java-v2/blob/master/services/sts/src/main/java/software/amazon/awssdk/services/sts/internal/StsWebIdentityCredentialsProviderFactory.java#L118-L132
Looks like this was fixed in aws-sdk-kotlin aws/aws-sdk-kotlin#1210
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
When setting aws.endpointUrlSTS
or AWS_ENDPOINT_URL_STS
I expect the SDK to use the specified STS URL for fetching credentials.
Current Behavior
It uses the default AWS URL https://sts.region.amazonaws.com/
Reproduction Steps
- Set the AWS_ENDPOINT_URL_STS environment variable to a URL that should be called
- Set AWS_WEB_IDENTITY_TOKEN_FILE to a file containing some JWT
- Set AWS_ROLE_ARN to any valid role ARN
- Use SDK to call any service via STS Web Identity Token
- See that the URL specified above is not used for authentication
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.31.16
JDK version used
17
Operating System and version
Linux