Open L-P opened 1 year ago
After writing all this and submitting it, I'm just realizing this is because the Vault-generated certificate has a key_type of ed25519
which is not accepted by Envoy by default.
So this is not a bug and should probably be a feature request for passing TLS configuration through Consul to Envoy instead.
In the meantime I'll probably just scrap ed25519 and go back to good ol' RSA.
Overview of the Issue
It's not trivial to configure Envoy accepted signatures.
I'm setting up a Nomad cluster, when using Consul Connect with a
sidecar_service
Envoy could not communicate with Consul.This was initially reported as a bug because I'm dumb, I'm leaving it here so people can see how to configure Envoy accepted certificate signatures in the workaround section (though you should use RSA instead).
Reproduction Steps
connect { sidecar_service {} }
.SSLV3_ALERT_HANDSHAKE_FAILURE
Workaround
Use envoy v1.26.0 so you can set
signature_algorithms
intls_params
, when using Nomad this is done by setting theconnect.sidecar_image
andconnect.gateway_image
metas.Copy the entire
boostrap_envoy.json
template from bootstrap_tpl.goIn the template, set the client algorithms in
common_tls_context
with a list that overlaps what Consul uses:In every connect block, override the config.
Envoy TLS configuration should probably be exposed to Consul (which would allow me to enable mTLS but that's another topic).
Consul info for both Client and Server
Client info
``` agent: check_monitors = 0 check_ttls = 1 checks = 10 services = 8 build: prerelease = revision = 5e08e229 version = 1.15.2 version_metadata = consul: acl = disabled known_servers = 3 server = false runtime: arch = amd64 cpu_count = 2 goroutines = 131 max_procs = 2 os = linux version = go1.20.1 serf_lan: coordinate_resets = 0 encrypted = false event_queue = 0 event_time = 33 failed = 0 health_score = 0 intent_queue = 0 left = 0 member_time = 53605 members = 9 query_queue = 0 query_time = 1 ``` ``` connect { enabled = true } tls { defaults { verify_incoming = true verify_outgoing = true ca_file = "…" cert_file = "…" key_file = "…" } grpc { verify_incoming = false } internal_rpc { verify_server_hostname = true } } ```Server info
``` agent: check_monitors = 0 check_ttls = 0 checks = 0 services = 0 build: prerelease = revision = 5e08e229 version = 1.15.2 version_metadata = consul: acl = disabled bootstrap = false known_datacenters = 1 leader = true leader_addr = x.x.x.x:8300 server = true raft: applied_index = 603699 commit_index = 603699 fsm_pending = 0 last_contact = 0 last_log_index = 603699 last_log_term = 71 last_snapshot_index = 589960 last_snapshot_term = 71 latest_configuration = [{Suffrage:Voter ID:ca4accb7-2d7c-7a1a-7683-77ecbdc40ba9 Address:x.x.x.x:8300} {Suffrage:Voter ID:448dde0b-f98a-cf8a-d5b0-82d9aed69dd3 Address:x.x.x.x:8300} {Suffrage:Voter ID:1c78c749-75f9-e266-1ebd-bb7f0da701d1 Address:x.x.x.x:8300}] latest_configuration_index = 0 num_peers = 2 protocol_version = 3 protocol_version_max = 3 protocol_version_min = 0 snapshot_version_max = 1 snapshot_version_min = 0 state = Leader term = 71 runtime: arch = amd64 cpu_count = 2 goroutines = 297 max_procs = 2 os = linux version = go1.20.1 serf_lan: coordinate_resets = 0 encrypted = false event_queue = 0 event_time = 33 failed = 0 health_score = 0 intent_queue = 0 left = 0 member_time = 53605 members = 9 query_queue = 0 query_time = 1 ``` ``` auto_encrypt { allow_tls = true } tls { defaults { verify_incoming = true verify_outgoing = true ca_file = "…" cert_file = "…" key_file = "…" } internal_rpc { verify_server_hostname = true } https { ca_file = "…" cert_file = "…" key_file = "…" verify_incoming = false } } ```Operating system and Environment details
Linux 5.10.0-21-cloud-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
Debian GNU/Linux 11 (bullseye)
deb [arch=amd64] https://apt.releases.hashicorp.com bullseye main
${NOMAD_envoy_version}
isv1.25.1
, I'm guessing this is decided by Consul but could not find where to change it.Log Fragments
Envoy (log_level debug)
consul monitor --log-level trace
Side to side Client Hello and Server Hello: