Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Consul Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-consul-knowledge-patch-nevaberry-plugins)
---
name: consul-knowledge-patch
description: HashiCorp Consul
version: "2.1.0"
license: MIT
metadata:
author: Nevaberry
---
# HashiCorp Consul Knowledge Patch
Use this skill when upgrading, configuring, or operating Consul agents,
service discovery, service mesh, gateways, and Enterprise integrations.
Load the relevant reference for commands, defaults, and product-specific scope.
## Reference index
| Reference | Topics |
| --- | --- |
| [Upgrades and Lifecycle](references/upgrades-and-lifecycle.md) | Upgrade paths, support, licensing, FIPS, Envoy compatibility, Autopilot, protocol and WAN rollouts, Go toolchains |
| [Discovery and Networking](references/discovery-and-networking.md) | Multi-port catalog discovery, health checks, peered objects, IPv6, traffic redirection, proxy DNS, API Gateway DNS, SRV auto-join |
| [Operations and Telemetry](references/operations-and-telemetry.md) | Request limits, KV validation, HTTP timeouts, cache behavior, Raft, RPC rate limits, feature gates, ESM, usage metrics, audit logging, UI |
| [Platforms, Identity, and Storage](references/platforms-identity-and-storage.md) | Kubernetes, OpenShift, containers, snapshots, OIDC, JWT, workload OAuth, ACL requirements, certificate authorities, TLS curves, SPIFFE |
| [Service Mesh and Gateways](references/service-mesh-and-gateways.md) | Named-port routing, gateway routes and TLS, health checks, certificates, headers, intentions, inference gateways, credential injection |
## Compatibility and security changes
### ACL permissions for proxy configuration
Writing a `service-defaults` entry with `builtin/lua` or `builtin/wasm`, or
`envoy_listener_json` or `envoy_cluster_json` in `UpstreamConfig` defaults or
overrides, requires `mesh:write` in addition to `service:write`.
Registering a `connect-proxy` sidecar requires the same permissions when
the override keys listed in the identity reference appear in `Proxy.Config`
or `Proxy.Upstreams[*].Config`, with case-insensitive matching.
In Enterprise, this requirement also covers Go field-name spellings such as
`EnvoyListenerJSON` and Unicode case-folded override-key spellings.
Enterprise `GET /v1/agent/connect/ca/leaf/:service` requires `service:write`
on the requested service for every request, including cache hits; otherwise
it returns HTTP 403. Updating an existing health check via `Catalog.Register`
in Enterprise requires write permission on the node or service owning it.
### HTTP request bodies and connection limits
These agent endpoints cap bodies at 512 KiB before JSON decoding and return
HTTP 413 for larger bodies, including chunked and `Content-Length` requests:
- `PUT /v1/agent/check/update/:id`
- `PUT /v1/agent/check/register`
- `PUT /v1/agent/service/register`
- `POST /v1/agent/connect/authorize`
The 512 KiB default also applies across Enterprise agent HTTP and Resource
APIs, including `/v1/config` writes and requests using unsupported methods.
`limits.http_max_request_body_size` raises the Enterprise cap.
Enterprise chunked KV writes enforce `kv_max_value_size`.
External gRPC and gRPC-TLS listeners default to 100 concurrent TCP connections
per source IP; change this with `limits.grpc_max_conns_per_client`.
The gRPC handshake timeout drops from 120 seconds to 20 seconds.
`RPCMaxHeaderBytes` defaults to 512 bytes and applies only to RPC headers,
before decoding; oversized headers close the connection. Each header read
uses `RPCHandshakeTimeout` as its deadline.
### Transparent proxy traffic redirection
`consul connect redirect-traffic`, Consul container images, and `sdk/nftables`
use `nft` with stateful NAT in `inet` chains for IPv4 and IPv6. This requires
Linux 5.2 or a kernel with the feature backported.
Before running the command during an in-place host or VM upgrade, remove old
Consul-managed `iptables` and `ip6tables` rules, update image scripts to use
`nft`, and specify exclusions as numeric UIDs and outbound IP addresses or CIDRs.
### Enterprise licensing and FIPS migration
When upgrading to Consul `1.21.7+ent` or later with the updated license,
upgrade servers first, then clients, and set both licenses to `enterprise-standard`.
Restart servers one at a time while clients retain their existing license,
then restart clients to load the new license.
Enterprise FIPS metadata changes from `+ent.fips1402` to `+ent.fips1403`,
and package and container artifact names use `F3` instead of `F2`.
Update pipelines pinning those names or version strings. FIPS 140-2 and
140-3 agents can coexist in one cluster during a rolling upgrade.
### Platform and request behavior changes
On OpenShift 4.19 and later, migrate existing Consul API Gateway resources
using Kubernetes Gateway API `v1alpha` types to the new types in the
`consul.hashicorp.com` API group.
KV key-name validation is enabled by default and can reject previously
accepted keys; `DisableKVKeyValidation` controls skipping that check.
The KV endpoint also applies stricter HTTP `Content-Length` validation.
The event endpoint rejects requests whose `Content-Length` exceeds its limit.
`Catalog.Deregister` rejects non-default `PeerName` values; peering removes
peer-imported catalog objects through Consul's peering subsystem.
API Gateway and terminating gateway HTTP listeners normalize paths before
Layer 7 intentions. Custom HTTP Connection Manager filter chains supplied
through `envoy_public_listener_json` also receive inbound path normalization;
the mesh setting `InsecureDisablePathNormalization` disables this default.
Connect strips `x-forwarded-client-cert` from inbound HTTP requests before
forwarding to local services. Connect sidecars add `X-Forwarded-Client-Cert`
to inbound gRPC requests forwarded to the local service.
## Upgrade operations
For standard upgrades, plan jumps of at most two major releases; eligible
Enterprise LTS paths can skip up to three release increments.
For WAN federation, finish the primary datacenter's servers and clients before
repeating that sequence in each secondary. Within a datacenter, upgrade
followers before the leader, waiting for each server to rejoin with the new build.
Install target-compatible Envoy on clients running sidecars or gateways.
Stop the client agent before its proxies; start the upgraded client before
the proxies. If Envoy is compatible with both Consul versions, it can stay
in place during rollout. `GET /v1/agent/self` reports supported Envoy versions.
Enterprise automated upgrades default to enabled (`DisableUpgradeMigration = false`).
For a compatible upgrade, replacements join as non-voters until they can form
a quorum. Autopilot promotes them, demotes old followers, transfers leadership
to a replacement, then demotes the former leader. Verify the replacement leader
and `Voter=false` on every old server before running `consul leave` on each.
For same-version server replacement, `UpgradeVersionTag` selects a `node_meta`
key whose values are semantic versions in `X`, `X.Y`, or `X.Y.Z` form.
See the lifecycle reference for two-phase protocol changes, exact Autopilot
commands, ACL token restoration, and secondary-datacenter ACL replication checks.
## Discovery and named-port routing
The optional service-definition `ports` field registers multiple catalog ports.
Kubernetes Service sync registers multi-port Services; Consul DNS selects a
specific service port through its `port` field.
Use one address family per datacenter. IPv4 and IPv6 are supported on VMs and
Kubernetes; use IPv4 on OpenShift, Nomad, and ECS.
Enterprise sidecars advertise named ports with `proxy.local_service_ports`;
upstreams select one with `proxy.upstreams[].destination_port`.
Direct-mode applications dial `localhost:<bind-port>`; transparent proxies can
dial `<port-name>.<service>.virtual.consul`, such as `grpc.payments.virtual.consul`.
For Enterprise multiport services with a `service-router`, `service-splitter`,
or `service-resolver`, upstreams targeting the default or omitted port follow
the configured discovery chain. Upstreams selecting another named port connect
directly to that port on the root service. Enterprise peered upstreams can
also use `destination_port`.
The proxy serves virtual-IP DNS on UDP `127.0.0.1:8653` for reachable explicit,
intention-allowed transparent, and peered upstreams. With agent DNS recursors,
it forwards DNS queries to them via UDP `127.0.0.1:8654`.
API Gateway services resolve as `<service>.api-gateway.consul`; existing gateways
receive automatic DNS-registration backfill after all servers upgrade.
## Gateway routing, TLS, and upstream health
After all servers in a datacenter upgrade, enable the experimental
`api-gateway-upstream-routing` gate to compose `HTTPRoute` matches with
`service-router` rules, preserve resolver subsets, and use the route's HTTP
protocol for discovery-chain watches. The gate defaults to disabled; changing
its effective value rebuilds existing agentless API Gateway proxy state.
See the operations reference for feature-gate commands, APIs, and ACL permissions.
Set `Protocol = "http2"` or `Protocol = "grpc"` on an `api-gateway` listener
for HTTP/2 from client through backend. On an `http-route` header match,
`invert = true` matches an absent header or a value failing the configured match.
API Gateway listeners can use an SDS default TLS certificate with HTTP or TCP
route service TLS overrides. An override inherits the listener's SDS cluster
if it omits a cluster; conflicting override mappings are rejected.
`TLS { Enabled = true }` on an `api-gateway` config entry uses its Connect leaf
certificate for downstream TLS, with DNS SANs for gateway service names.
Explicit certificates take precedence for matching SNI names.
Gateway-wide `MaxConnections`, `MaxPendingRequests`, and `MaxConcurrentRequests`
defaults allow per-route-service overrides. `PassiveHealthCheck` in gateway
default upstream limits or a route's per-service limit override configures outlier detection.
Connect sidecars and terminating gateways receive downstream Connect leaf
certificates and CA roots over SDS; established connections stay open during leaf rotation.
## Identity, snapshots, and operational defaults
OIDC enables PKCE by default and supports JWT client assertions for Consul UI
single sign-on. OIDC and JWT auth methods can name issued ACL tokens using
mapped claim values in `TokenNameFormat`.
For tokens from an `oidc` auth method, logout uses the provider's discovery
`end_session_endpoint` or explicitly configured `OIDCLogoutURL`.
The UI opens it, while `consul logout` prints it or opens it with
`-open-browser` or `CONSUL_LOGOUT_OPEN_BROWSER=true`.
The Enterprise snapshot sidecar on Kubernetes can store backups in Google
Cloud Storage. The Enterprise snapshot agent can authenticate to Azure Blob
Storage with Azure Managed Identity without static storage credentials in its config.
Agent HTTP `read_timeout` and `write_timeout` defaults rise from 30 seconds to
15 minutes so long-polling blocking queries can complete. All four HTTP
timeouts can be overridden in `http_config`; the defaults are:
```hcl
http_config {
read_timeout = "15m"
write_timeout = "15m"
read_header_timeout = "10s"
idle_timeout = "120s"
}
```
Enterprise census metrics collection is always enabled, with configurable export.
Self-managed Enterprise anonymized product usage reporting is disabled by
default and requires opt-in. Reporting preserves export cadence across restarts
and leader re-elections. `GET /v1/operator/usage` uses an eventually consistent
cache, so usage changes can take time to appear.
## Enterprise AI services and credentials
Service definitions accept an `ai` block with roles `inference-model`,
`mcp-server`, and `ai-agent`, including role-specific settings.
Register the `inference-gateway` service kind, configure its entry, and launch
its proxy and policy processor with `consul connect envoy -gateway=inference`.
`-ext-proc-socket-dir` overrides `/var/run/consul`. Allow the gateway to reach
mesh-accessible `inference-model` services through intentions so it can select
models by capability and fail over by priority. See the mesh reference for
external-model pool failure conditions.
A Security Verify OIDC ACL auth method with `EnableServiceDCR = true` dynamically registers
`ai-agent` and `mcp-server` OAuth clients using `private_key_jwt`. Consul manages
key rotation and JWKS publication, delivers credentials to `ai-agent` sidecars
through SDS, and applies outbound on-behalf-of exchange to upstreams of either role.
The mesh reference covers terminating-gateway Vault credential injection and
Unix-domain-socket processors through `builtin/ext-proc` and `Target.Path`.