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

consul connect envoy should have the ability to inline the TLS certificates necessary for gRPC #6360

Closed
mkeeler opened this issue Aug 20, 2019 · 3 comments
Assignees
Labels
theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/enhancement Proposed improvement or new feature
Milestone

Comments

@mkeeler
Copy link
Member

mkeeler commented Aug 20, 2019

Overview of the Issue

I want to run Envoy within a container and provide it the bootstrap configuration generated in the container/machine that the Consul agent managing it resides. When HTTPs is enabled TLS also gets enabled for the gRPC connection. Therefore the bootstrap configuration also needs to setup TLS. Right now it inserts the path to the CA certificate file on disk. This path is only valid on the agent itself. Envoy supports inlining the PEM files I think that the CLI should read the ca file and dump the pem into the bootstrap config instead of providing the path.

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Run a consul agent on the host with HTTPs enabled.
  2. Run consul connect envoy -bootstrap <other args>. Either set the env vars so that the CLI will know TLS should be used or manually set the gRPC addr to https://<consul agent ip>:<consul agent grpc port>
  3. Run an envoy container, map in the bootstrap config.

Envoy will not be able to validate the TLS cert because its filesystem doesn't contain the path where we told it the CA cert lives.

@mkeeler mkeeler modified the milestones: 1.6.1, 1.6.x Aug 20, 2019
@pearkes pearkes added type/enhancement Proposed improvement or new feature theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies labels Aug 21, 2019
@hanshasselberg hanshasselberg self-assigned this Nov 20, 2019
@hanshasselberg
Copy link
Member

hanshasselberg commented Nov 20, 2019

I did some digging and what I think we need to do is to use inline_bytes instead of filename in command/connect/envoy/bootstrap_tpl.go:

"tls_context": {
  "common_tls_context": {
    "validation_context": {
      "trusted_ca": {
        "filename": "{{ .AgentCAFile }}"
      }
    }
  }
}

@hanshasselberg
Copy link
Member

Done.

@ghost
Copy link

ghost commented Jan 25, 2020

Hey there,

This issue has been automatically locked because it is closed and there hasn't been any activity for at least 30 days.

If you are still experiencing problems, or still have questions, feel free to open a new one 👍.

@ghost ghost locked and limited conversation to collaborators Jan 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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

3 participants