This repository was archived by the owner on Mar 19, 2024. It is now read-only.
Add fix for when we need to use the system-wide trusted CAs#459
Merged
andrewstucki merged 2 commits intomainfrom Nov 18, 2022
Merged
Add fix for when we need to use the system-wide trusted CAs#459andrewstucki merged 2 commits intomainfrom
andrewstucki merged 2 commits intomainfrom
Conversation
2 tasks
t-eckert
approved these changes
Nov 18, 2022
Contributor
t-eckert
left a comment
There was a problem hiding this comment.
This is a great workaround!
2 tasks
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this PR:
This adds the simplest path for supporting the helm option
externalServer.useSystemRoots. Since the controller always passes in a value to the deployment viaCONSUL_CACERTwhen the controller knows that the Consul connections are served over TLS, we leverage the fact that it's going to write an empty file to disk that the deployment will then try and use as a file.Rather than doing a larger re-write of the deployment code to handle cases in which TLS is configured but no certs are passed in (when you want to validate with system-wide certs), I added some code that handles the invalid certificates being passed in, in which case we just fallback to using the system-wide certs. What this entails is:
CONSUL_CACERTis valid.CONSUL_USE_SSLis set to mark that this still needs to talk over SSLHow I've tested this PR:
Verified this on HCP with
useSystemRoots, with a local consul server node and the self-signed certs that go with it, and with a local node and TLS disabled. These were validated with the changes in hashicorp/consul-k8s#1743.Checklist: