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 Envoy Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-envoy-knowledge-patch-nevaberry-plugins)
---
name: envoy-knowledge-patch
description: Envoy Proxy
version: "1.40.2"
license: MIT
metadata:
author: Nevaberry
---
# Envoy Proxy compatibility guidance
Load this skill when upgrading Envoy, changing proxy configuration, diagnosing
changed behavior, or implementing extensions. Use the references for detailed
settings, examples, compatibility controls, and source batch attributions.
## Topic index
| Reference | Topics |
| --- | --- |
| [Upgrade and compatibility](references/upgrade-and-compatibility.md) | Build systems, removed extensions and runtime controls, packaging, trust bundles, test migrations |
| [HTTP, routing, and filters](references/http-routing-and-filters.md) | Protocol defaults, matching, rewrites, mirroring, buffering, sessions, compression, external processing, rate limits |
| [Security, authentication, and TLS](references/security-auth-and-tls.md) | OAuth2, JWT, credentials, external authorization, RBAC, TLS, SDS, QUIC authentication |
| [Discovery, DNS, and load balancing](references/discovery-dns-and-load-balancing.md) | DNS resolvers and clusters, dynamic forward proxy, xDS, host selection, ORCA, health checks |
| [Networking and protocol proxies](references/networking-and-proxies.md) | Listeners, namespaces, TCP, UDP, PROXY protocol, QUIC, reverse tunnels, draining |
| [Data and protocol-aware filters](references/data-and-protocol-filters.md) | GeoIP, Redis, Valkey, PostgreSQL, MySQL, transcoding, metadata extraction, MCP, AI Protocol Manager |
| [Extensions and programmability](references/extensions-and-programmability.md) | Wasm, Lua, Go, dynamic-module SDKs, filter state, CEL, extension APIs, Istio |
| [Observability and operations](references/observability-and-operations.md) | Access logs, tracing, statistics, workers, overload, resource monitors, admin, validation |
## Breaking changes and deprecations
### Build migration
Envoy 1.40.0 removes `WORKSPACE` and publishes `envoy`, `envoy_api`, and
`envoy-docs` as Bazel modules. Migrate downstream builds to `MODULE.bazel` and
configure this registry alongside the Bazel Central Registry:
```text
common --registry=https://raw.githubusercontent.com/envoyproxy/bazel-registry
```
The hermetic toolchain moves from LLVM/Clang 18 to 22 and defaults to Clang
with libc++. Drop `--config=clang`, `--config=clang-local`,
`--@envoy//bazel:libc++`, `--@envoy//bazel:libstdc++`, and the `force_libcpp`
define. Select GCC with `--config=gcc` or see `bazel/tests/codeql` for host
LLVM builds.
Select the Wasm engine with `--@proxy-wasm-cpp-host//bazel:engine=<engine>`.
Builds fail if they still pass `--define wasm=` or `--define engine=`.
Envoy 1.40.0 removes AWS-LC as a build option, including
`--config=aws-lc-fips`. Use `--config=openssl` for ppc64le builds.
OpenSSL builds disable QUIC and HTTP/3 and are excluded by the project's
security policy.
### Configuration and extension migrations
- RFC1918 source addresses require explicit `internal_address_config` to be
treated as internal.
- Move existing GeoIP ASN database paths from `isp_db_path` to `asn_db_path`.
The new `isp_db_path` points to an ISP database.
- DNS-related `Cluster` fields for strict and logical DNS clusters are
deprecated. Configure `cluster_type.typed_config` with a `DnsCluster`.
- Remove OpenCensus tracer configuration and references to
`grpc_credentials/aws_iam`; those extensions have been removed. The contrib
Squash HTTP filter has also been removed.
- `enforce_rsa_key_usage` is deprecated and ignored. TLS always enforces the
`keyUsage` extension when an RSA peer certificate specifies it.
- Replace JSON-array arguments in route-header metadata formatters with
colon-delimited paths such as `%DYNAMIC_METADATA(example.namespace:key)%`.
Migrate `%PER_REQUEST_STATE(key)%` to `%FILTER_STATE(key:PLAIN)%`.
- HTTP callbacks and stream info return `OptRef<const T>` from `route()`,
`clusterInfo()`, and `virtualHost()`. Use `routeSharedPtr()`,
`clusterInfoSharedPtr()`, or `virtualHostSharedPtr()` when retaining ownership.
- Rust `HttpFilter` hooks switch from `&mut self` to `&self` in 1.40.0.
Update signatures and give mutable per-stream state interior mutability.
Remove retired runtime overrides listed in
[Upgrade and compatibility](references/upgrade-and-compatibility.md).
The references retain earlier temporary fallbacks with their batch attribution
and record subsequent removals.
### Required TCP early-data configuration
The TCP proxy rejects configurations omitting `max_early_data_bytes` when
`upstream_connect_mode` is `ON_DOWNSTREAM_DATA` or
`ON_DOWNSTREAM_TLS_HANDSHAKE`. Explicit zero delays the upstream connection
with early-data buffering disabled:
```yaml
upstream_connect_mode: ON_DOWNSTREAM_TLS_HANDSHAKE
max_early_data_bytes: 0
```
### MCP backend header forwarding
By default, the MCP router withholds downstream headers, including
`authorization`, from backends. Configure forwarding per backend; this
restores forwarding of every header:
```yaml
header_forwarding:
forward_all: true
```
## Authentication and TLS
An explicit `timeout: 0s` waits indefinitely in the HTTP external-authorization
filter and the HTTP rate-limit filter. Set a positive duration to bound the call.
HTTP authorization service `path_override` replaces the entire path and
cannot be configured with `path_prefix`.
OAuth2 access, ID, and refresh token cookies are encrypted by default.
Use `disable_token_encryption: true` to opt out. For AES-GCM migration, first
ensure all instances can read GCM cookies; then enable
`envoy.reloadable_features.oauth2_use_gcm_encryption` (default `false`).
After `oauth_legacy_cbc_decrypt` stops incrementing, set
`envoy.reloadable_features.oauth2_legacy_cbc_decrypt_compat` to `false`
(default `true`) to require GCM and reauthenticate remaining legacy cookies.
OAuth2 `TLS_CLIENT_AUTH` requires the token endpoint cluster to use mTLS;
`token_secret` is optional and ignored in this mode. `PRIVATE_KEY_JWT` uses
a PEM private key from `token_secret` SDS configuration and sends a signed
JWT as `client_assertion`.
JWT `extract_only_without_validation` forwards extracted claims without
verifying the token signature. Treat those claims as untrusted input.
BasicAuth `allow_missing: true` permits absent or non-Basic credentials;
invalid Basic credentials still fail.
The upstream and downstream TLS defaults include `X25519MLKEM768`, including
in FIPS builds. Set `envoy.reloadable_features.pqc_default_ecdh_curves` to
`false` to restore the earlier defaults. HTTP/3 is stable in 1.40.0 for
upstream and downstream use, including the QUIC extensions.
## Routing, processing, and rate limits
`HeaderMatcher` checks separate repeated header entries individually. An
exact matcher for `b` matches separate `x-label: a` and `x-label: b` entries;
a single `x-label: a,b` remains one value. CEL and generic header match
inputs continue to read comma-concatenated values.
`RouteAction.host_rewrite` and `RouteAction.path_rewrite` support substitution
formatting. `RedirectAction.path_rewrite` supports substitution specifiers or
CEL, including in custom response redirect policies. `route_specifiers` at
route configuration, virtual-host, or route scope can refine, drop, or
synthesize a matched route.
The route body buffer limit applies as soon as the route matches, including
buffering by filters before the router. A per-route limit takes precedence
over the virtual host limit. `refresh_cluster_on_retry` reruns route cluster
selection before a retry.
External processing supports HTTP messages as an alternative to gRPC.
Select `FULL_DUPLEX_STREAMED` in `processing_mode` for full-duplex bodies;
`failure_mode_allow: true` can be used with this mode. An unset or `DEFAULT`
header or trailer mode in `mode_override` inherits the configured mode.
`ext_proc` skips local replies when deciding what to send to the processor.
`RateLimitPerRoute.rate_limits` takes precedence over filter-level
`rate_limits`, which replaces `VirtualHost.rate_limits` and
`RouteAction.rate_limits` for descriptor generation. `apply_on_stream_done`
charges the budget at stream completion and supports completion-context
formatters. `HitsAddend.is_negative_hits: true` refunds hits;
`RateLimitDescriptor.is_negative_hits` refunds one descriptor.
Set a local rate-limit token bucket's `max_tokens: 0` to reject every request
evaluated against it, including wildcard descriptors. This skips the 50 ms
minimum fill interval check.
## Discovery and host selection
Dynamic forward proxy DNS caches inherit bootstrap `typed_dns_resolver_config`
when their resolver is unspecified. `dns_query_timeout: 0s` uses the resolver's
timeout; `disable_dns_refresh_on_failure: true` treats failed hosts as cache
misses and stops refreshing failures. `resolved_address_filter` drops
resolved addresses in configured CIDR ranges.
Identical c-ares resolver configurations share a resolver by default.
A positive `CaresDnsResolverConfig.qcache_max_ttl` enables query caching.
Use `DnsCluster.dns_min_refresh_rate` with `respect_dns_ttl: true` to set a
floor on TTL-derived refresh intervals.
`client_side_weighted_round_robin` can enable out-of-band ORCA reporting with
`enable_oob_load_report: true`. `load_aware_locality` selects localities by
available capacity derived from ORCA reports. `per_worker_subset` sizes each
worker's host pool independently of cluster size.
## Observability and operations
The JSON formatter sorts properties and preserves types; `sort_properties`
is ignored and durations are numeric. Metadata formatters serialize `NaN`
as `null` and `Infinity` as `inf`. `%TYPED_CEL%` preserves typed results in
formats supporting typed values.
Use `%UPSTREAM_TRANSPORT_FAILURE_REASON%` to diagnose upstream transport
failures; downstream HTTP response bodies omit those reasons by default.
`%UPSTREAM_HOSTS_ATTEMPTED%` and `%UPSTREAM_CONNECTION_IDS_ATTEMPTED%` record
upstream attempts. `COMMON_DURATION` supports HTTP `DS_CX_BEG` and
`DS_CX_END`; the end time is populated only for requests active when the
downstream connection closes.
The OpenTelemetry tracer honors the request-entry tracing decision,
including `overall_sampling`, even when `traceparent` or its sampler would
sample. The OTLP statistics sink supports `http_service` for HTTP export
and `max_data_points_per_request` to split metric requests.
Prometheus native histogram bucket-index corrections can raise reported
quantiles after upgrading because observations enter the correct ranges.
See the observability reference for affected versions and export settings.
## Programmability and protocol filters
With a Wasm ABI newer than `0.2.1`, modifying request headers leaves the cached
route in use. Call `clear_route_cache` when those changes require a fresh
lookup. Lua scripts can call `clearRouteCache()` after changing a routing
header; `clear_route_cache` controls automatic clearing in the Lua filter.
Remote dynamic-module binaries use SHA-256 verification and digest-based
caching. A failed fetch during listener initialization leaves the filter
uninstalled, allowing traffic through. Use `nack_on_cache_miss` for ECDS or
per-route configurations to reject an uncached update and start the fetch
in the background. Rust getters for load balancer, listener, and network
filters return borrowed `EnvoyBuffer` values; copy data before retaining it
beyond the buffer lifetime.
The MCP router aggregates discovery responses and routes `tools/call` by
tool-name prefix. `lazy_initialization` answers `initialize` immediately
and initializes each backend on its first routed request. The MCP JSON REST
bridge is a work in progress. AI Protocol Manager is an alpha filter that
extracts response token usage into `envoy.data.ai.v3.TokenUsage` metadata.