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

Add TLSConfig for the Vault CA Provider #4800

Closed
ole-lukoe opened this issue Oct 16, 2018 · 4 comments
Closed

Add TLSConfig for the Vault CA Provider #4800

ole-lukoe opened this issue Oct 16, 2018 · 4 comments
Assignees
Labels
theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/enhancement Proposed improvement or new feature

Comments

@ole-lukoe
Copy link

Hello!
There is only Address option in Vault CA provider configuration endpoint. As I can see, when https:// Vault URI used, vaultAPI is trying to establish connection using default http.Client structure. Since our Vault cluster checks clients certificates, I wish to specify certificates for Consul to connect to Vault.
Do you plan to add this feature in next releases?
Thanks in advance.

@banks banks added theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/enhancement Proposed improvement or new feature labels Oct 16, 2018
@banks
Copy link
Member

banks commented Oct 16, 2018

Hey,

Yep you right, thanks for filing this - we'll need to add a way to specify client certificates.

Do you need to use a specific certificate (i.e. different identity/CA from the Consul server's TLS certificate) or would it be enough to just present the server's TLS certificate if one is set?

@ole-lukoe
Copy link
Author

Thank you for the answer. As for me, I think the easiest way is to add three fields like ca_file, key_file, cert_file or so. It will allow to use third-party certificates for communication with Vault. It will also allow to set same certificate files on which Consul communication built (if used) and I would prefer this way to inform provider about my needs.

@rkettelerij
Copy link

rkettelerij commented Nov 29, 2018

The Consul Connect docs currently use `http://localhost:8200' as an example when talking about Vault as a Connect CA. This isn't a proper example since it is highly discouraged to run Vault without TLS. So in order to use Vault realistically as a CA with Connect you'll really need - as already discussed - the following options (from https://www.nomadproject.io/docs/configuration/vault.html):

  • ca_file (string: "") - Specifies an optional path to the CA certificate used for Vault communication. If unspecified, this will fallback to the default system CA bundle, which varies by OS and version.

  • ca_path (string: "") - Specifies an optional path to a folder containing CA certificates to be used for Vault communication. If unspecified, this will fallback to the default system CA bundle, which varies by OS and version.

  • cert_file (string: "") - Specifies the path to the certificate used for Vault communication. If this is set then you need to also set tls_key_file.

  • key_file (string: "") - Specifies the path to the private key used for Vault communication. If this is set then you need to also set cert_file.

  • tls_server_name (string: "") - Specifies an optional string used to set the SNI host when connecting to Vault via TLS.

  • tls_skip_verify (bool: false) - Specifies if SSL peer validation should be enforced.

@banks banks added this to the 1.4.1 milestone Nov 29, 2018
@banks
Copy link
Member

banks commented Nov 29, 2018

Thanks @rkettelerij!

You are quite right and it makes perfect sense to use the same config options nomad does.

@kyhavlov FYI seems like an important one to get in this cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

5 participants