Skip to main content

How Do You Turn On Post-Quantum TLS in Consul 2.1? Part 2: A Step-by-Step Guide

Enable X25519MLKEM768 hybrid key exchange in Consul 2.1 in 6 steps: inventory, upgrade, mesh TLS, agent TLS, verify the negotiated group, and roll back safely.
consul

n December 2026, NSA's Immediate Actions to Push Toward Post-Quantum advisory urged operators to "apply the update in a test environment where possible, prior to production." Then, it said, configure the product so it doesn't leave "non-PQC defaults in place." This guide does exactly that for Consul 2.1.

Part 1 explained why Consul added hybrid post-quantum key exchange and how it maps to the advisory. Here, you'll enable X25519MLKEM768 on service mesh and agent TLS, check that connections actually negotiate it, and learn how to roll back without turning TLS off.

Here's a quick recap of the threat. mTLS proves who's on each end of a connection. But with classical key exchange, anyone who records that traffic today could decrypt it once a cryptographically relevant quantum computer exists. Hybrid key exchange closes that gap on mesh and agent paths, including agent-to-tool and agent-to-model calls between mesh services. It only works when both endpoints negotiate the hybrid group. Most of this guide is about making sure they do.

Key Takeaways

  • Set both the minimum and maximum TLS version to TLSv1_3 in both mesh directions.

  • Offer ["X25519MLKEM768", "X25519"]. RFC 10024 defines the hybrid group (IETF, 2026).

  • Configure mesh and agent TLS separately.

  • Fallback to X25519 gives no hybrid protection. Check fresh-handshake counters.

  • Roll back with explicit classical lists, never empty fields.

»What do you need before you start?

In 2026, Consul 2.1 accepts five key-exchange group names: X25519MLKEM768, X25519, P-256, P-384, and P-521 (Consul docs, Configure post-quantum TLS). An accepted name doesn't mean every component supports it. Check these requirements first.

  • Consul 2.1 or later on every server and client agent. Check the Build column in consul members.

  • A working TLS deployment. This guide doesn't move plaintext traffic to TLS. Start with agent mTLS and secure service mesh if you need to.

  • TLS 1.3 on every peer that must connect after you raise the minimum.

  • Envoy builds that recognize X25519MLKEM768, including the Envoy inside Consul Dataplane. Check the Consul and Envoy compatibility page.

  • On Kubernetes: a Helm chart, controller, and Mesh CRD that expose ecdhCurves.

  • ACL permissions: mesh:write or operator:write to update the mesh entry.

  • A diagnostic client: OpenSSL 3.5 or later for agent HTTPS checks.

In integration testing, X25519MLKEM768 worked with Envoy 1.37.6, 1.38.4, and 1.39.1, and with the FIPS builds 1.38.4+fips1403 and 1.39.1+fips1403, with no xDS rejections. Note that Consul's xDS server refuses Envoy 1.36 and older before it sends any TLS configuration at all.

On Kubernetes, confirm the installed CRD has the new fields:

$ kubectl explain mesh.spec.tls.incoming.ecdhCurves
$ kubectl explain mesh.spec.tls.outgoing.ecdhCurves

If either command fails, upgrade the chart, controller, and CRDs first. Upgrading the Consul server image alone isn't enough. Follow the Kubernetes compatibility guidance.

Consul 2.1 supports five TLS key-exchange groups, including the hybrid X25519MLKEM768 (Consul docs, 2026). Before enabling it, confirm every agent runs Consul 2.1, every peer supports TLS 1.3, every Envoy build recognizes the hybrid group, and Kubernetes CRDs expose ecdhCurves.

»Step 1: How do you inventory your TLS surfaces and save a baseline?

In December 2026, NSA listed inventory as action one: record "which algorithms each system uses for key establishment, signatures, and certificates" (NSA, 2026). For Consul, that means capturing your mesh policy, agent TLS settings, and live proxy state before you change anything.

Consul has two policy surfaces. They don't inherit from each other:

consul

Source: HashiCorp, Configure post-quantum TLS, Consul documentation (2026).

Capture the current state:

$ consul members
$ consul config read -kind mesh -name mesh > mesh-baseline.json
$ curl --fail --silent --show-error http://127.0.0.1:19000/config_dump > envoy-config-baseline.json
$ curl --fail --silent --show-error 'http://127.0.0.1:19000/stats?filter=ssl' > envoy-ssl-baseline.txt

Port 19000 is the default Envoy admin port for Consul sidecars. Use yours if it differs, and keep the admin interface on loopback. If consul config read reports that no mesh entry exists, note that. You'll create one later.

Also record these items:

  1. Every agent's tls.defaults plus each internal_rpc, https, and grpc override, including empty strings.

  2. Any explicit TLS 1.2 CipherSuites in the mesh entry. You'll remove them where you raise the minimum to TLS 1.3.

  3. Clients that only support P-256, such as some FIPS-only or native clients. They need P-256 in the list.

  4. On Kubernetes, chart, controller, CRD, and image versions, plus the GitOps source for the Mesh resource.

  5. Error rates, latency, service health, and server quorum, so you can compare later.

The migration guide's inventory section has the full checklist.

NSA's December 2026 advisory makes cryptographic inventory its first action (NSA, 2026). In Consul 2.1, key-exchange policy lives in the mesh configuration entry and agent tls stanzas. Save both, plus Envoy's config_dump and ssl statistics, as your baseline before enabling X25519MLKEM768.

»Step 2: Why upgrade components before you change any policy?

In December 2026, NSA's advisory noted that "many immediate implementations depend on features already available in vendor or product updates" (NSA, 2026). In Consul, that's literal. The ECDHCurves and tls_ecdh_curves fields don't exist before 2.1, and older Envoy builds can't parse the hybrid group name.

Upgrade in this order:

  1. Proxies first. Roll out compatible Envoy or Consul Dataplane builds, where the supported matrix allows it.

  2. Consul servers and client agents. Follow the general upgrade procedure or the Kubernetes upgrade procedure.

  3. Kubernetes chart, controller, and CRDs. Run the kubectl explain checks again.

Don't write the new fields while any server is still on 2.0. Curves written during a mixed-version upgrade can be dropped.

One upgrade consideration: a Consul 2.1 mesh that already has TLSMinVersion = "TLSv1_3" starts offering ["X25519MLKEM768", "X25519"] right after the upgrade, with no configuration change. Agent protocols with a TLS 1.3 minimum and no group list do the same. If a caller only supports P-256, it starts failing. To prevent that, set an explicit list that includes P-256 before you upgrade, or right after.

Why does a classical fallback in the list not save an old Envoy? Because Envoy rejects the whole TLS configuration when it sees a group name it doesn't know. It never gets as far as negotiating. That's why proxy compatibility comes first. The Consul 2.1 upgrade guide covers this in detail.

In Consul 2.1, a mesh with a TLS 1.3 minimum and no explicit group list automatically offers X25519MLKEM768 and X25519 after upgrading (Consul docs, 2026). Upgrade Envoy and Consul Dataplane first, then Consul, then Kubernetes CRDs, so no proxy receives a group name it can't parse.

»Step 3: How do you enable hybrid key exchange for mesh traffic?

In 2026, IETF RFC 10024 defined X25519MLKEM768 for TLS 1.3 only (IETF, RFC 10024, 2026). So the mesh policy needs TLS 1.3 at both ends of every connection. Set TLSMinVersion and TLSMaxVersion to TLSv1_3 in both Incoming and Outgoing, then list the groups.

That maximum matters more than it looks. Consul doesn't raise an unspecified maximum for you. Envoy's upstream (outgoing) side can default to a TLS 1.2 maximum. If you raise the incoming minimum to TLS 1.3 without raising the outgoing maximum, sidecar-to-sidecar connections fail.

consul

Recommended two-stage rollout for the mesh configuration entry.

In our testing, Envoy proxies receive xDS updates in no fixed order. Switching TLS versions in one write briefly left some clients capped at TLS 1.2 while some servers already required TLS 1.3. Raising the outgoing maximum first, then applying the full policy, avoided dropped requests.

»Option A: CLI or API-managed mesh entry

Use check-and-set (CAS) so you never overwrite someone else's change. A write replaces the whole entry, so start from the current one.

Stage 1: raise the outgoing maximum.

$ consul config read -kind mesh -name mesh > mesh-current.json
$ MODIFY_INDEX=$(jq -r '.ModifyIndex' mesh-current.json)
$ jq 'del(.CreateIndex, .ModifyIndex, .Hash)
    | .TLS.Outgoing.TLSMaxVersion = "TLSv1_3"' \
    mesh-current.json > mesh-stage1.json
$ consul config write -cas -modify-index="$MODIFY_INDEX" mesh-stage1.json

Wait until proxies accept the update. Then apply stage 2, the full policy:

$ consul config read -kind mesh -name mesh > mesh-current.json
$ MODIFY_INDEX=$(jq -r '.ModifyIndex' mesh-current.json)
$ jq 'del(.CreateIndex, .ModifyIndex, .Hash)
    | .TLS.Incoming += {"TLSMinVersion":"TLSv1_3","TLSMaxVersion":"TLSv1_3","ECDHCurves":["X25519MLKEM768","X25519"]}
    | .TLS.Outgoing += {"TLSMinVersion":"TLSv1_3","TLSMaxVersion":"TLSv1_3","ECDHCurves":["X25519MLKEM768","X25519"]}
    | del(.TLS.Incoming.CipherSuites, .TLS.Outgoing.CipherSuites)' \
    mesh-current.json > mesh-updated.json
$ consul config write -cas -modify-index="$MODIFY_INDEX" mesh-updated.json

The jq filters keep every unrelated setting, such as transparent proxy and peering options. They also remove explicit TLS 1.2 cipher suites, which Consul rejects alongside a TLS 1.3 minimum. If no mesh entry exists yet, write a complete one with -modify-index=0. If CAS fails, read the entry again and reapply. Don't drop -cas to force it through.

The resulting TLS block looks like this:

Kind = "mesh"
Name = "mesh"

TLS {
  Incoming {
    TLSMinVersion = "TLSv1_3"
    TLSMaxVersion = "TLSv1_3"
    ECDHCurves    = ["X25519MLKEM768", "X25519"]
  }
  Outgoing {
    TLSMinVersion = "TLSv1_3"
    TLSMaxVersion = "TLSv1_3"
    ECDHCurves    = ["X25519MLKEM768", "X25519"]
  }
}

If some callers only support P-256, use ["X25519MLKEM768", "X25519", "P-256"] in both directions. For Consul Enterprise, repeat this in every admin partition you use. Each partition has its own mesh entry. Refer to consul config write for flag details.

»Option B: Kubernetes-managed Mesh resource

If a Mesh resource owns the policy, change it there. A direct consul config write is overwritten the next time the controller reconciles.

apiVersion: consul.hashicorp.com/v1alpha1
kind: Mesh
metadata:
  name: mesh
  namespace: consul # The namespace your Consul controller watches
spec:
  tls:
    incoming:
      tlsMinVersion: TLSv1_3
      tlsMaxVersion: TLSv1_3
      ecdhCurves:
        - X25519MLKEM768
        - X25519
    outgoing:
      tlsMinVersion: TLSv1_3
      tlsMaxVersion: TLSv1_3
      ecdhCurves:
        - X25519MLKEM768
        - X25519

Merge these fields into your existing manifest. Don't replace it. Always set tlsMinVersion whenever you set ecdhCurves, because the CRD validation rules depend on it. Stage the change the same way: first outgoing.tlsMaxVersion, then the full block.

$ kubectl apply --dry-run=server -f mesh.yaml
$ kubectl apply -f mesh.yaml
$ kubectl get mesh mesh --namespace consul

Wait for the SYNCED column to show True. Then check the Consul entry and the Envoy configuration. Admission alone doesn't prove Envoy accepted the change.

RFC 10024 hybrid groups such as X25519MLKEM768 work only in TLS 1.3 (IETF, RFC 10024, 2026). In Consul 2.1, set TLSMinVersion and TLSMaxVersion to TLSv1_3 in both mesh directions. Raise the outgoing maximum first. A TLS 1.3 minimum without that maximum can break sidecar connections.

»Step 4: How do you enable hybrid key exchange for agent TLS?

Since Go 1.24, Go's crypto/tls has enabled X25519MLKEM768 by default when no group preference is set (Go 1.24 release notes, 2025). Consul agents use Go's TLS stack. Consul 2.1 adds tls_ecdh_curves, so you can state the policy explicitly instead of relying on library defaults.

The agent field is a comma-separated string, not a list. Merge it into your existing TLS configuration and keep your CA, certificate, key, and verification settings:

tls {
  defaults {
    tls_min_version = "TLSv1_3"
    tls_ecdh_curves = "X25519MLKEM768,X25519"
  }
}

A protocol-specific value in internal_rpc, https, or grpc overrides defaults. Check all three stanzas. An explicit empty string in a protocol stanza hands group selection back to Go's defaults.

Validate and reload one agent at a time:

$ consul validate /etc/consul.d/
$ consul reload

Reload applies the new policy to new handshakes. Existing connections keep their negotiated group until they close. If you restart servers, preserve quorum and do one at a time.

For Helm-managed servers, merge the same JSON into server.extraConfig in your full values file:

server:
  extraConfig: |
    {
      "tls": {
        "defaults": {
          "tls_min_version": "TLSv1_3",
          "tls_ecdh_curves": "X25519MLKEM768,X25519"
        }
      }
    }

Apply it with a pinned chart version, and follow the Kubernetes rolling update procedure. Only set client.extraConfig if you actually run client agents. Consul Dataplane isn't a client agent.

Consul agents use Go's crypto/tls, which has enabled X25519MLKEM768 by default since Go 1.24 (Go, 2025). Consul 2.1 adds tls_ecdh_curves, a comma-separated string, in tls.defaults and per-protocol stanzas. Set it to "X25519MLKEM768,X25519" with a TLS 1.3 minimum, validate, and reload one agent at a time.

»Step 5: How do you prove connections negotiate X25519MLKEM768?

In 2026, RFC 10024 stated that a hybrid secures the session "as long as at least one of the component algorithms remains secure" (IETF, RFC 10024, 2026). But that only applies if the hybrid group is actually negotiated. A successful request proves nothing about the group. TLS 1.3 proves nothing either. You need evidence from fresh handshakes.

The main gotcha here is silent fallback. A connection that falls back to classical X25519 receives no hybrid protection — it's as exposed to harvest-now-decrypt-later as it was before you started, and fallback doesn't fail or log an error. Make the negotiated group part of your observability: track ssl.curves.X25519MLKEM768 against ssl.curves.X25519 in your metrics pipeline, and alert when classical negotiation shows up on paths you expect to be hybrid.

»Check the mesh: configuration, then counters

First, confirm Envoy has the policy. This prints every distinct TLS parameter block in the proxy:

$ curl --fail --silent --show-error http://127.0.0.1:19000/config_dump \
    | jq -c '[.. | .tls_params? // empty] | unique'

You should see:

[{"tls_minimum_protocol_version":"TLSv1_3","tls_maximum_protocol_version":"TLSv1_3","ecdh_curves":["X25519MLKEM768","X25519"]}]

That proves what Envoy offers. To prove what it negotiated, compare counters before and after new traffic:

$ curl --fail --silent --show-error 'http://127.0.0.1:19000/stats?filter=ssl\.(curves|versions)'

Generate traffic over new connections, then read the stats again. On the target listener and upstream cluster, look for increases in ssl.curves.X25519MLKEM768 and ssl.versions.TLSv1.3. If ssl.curves.X25519 goes up instead, that connection fell back to classical key exchange. Group labels depend on the TLS provider. Consult the Envoy TLS statistics reference for your build.

Is a historical nonzero counter good enough? No. It might predate your change. Connection pooling and session resumption can also hide new handshakes. Drain or reconnect in a controlled way if you need fresh ones.

»Check agent HTTPS with OpenSSL

Connect directly to an agent, not a load balancer. Keep certificate verification on:

