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)
---
name: envoy-knowledge-patch
description: Envoy Proxy
version: "1.40.2"
license: MIT
metadata:
author: Nevaberry
---
# Envoy Proxy knowledge patch
Load this skill for Envoy configuration upgrades, extension development,
routing, authentication, transport, and operational changes.
Use the topic references for complete details, version-specific behavior,
configuration examples, and temporary compatibility controls.
## Reference index
| Reference | Topics |
| --- | --- |
| [Upgrades, builds, and operations](references/upgrades-build-and-operations.md) | Build migrations, removed extensions and guards, workers, images, trust bundles, admin endpoints |
| [HTTP routing and filters](references/http-routing-and-filters.md) | Parsing, matching, route selection, rewrites, mirroring, sessions, compression, body limits |
| [Authentication and security](references/authentication-and-security.md) | Internal addresses, CSRF, OAuth2, JWT, RBAC, BasicAuth, API keys, AWS and GCP credentials |
| [External processing and authorization](references/external-processing-and-authorization.md) | Processing modes, failures, stream lifetime, authorization services, mutations, shadow decisions |
| [Discovery, DNS, and load balancing](references/discovery-dns-and-load-balancing.md) | DNS resolvers and clusters, forward proxy, xDS, host selection, ORCA, health checks |
| [TLS, QUIC, and networking](references/tls-quic-and-networking.md) | Certificates, TLS inspection, HTTP/3, TCP and UDP sessions, PROXY protocol, reverse tunnels |
| [Application protocols and data filters](references/application-protocols-and-data-filters.md) | MCP, AI Protocol Manager, Redis, Valkey, PostgreSQL, MySQL, GeoIP, transcoding, payload extraction |
| [Extensions, Lua, Wasm, and dynamic modules](references/extensions-lua-wasm-and-modules.md) | API migrations, scripting, module loading, SDKs, callbacks, filter state, module metrics |
| [Observability and formatting](references/observability-and-formatting.md) | Formatters, access logs, tracing, CEL, metric exports, native histograms, tap sampling |
| [Resilience, rate limits, and overload](references/resilience-rate-limits-and-overload.md) | Descriptor precedence, refunds, timeouts, retries, load shedding, resource monitors, heap management |
## Breaking changes and deprecations
### Build migration
Envoy 1.40.0 removes `WORKSPACE`; migrate downstream builds to `MODULE.bazel`.
The published Bazel modules are `envoy`, `envoy_api`, and `envoy-docs`.
Configure the Envoy 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`.
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, including `--config=aws-lc-fips`.
Use `--config=openssl` for ppc64le builds; OpenSSL builds disable QUIC and
HTTP/3 and are excluded from the project's security policy.
### Removed extensions and configuration migrations
Remove OpenCensus tracer configuration and references to `grpc_credentials/aws_iam`;
configurations using the latter fail to load. The contrib Squash HTTP filter
has also been removed. The operations reference lists retired runtime overrides.
DNS-related `Cluster` fields for strict and logical DNS clusters are deprecated;
configure `cluster_type.typed_config` with a `DnsCluster`.
Move existing GeoIP ASN database paths from `isp_db_path` to `asn_db_path`;
`isp_db_path` now identifies an ISP database.
Migrate the deprecated RBAC `metadata` matcher to `sourced_metadata`.
### Address classification and certificate enforcement
RFC1918 source addresses require explicit `internal_address_config` to be
classified as internal. In 1.39.0, `enforce_rsa_key_usage` is deprecated and
ignored: TLS always enforces `keyUsage` when an RSA peer certificate specifies it.
An empty trusted CA file or inline string is rejected during configuration.
### 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`.
An explicit zero delays the upstream connection with early-data buffering disabled:
```yaml
upstream_connect_mode: ON_DOWNSTREAM_TLS_HANDSHAKE
max_early_data_bytes: 0
```
### Matcher and formatter behavior
A `prefix_match_map` tries shorter prefixes when a longer match reaches a
subtree with no action. Give each subtree a 404 `on_no_match` action to make
that miss terminal in configuration.
`HeaderMatcher` checks separate repeated header entries individually; a single
comma-containing entry remains one value. CEL and generic header match inputs
continue reading comma-concatenated values.
The JSON formatter sorts properties and preserves types: `sort_properties`
is ignored and durations are numeric.
Replace JSON-array route-header metadata arguments with colon-delimited paths,
such as `%DYNAMIC_METADATA(example.namespace:key)%`.
Replace `%PER_REQUEST_STATE(key)%` with `%FILTER_STATE(key:PLAIN)%`.
### Extension ownership and hooks
HTTP callbacks and stream info return `OptRef<const T>` from `route()`,
`clusterInfo()`, and `virtualHost()`. Use `routeSharedPtr()`,
`clusterInfoSharedPtr()`, and `virtualHostSharedPtr()` to retain ownership.
In 1.40.0, Rust `HttpFilter` hooks change from `&mut self` to `&self`;
update signatures and give mutable per-stream state interior mutability.
Rust load balancer, listener, and network getters return borrowed `EnvoyBuffer`
values; copy data before storing it beyond the borrowed buffer's lifetime.
## Routing and filter chains
Use `RouteAction.host_rewrite` and `RouteAction.path_rewrite` for substitution
formatting. `RedirectAction.path_rewrite` supports substitution specifiers or CEL.
Configure `route_specifiers` at route configuration, virtual-host, or route
scope to refine, drop, or synthesize the matched route.
`refreshRouteCluster()` refreshes the upstream cluster while retaining the
cached route. `refresh_cluster_on_retry` reruns cluster selection before retries.
The route body buffer limit applies as soon as the route matches, including
buffering before the router; a per-route limit takes precedence over the virtual host.
Use `ExecuteFilterAction.filter_chain` to run multiple filters in a composite
action, or refer to `Composite.named_filter_chains` with `filter_chain_name`.
The HTTP filter chain filter can select a subchain per route.
Shadow requests stream alongside the primary, including bodies above the buffer
limit, and can begin before a later client cancellation. Use
`request_headers_mutations` and mirror-policy `host_rewrite_literal` to alter them.
Set `reject_connect_request_early_data: true` to opt into rejecting CONNECT
requests that send data before the `200` response.
## Authentication and authorization
OAuth2 access, ID, and refresh token cookies are encrypted by default;
`disable_token_encryption: true` opts 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-cookie users.
OAuth2 `TLS_CLIENT_AUTH` requires the token endpoint cluster to use mTLS;
`token_secret` is optional and ignored. `PRIVATE_KEY_JWT` uses a PEM private
key from the `token_secret` SDS configuration to sign a `client_assertion`.
A nonempty `allowed_redirect_domains` list validates hosts in formatted
`redirect_uri`, `original_request_uri`, and the destination decoded from state;
a disallowed host or formatter output that is not an absolute URL returns HTTP 401.
JWT `extract_only_without_validation` forwards claims without signature
verification; treat those claims as untrusted input.
BasicAuth `allow_missing: true` lets absent or non-Basic credentials reach later
filters; invalid Basic credentials still fail.
Upstream HTTP RBAC with `upstream_ip_port` authorizes the selected host before connecting.
## External services and rate limits
External processing supports HTTP messages as an alternative to gRPC and
`FULL_DUPLEX_STREAMED` body mode. `failure_mode_allow: true` works with that mode.
Unexpected processor responses follow `failure_mode_allow`, including per-route overrides.
`status_on_error` chooses the downstream status for terminating processor
communication failures and defaults to `500`.
HTTP authorization `shadow_mode: true` lets requests continue regardless of
the decision; a later filter can enforce the typed `ShadowDecision` in filter state.
An explicit `timeout: 0s` waits indefinitely in HTTP external authorization and
HTTP rate limiting. Set a positive duration to bound the call.
`RateLimitPerRoute.rate_limits` takes precedence over filter-level `rate_limits`,
which replaces `VirtualHost.rate_limits` and `RouteAction.rate_limits` for descriptors.
Use `apply_on_stream_done` for completion-context accounting and formatting.
`HitsAddend.is_negative_hits: true` refunds budget; `RateLimitDescriptor.is_negative_hits`
applies the refund to one descriptor. A local token bucket with `max_tokens: 0`
rejects every request evaluated against it, including wildcard descriptors.
## DNS, host selection, and transport
A positive `CaresDnsResolverConfig.qcache_max_ttl` enables query caching;
identical c-ares resolver configurations share a resolver by default.
Use `DnsCluster.dns_min_refresh_rate` with `respect_dns_ttl: true` for a refresh floor.
Dynamic forward proxy `resolved_address_filter` drops addresses in configured CIDRs.
On `client_side_weighted_round_robin`, `enable_oob_load_report: true` opens
an `OpenRcaService.StreamCoreMetrics` stream; customize it with `oob_reporting_config`.
HTTP/3 is stable in 1.40.0 for upstream and downstream use, including QUIC extensions.
QUIC listeners support client mTLS, and upstream QUIC can present client certificates.
TLS defaults include `X25519MLKEM768`, including in FIPS builds; setting
`envoy.reloadable_features.pqc_default_ecdh_curves` to `false` restores earlier defaults.
## MCP and application protocols
The MCP router fans out `initialize` and `tools/list`, aggregates responses,
and routes `tools/call` by tool name prefix. `lazy_initialization` answers
`initialize` immediately and initializes each backend on its first routed request.
The router withholds downstream headers, including `authorization`, by default.
Configure forwarding per backend; to forward every header:
```yaml
header_forwarding:
forward_all: true
```
MCP `PASS_THROUGH` forwards oversized bodies with `is_exceeding_limit` metadata;
`REJECT_NO_MCP` returns HTTP 400 for required fields missing within the limit.
Set `reject_duplicate_keys` to `true` to reject duplicate JSON keys at any depth.
The MCP JSON REST bridge is a work in progress; it supports route-specific tools
and local `tools/list` responses through `tools_list_local`.
The alpha AI Protocol Manager extracts LLM response token usage from supported
SSE and JSON dialects into typed metadata `envoy.data.ai.v3.TokenUsage`.
## Dynamic modules and observability
`DynamicModuleConfig.module.local.filename` loads a binary by absolute path.
`module.remote` fetches an HTTP binary with SHA-256 verification and digest caching.
A fetch failure during listener initialization leaves the filter uninstalled,
allowing traffic through. `nack_on_cache_miss` rejects an uncached ECDS or per-route
update and starts the fetch in the background.
Bootstrap modules block readiness until `signal_init_complete`.
Wrap Rust callbacks in `CatchUnwind` to convert panics into fail-closed errors.
Use `%UPSTREAM_TRANSPORT_FAILURE_REASON%` to diagnose reasons omitted by default
from downstream HTTP response bodies. Prometheus native histogram bucket-index
corrections can raise quantiles after upgrades by placing observations in the correct ranges.
OpenTelemetry metrics support HTTP export via `http_service`; use
`max_data_points_per_request` to split exports at a configured data-point count.