Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUN-2824: Respect the AWS_STS_REGIONAL_ENDPOINTS parameter #131

Merged

Conversation

kangaechu
Copy link
Contributor

@kangaechu kangaechu commented Sep 3, 2024

Closes #110

This modification allows the use of STS regionalized endpoints by specifying the AWS_STS_REGIONAL_ENDPOINTS=regional environment variable.

AWS STS has global and per-region endpoints.
https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

AWS recommends STS regionalized endpoints (AWS_STS_REGIONAL_ENDPOINTS=regional), but defaults to STS global endpoints (AWS_STS_REGIONAL_ENDPOINTS=legacy ).

On August 29, 2024, an AWS STS failure occurred and requests using the STS global endpoints failed. This failure did not affect requests using STS Regionalized endpoints.

image

The current implementation uses AWS SecurityTokenServiceClient when creating sts clients. This method is deprecated and does not read the STS endpoint configuration.
https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/securitytoken/AWSSecurityTokenServiceClient.html#AWSSecurityTokenServiceClient-com.amazonaws.auth.AWSCredentialsProvider-com.amazonaws.ClientConfiguration-

Instead, the AWSsecurityTokenServiceClientBuilder is used to allow the STS endpoint settings to be respected.

This modification allows the use of STS regionalized endpoints by specifying the AWS_STS_REGIONAL_ENDPOINTS=regional environment variable.

AWS STS has global and per-region endpoints.
https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

AWS recommends STS regionalized endpoints (AWS_STS_REGIONAL_ENDPOINTS=regional), but defaults to STS global endpoints (AWS_STS_REGIONAL_ENDPOINTS=legacy ).

On August 29, 2024, an AWS STS failure occurred and requests using the STS global endpoints failed.
This failure did not affect requests using STS Regionalized endpoints.

The current implementation uses AWS SecurityTokenServiceClient when creating sts clients. This method is deprecated and does not read the STS endpoint configuration.

Instead, the AWSsecurityTokenServiceClientBuilder is used to allow the STS endpoint settings to be respected.
@kangaechu
Copy link
Contributor Author

@gschueler Would you review this PR?

@gschueler gschueler changed the title Respect the AWS_STS_REGIONAL_ENDPOINTS parameter RUN-2824: Respect the AWS_STS_REGIONAL_ENDPOINTS parameter Sep 4, 2024
@kangaechu
Copy link
Contributor Author

@gschueler Wolud you merge this PR?

@gschueler gschueler changed the base branch from master to RUN-2824 October 22, 2024 19:47
@gschueler gschueler merged commit 2116eb9 into rundeck-plugins:RUN-2824 Oct 22, 2024
1 check passed
@gschueler gschueler mentioned this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can I set sts endpoint?
2 participants