$ openssl s_client \
  -connect consul-server-1.example.com:8501 \
  -servername consul-server-1.example.com \
  -verify_hostname consul-server-1.example.com \
  -verify_return_error \
  -CAfile consul-agent-ca.pem \
  -cert client.pem -key client-key.pem \
  -tls1_3 -groups X25519MLKEM768:X25519 \
  -brief </dev/null

Look for TLS 1.3 and X25519MLKEM768 as the negotiated group. OpenSSL labels this differently across versions. Then run it again with -groups X25519 to confirm classical fallback still works. This tests HTTPS only. Internal RPC and gRPC need separate checks.

The full procedure is in Verify negotiated key exchange.

Configuration acceptance doesn't prove hybrid key exchange. In Consul 2.1, verify by comparing Envoy's ssl.curves.X25519MLKEM768 counters before and after fresh connections, and by testing agent HTTPS with OpenSSL 3.5 s_client -groups X25519MLKEM768. An increase in ssl.curves.X25519 means classical fallback (Consul docs, 2026).

»Step 6: How do you expand the rollout and tighten the policy?

NSA's December 2026 advisory asks teams to "deploy live traffic detection tuned to identify weak, legacy cryptography still in use" (NSA, 2026). In a Consul mesh, Envoy's per-listener and per-cluster ssl.curves.X25519 counters do exactly that. They show which paths still fall back to classical key exchange.

Expand in scopes you can observe:

  1. Start with an isolated environment, or one Consul Enterprise admin partition. A mesh entry applies to a whole datacenter or partition. It isn't a per-service canary.

  2. Compare errors, latency, health, membership, and quorum against the baseline from step 1.

  3. Track any path still incrementing ssl.curves.X25519. Find the peer that lacks hybrid support and upgrade it.

  4. Record systems you can't upgrade, such as external gateway listeners or legacy clients, in your PQC mitigation plan.

At some point you may want to go hybrid-only. The advisory says not to leave "non-PQC defaults in place," but the recommended list keeps X25519 so mixed fleets keep working. Once your counters show zero classical fallback across a scope, you can set ECDHCurves = ["X25519MLKEM768"] there — treat it as a separate policy decision, since any peer without hybrid support will then fail its handshake.

In 2026, NSA advised detecting weak cryptography in live traffic (NSA, 2026). In Consul 2.1, Envoy's ssl.curves.X25519 counters reveal which mesh paths still negotiate classical key exchange. Fix those peers, then consider a hybrid-only ECDHCurves list for scopes with no remaining fallback.

»How do you roll back without disabling TLS?

Consul's tls_ecdh_curves reference states that, without an explicit list, a TLS 1.3 minimum "selects X25519MLKEM768,X25519" (Consul docs, agent TLS reference, 2026). So deleting the field doesn't turn hybrid off. It turns the default back on. Roll back by writing an explicit classical list.

Follow this order:

  1. Pause the rollout and stop automation from reapplying the policy.

  2. Keep an overlapping group. If any endpoint is hybrid-only, first move it back to ["X25519MLKEM768", "X25519"]. Otherwise peers could end up with no group in common.

  3. Write explicit classical lists in both mesh directions, keeping TLS 1.3:

    TLS {
    Incoming {
    TLSMinVersion = "TLSv1_3"
    TLSMaxVersion = "TLSv1_3"
    ECDHCurves = ["X25519"]
    }
    Outgoing {
    TLSMinVersion = "TLSv1_3"
    TLSMaxVersion = "TLSv1_3"
    ECDHCurves = ["X25519"]
    }
    }
    hclCopy

  4. Set agents explicitly, in defaults and in each protocol stanza: tls_ecdh_curves = "X25519".

  5. Verify fresh handshakes show X25519, and that Helm or GitOps doesn't reapply the old policy.

Use your approved classical groups if they differ from X25519. Don't delete the mesh entry, restore a snapshot, or run a blanket helm rollback. Those can change far more than key exchange. The rollback guide has the complete procedure, including binary downgrade considerations.

»What should you check when something breaks?

In 2026, Consul's post-quantum TLS docs organized troubleshooting by failure location: proxy configuration, TLS version bounds, or group negotiation (Consul docs, 2026). Start by finding which path fails: mesh inbound, mesh outbound, agent RPC, HTTPS, or gRPC. Then match the symptom.

