Skip to content

Conversation

@blairdrummond
Copy link

@blairdrummond blairdrummond commented Oct 28, 2025

Description of changes:

I discovered that the Container Credential Provider options behave differently in aws-sdk-go-v2 compared to in boto when supplying an AWS_CONTAINER_CREDENTIALS_FULL_URI endpoint. In golang, the url is allowed to be any https address, whereas in this library, it is constrained to only allowing the special addresses (loopback and metadata ips for ECS/EKS)

https://github.com/aws/aws-sdk-go-v2/blob/4bd7f5481eebe1c422fa85d1956f7ea34d93cf76/config/resolve_credentials.go#L318

Note: the golang code specifically checks for if scheme == http, however the urllib.parse functionality looked like it would happily yield an empty scheme on a url like www.example.com, whereas in go omitting the scheme is an error. So to be safe I explicitly allow only https, rather than preserving the logic from the go sdk in a more verbatim way

(edit: this is also consistent with aws-sdk-java-v2 and aws-sdk-rust)

@blairdrummond blairdrummond changed the title allow https container-credentials endpoints Allow https container-credentials endpoints Oct 29, 2025
@blairdrummond blairdrummond changed the title Allow https container-credentials endpoints Fix https container-credentials endpoints Oct 30, 2025
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.

1 participant