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

imghelper: set AWS_CA_BUNDLE if cert is available #443

Merged

Conversation

sumukhballal
Copy link
Contributor

@sumukhballal sumukhballal commented Jan 23, 2025

Issue number:

If a CA-Bundle is set using a secret mount and present, it will update the SDK to use these certs instead. Also sets the aws variable AWS_CA_BUNDLE if there is a secret mount. The secret mount is created when we pass a CABundle via override using the environment variable BUILDSYS_CACERTS_BUNDLE_OVERRIDE.

Note: I tried setting SSL_CERT_FILE variable instead but it causes the curl utility in aws-kms-pkcs11 to fail.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@sumukhballal sumukhballal force-pushed the set_aws_ca_bundle_cert branch from 5a4fb00 to 60113ea Compare January 23, 2025 05:41
@sumukhballal sumukhballal marked this pull request as ready for review January 23, 2025 05:46
Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try setting CURL_CA_BUNDLE instead to see if that overrides the libcurl default.

(It's the AWS SDK for C++ behavior you're trying to change, not the KMS proxy.)

This looks OK to me; it's a bit rude to clobber an SDK file, but it should be fine for now.

@sumukhballal sumukhballal requested a review from cbgbt January 23, 2025 19:24
@sumukhballal sumukhballal merged commit c4a7b57 into bottlerocket-os:develop Jan 23, 2025
3 checks passed
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.

3 participants