dropping support for envoy 1.18 in consul 1.12 should be listed as a breaking change
Overview of the Issue
Dropping support for a version of Envoy needs to be listed as a breaking change, not under "Improvements".
We're setting up a new Consul cluster with Vault and using Vault as the CA for Consul Connect. We built a fully functional environment in our staging environment, but ran into issues in production because Envoy couldn't get the leaf certs through Consul. After over a day of investigation and research, we discovered that when we revved from Consul 1.11 to 1.12, we broke Consul Connect because support for Envoy 1.18 was dropped. Despite using debug logging, we didn't see any errors about this incompatibility.
Reproduction Steps
Steps to reproduce this issue, eg:
- Install Consul 1.12
- Install Envoy 1.18
- Try to use Envoy as a sidecar proxy
- See Envoy fail to retrieve the leaf certificate with an error that is unrelated to the version mismatch
- Install Consul 1.11, and making no other changes, allowed Envoy to pull leaf certs and Consul Connect performed as expected
Operating system and Environment details
Amazon LInux 2
Log Fragments
May 18 13:33:13 HOSTNAME consul: 2022-05-18T13:33:13.372-0400 [WARN] agent: [core]grpc: Server.Serve failed to complete security handshake from "127.0.0.1:59926": tls: client didn't provide a certificate
May 18 13:33:13 HOSTNAME consul: [2022-05-18 13:33:13.372][7514][warning][config] [bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:101] DeltaAggregatedResources gRPC config stream closed: 14, upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: TLS error: 268436498:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE
Hi @JamieGruener,
Thank you for sharing your experience so that we can do something about it to avoid this frustration for others (in 1.12 and future releases).
I understand that the changelog is one place we may want to intervene. To help me understand if there are other places we may consider intervening, can you share what documentation (if any) you followed as a part of this upgrade? And were there any other pain points you had when using those docs (if any) to assist your upgrade process?
If it's easier, you can also email me at the address in my profile and we can schedule a quick Zoom chat about the upgrade experience.
We're actively looking into updating the 1.12.0 changelog to show these Envoy version support changes in the "Breaking Changes" section instead of "Improvements". Thanks for helping to make this better for everyone.
Separate from the changelog, there may be other improvements to our upgrade docs to consider here (which is why I posed the questions in my previous comment).
There might be other places, I'm not sure. In our case we were not so much "upgrading" as "using the new version in a fresh deployment". Had we been doing a strict upgrade (swapping binaries in a functioning environment), we likely would have identified this problem immediately.
Thank you for taking up this issue, though! When reviewing the changelog, I really rely on Hashicorp to point out things that will break environments and mostly skim over the many minor changes and improvements, unless I'm looking specifically for something.
Ah, glad I asked! I hadn't considered that you might be doing a fresh install of 1.12 rather than an upgrade. Was there anything you referenced other than the changelog to perform the fresh install?
PR to update the changelog: https://github.com/hashicorp/consul/pull/13207
No. We were building out a new deployment and had been using 1.11.0 in testing. When we went to install in the new deployment I reviewed the changelog for differences between 1.11.0 and 1.12.0 and nothing caught my eye. I'll also note that I didn't see anything in the Consul logs hinting at the incompatibility. Envoy just wouldn't get a leaf cert. After installing Consul 1.11.0, and making no other changes, the sidecar proxies and ingress gateways got leaf certs immediately.
FWIW, I wanted to go with 1.12.0 because it supports AWS auth to Vault (but not IAM auth, unfortunately, though I didn't discover that until later), and that extra piece was going to be useful (if it worked, which it doesn't).
I'll also note that I didn't see anything in the Consul logs hinting at the incompatibility.
I'll log an issue to investigate whether it's possible to notify of an incompatibility. That's a good call-out.
FWIW, I wanted to go with 1.12.0 because it supports AWS auth to Vault (but not IAM auth, unfortunately, though I didn't discover that until later), and that extra piece was going to be useful (if it worked, which it doesn't).
Does that seem related to this issue (with PR in review)? Or is it a separate issue?
Thanks @JamieGruener!
Yes, I think that's it. In other use cases we are authenticating to Vault using the AWS method with the IAM type as described in https://www.vaultproject.io/docs/auth/aws and we would love, love, love to be able to use first-class authentication to Vault from Consul here, too.
To make sure we're on the same page, the Vault client makes a sts:GetCallerIdentity to AWS and uses that, along with the Vault role (which defaults to using the name of the IAM role attached to the IAM profile, but can be defined differently) to login to Vault. As the issue referenced above notes, these "extra params" need to be passed, but aren't supported in 1.12.0 of Consul, so our Consul servers have to use the Vault agent, or Consult-Template to get valid Vault tokens. (Still not entirely sure how all that's going to work, but I'm sure it's doable.)
@JamieGruener : my understanding is that, in Consul 1.12.0, you'd have to add the extra iam_* parameters yourself to the Consul Connect Vault CA config's AuthMethod.Params field, which is then passed through to the Vault API call. I could be overlooking something though - I'm not super familiar with this particular functionality.
The Vault agent doesn't require explicitly including those extra iam_* parameters in its configuration, which is a better integration that we want to also provide in Consul (as in the aforementioned PR).
That's the thing. Adding the extra parameters isn't sufficient because Consul 1.12.0 doesn't know how to perform the sts:GetCallerIdentity call (a.k.a., "the right login dance") to retrieve the signed response from AWS. In our testing, providing the parameters doesn't cause Consul to make the call and the resulting Vault login is with the default policy. Or maybe we're doing it wrong? I can't find any examples and what I do find are tickets like the one above for fixing it. :)