»Frequently Asked Questions

»Do I need to restart Envoy or my workloads?

No. Mesh changes reach running proxies over xDS. In our testing, that took about one second, with no proxy or workload restarts. Existing connections keep their negotiated group until they close. Agent changes apply after consul reload, and only to new connections. Plan verification around fresh handshakes.

»Does post-quantum TLS slow down my mesh?

The handshake carries more data. RFC 10024 puts the X25519MLKEM768 client share at 1,216 bytes, compared with 32 bytes for X25519 (IETF, 2026). Measure handshake latency and error rates against your step 1 baseline. Long-lived and pooled connections amortize the extra handshake cost.

»Can I enable it for only one service?

Not with the mesh entry. It applies to a whole datacenter, or to an admin partition in Consul Enterprise. Consul 2.1 doesn't offer per-service key-exchange groups. Test in an isolated environment or a dedicated Enterprise partition first. Then expand in observable scopes, comparing against your baseline.

»Does this work with FIPS builds of Consul Enterprise?

Consul Enterprise ships FIPS 140-3 builds, and our testing covered FIPS Envoy builds. RFC 10024 notes that X25519MLKEM768 needs a certified ML-KEM implementation for a FIPS-approved setup. A supported group name doesn't prove compliance. Review your exact modules with your compliance team, using the FIPS deployment guide.

»What about the API gateway and ingress gateway?

External ingress and API gateway TLS listeners don't use the mesh group list. Envoy's defaults apply there. Their mesh-facing upstream connections do use TLS.Outgoing. A mesh gateway passing TCP through doesn't terminate TLS, so the endpoints negotiate the group. Record external listeners in your mitigation plan.

»Conclusion

Turning on post-quantum TLS in Consul 2.1 is a configuration change, not a redesign. That's exactly the kind of quick win NSA's advisory asks for. The care is in the order and the verification.

  • Inventory both policy surfaces and save a baseline.

  • Upgrade proxies, Consul, and CRDs before you write the new fields.

  • Enable mesh TLS in two stages with both TLS bounds at TLSv1_3, then agent TLS.

  • Verify with fresh-handshake counters and OpenSSL, not config alone.

  • Roll back with explicit classical lists, never empty fields.

Missed the background? Part 1 covers the threat model, the NSA advisory, and why Consul 2.1 started with key exchange. For every option, see Configure post-quantum TLS and Migrate to post-quantum TLS.

»Sources

  • National Security Agency, Immediate Actions to Push Toward Post-Quantum (Cybersecurity Advisory PP-26-4956, December 2026, v1.0), retrieved 2026-12-03, https://media.defense.gov/2026/Dec/01/2004039413/-1/-1/0/CSA_Immediate_Actions_Push_Toward_PQC.PDF

  • IETF, RFC 10024: Post-Quantum Traditional (PQ/T) Hybrid Key Agreement Mechanisms for TLS 1.3 (August 2026), retrieved 2026-12-03, https://datatracker.ietf.org/doc/rfc10024/

  • The Go Authors, Go 1.24 Release Notes, retrieved 2026-12-03, https://go.dev/doc/go1.24

  • HashiCorp, Configure post-quantum TLS, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/secure/encryption/post-quantum

  • HashiCorp, Migrate to post-quantum TLS, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/secure/encryption/migrate-post-quantum

  • HashiCorp, Roll back post-quantum TLS, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/secure/encryption/rollback-post-quantum

  • HashiCorp, Upgrade to Consul 2.1.x, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/upgrade/instructions/upgrade-to-2-1-x

  • HashiCorp, Mesh configuration entry reference, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/reference/config-entry/mesh

  • HashiCorp, Agent TLS configuration reference, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/reference/agent/configuration-file/tls

  • HashiCorp, Consul and Envoy compatibility, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/reference/proxy/envoy

  • HashiCorp, Deploy FIPS 140-3 compliant Consul servers, Consul documentation, retrieved 2026-12-03, https://developer.hashicorp.com/consul/docs/deploy/server/fips

  • Envoy Project, TLS statistics, retrieved 2026-12-03, https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/stats#tls-statistics

More posts like this