aws / aws/aws-cli

Additional CA bundles do not apply to requests to `AWS_CONTAINER_CREDENTIALS_FULL_URI`

Open
#9,016 7 comments 26 reactions 0 assignees View on GitHub
cross-sdk feature-request p2
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Problem

If I create a certificate which is not signed by a CA which is embedded in the CA certificate store which ships with the AWS SDK, HTTPS requests to the `AWS_CONTAINER_CREDENTIALS_FULL_URI` endpoint will fail SSL verification because the certificate is not trusted- _even if_ I specify the CA in `AWS_CA_BUNDLE` for the `aws-cli` or manually in the Go v2 SDK via `WithCustomCABundle()`.

### Expected behavior

CA's which are passed in to the AWS SDK configuration should be used to validate HTTPS requests to the endpoint defined by the `AWS_CONTAINER_CREDENTIALS_FULL_URI` variable.

### Additional Details

I've tried this with both the `aws-cli`(Boto3 SDK) via `AWS_CA_BUNDLE` environment variable as well as the [Go v2 SDK](https://github.com/synfinatic/aws-sso-cli/blob/main/cmd/aws-ssl-test/main.go) and neither works. The `aws-cli` will also fail to validate the certificate even when using the `--no-verify-ssl` and/or `--ca-bundle` flags.

### Why this is necessary

I am the developer of [aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) a tool for secure management of IAM role credentials that are issued via AWS Identity Center. I would like to make these user role credentials available by a variety of methods/use cases and emulating the AWS ECS Server credential endpoint is part of that. For security, using SSL/TLS is obviously important, but it is not possible to get a public CA like Let's Encrypt or DigiCert to sign a certificate for `localhost`. Hence the need for the AWS SDK to be able to trust an additional, user managed CA.

Additional information: https://github.com/boto/boto3/issues/4188

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.