Why Revetment runs as a native module inside Envoy Gateway
How the Revetment Envoy Gateway WAF native module attaches inside the Envoy process, what it inspects, and how shadow events become per-route blocking.
An Envoy Gateway WAF native module inspects HTTP requests directly within the Envoy worker process instead of forwarding traffic to an out-of-process daemon or external proxy. Inspection runs in memory. Compiling inspection logic into the proxy binary eliminates inter-process communication hops and lets you manage L7 inspection through the Kubernetes Gateway API.
Platform and security teams running Envoy Gateway on Kubernetes often reach this point after migrating away from ingress-nginx. You own the gateway. At that stage, you already have an ingress layer handling production traffic, but you must choose where web application firewall inspection executes. Choosing an in-process WAF for Envoy changes your network topology, your operational failure domains, and how you test rules before enforcement.
The attachment question comes before the rule question
Evaluating a web application firewall for Envoy Gateway requires deciding where inspection code executes. Teams evaluating an Envoy Gateway security module typically encounter three architectural topologies outside of native integration:
- A sidecar container running alongside each gateway pod. Envoy forwards traffic over localhost networking or a Unix domain socket to the sidecar, which parses the request, evaluates signatures, and returns an allow or deny status.
- A WebAssembly (WASM) plugin executed within Envoy's WebAssembly runtime. Code runs inside the process sandbox, but data marshaling between the Envoy host environment and the WASM virtual machine requires serializing buffers across the WASM boundary.
- An external processing (
ext_proc) filter server running as a distinct deployment in the cluster. Envoy streams header and body chunks across the pod network over gRPC, waits for the external service to respond, and holds the client connection open in the meantime.
Each topology introduces distinct operational overhead. A sidecar doubles container resource accounting, requires pod-level lifecycle coordination, and adds context switching across network namespaces. An ext_proc server introduces an independent network dependency. If that service experiences connection pool exhaustion, pod evictions, or scheduling delays, your ingress gateway bears the resulting latency spikes or drops incoming downstream connections entirely.
The mechanism comes first. A native module compiles directly into the Envoy binary. It runs inside the Envoy process. We examine the mechanics of this architecture, its concrete failure modes, the progression from shadow evaluation to active blocking, and the operational boundaries of what the system cannot do.
What an Envoy Gateway WAF native module actually is
Revetment runs as a native module inside the Envoy process. It is not a sidecar, a WASM plugin, an ext_proc server, or a separate proxy. The inspection engine attaches directly to Envoy's internal filter chain. When an Envoy worker thread receives an ingress connection, terminates TLS, and parses downstream HTTP framing, the filter processes request headers and body buffers directly in process memory.
In-process inspection removes intermediary hops. Traditional architectures that offload inspection force the gateway to copy request buffers, serialize them into gRPC or IPC frames, dispatch them to another socket, and await deserialization and response parsing before resuming the filter chain. By evaluating the request in place, the native module evaluates inspection criteria on the raw buffers that Envoy already maintains in its stream memory.
This shifts your failure domain. With an external filter, a slow inspection daemon manifests as client timeouts, gRPC connection pool exhaustion, or circuit breaker trips between Envoy and the filter pod. With a native module, there is no network socket to time out and no external process to monitor. The blast radius shifts to the proxy itself. If a rule causes an unhandled panic, excessive CPU consumption, or memory growth, the impact occurs directly on the Envoy worker thread handling that connection. The gateway's own stability is the failure boundary.
The engine uses Rust. Rust provides memory safety guarantees without relying on a garbage collection runtime that could trigger stop-the-world pauses on Envoy worker threads. Revetment publishes no latency or throughput benchmark; describe the mechanism and the rule coverage instead of a performance number. Our design rationale and architectural background are detailed in our write-up on why Revetment exists.
How the module attaches through the Kubernetes Gateway API
Revetment attaches to Envoy Gateway through the Kubernetes Gateway API. It is not an ingress controller and does not run on NGINX, Traefik, HAProxy, or Istio. The system integrates directly with the standard specifications maintained by the Kubernetes Gateway API project.
Configuration is managed through two Custom Resource Definitions (CRDs):
RevetmentPolicyattaches inspection configuration, operational modes (shadow or blocking), and rule profiles to targeted routing resources.RevetmentExceptiondefines targeted exclusions for specific rules, routes, and request parameters without modifying the underlying rule set.
Both CRDs target HTTPRoute resources using standard targetRef primitives. This structure aligns with platform engineering boundaries. The platform team maintains the GatewayClass and Gateway infrastructure objects, while application teams or security operators define routing and attach policies at the route boundary:
apiVersion: revetment.io/v1alpha1
kind: RevetmentPolicy
metadata:
name: api-protection
namespace: workloads
spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: customer-api
mode: Shadow
ruleset:
coreRuleSet:
paranoiaLevel: 1
Before applying policies in production, review the configuration using this operational checklist:
- Verify that the
targetRefreferences an existing, validHTTPRoutein the appropriate namespace. - Ensure that multiple
RevetmentPolicyresources do not target the sameHTTPRoute. If two policies target a single route, the controller rejects the newer resource to prevent undefined evaluation order. - Check the resource status via
kubectl describe revetmentpolicy <name>to confirm that Envoy Gateway accepted the configuration and updated the control plane. - Validate that the Envoy control plane translated the CRD into Envoy filter chain configurations without errors.
Installation steps across managed Kubernetes environments differ based on the underlying networking model. Detailed steps are available in our installation guides. Each install guide states its own validation status; describe only the providers whose guide is marked verified.
Rule coverage: 477 of the pinned CRS v4.30.0 rule ids at paranoia level 1
477 of the pinned OWASP CRS v4.30.0 rule ids compile at paranoia level 1. The rules that do not load are named on our unsupported rules documentation.
The OWASP Core Rule Set organizes detection signatures into four Paranoia Levels (PL1 through PL4). According to the OWASP CRS false positives and tuning documentation, paranoia level 1 is the baseline tier designed to offer protection against common attacks with a low rate of false positives on standard web applications. As teams raise the paranoia level, the rule engine enables increasingly aggressive heuristics (such as strict character set restrictions and advanced protocol anomaly checks) that require extensive route-by-route parameter tuning to avoid breaking valid client requests.
Not every rule from the CRS distribution compiles into the Revetment engine. Rules requiring complex regex backreferences not supported by our execution engine, external file system lookups during evaluation, response body rewriting, or custom Lua scripts are omitted at compilation. The compiler rejects unsupported rules during bundle assembly.
Examine the named gaps before planning your route policies. Deploying a WAF under the assumption that it evaluates every published CRS rule leaves blind spots in your defensive model. Signature engines match established attack patterns. Revetment matches known signatures. A genuinely novel exploit passes until a rule for it exists and reaches the deployment; no signature WAF can promise otherwise. For teams requiring validation of signature origins and third-party data licenses, review our rule data provenance and license records.
Shadow mode: see what a rule would block before it blocks
Shadow mode records what a rule would have blocked and lets the request through. Blocking is a separate, per-route promotion. When a policy runs in shadow mode, request evaluation proceeds through the full inspection chain. If a payload triggers an inspection rule, the module generates a detailed detection event, appends the metadata to an internal ring buffer, and allows the request to reach the upstream workload without interruption.
Each shadow event captures operational fields required to diagnose the trigger:
- The matching rule identifier, such as rule ID 942100 for SQL injection heuristics.
- The target
HTTPRouteand specific URL path matched by Envoy Gateway. - The exact parameter location across query strings, request headers, or JSON body paths.
- A redacted excerpt of the matching payload, truncated to limit sensitive customer data retention while preserving diagnostic context.
The Revetment console groups incoming shadow events by rule, route, and parameter. This aggregation allows engineers to triage noisy detections systematically:
- Sort events by frequency to isolate rules generating high match counts across multiple clients.
- Examine the matched parameter to determine whether the trigger is a genuine exploit attempt, an application client sending unusual syntax, or an internal service integration using reserved characters.
- Classify the event. If the payload is malicious, the rule is confirmed valid. If the payload represents legitimate traffic, write a targeted exception before advancing to blocking mode.
Running shadow mode on a route with negligible traffic yields insufficient operational data. If an internal staging route receives fifty requests a day, observing zero shadow matches over a week does not confirm that the rule set is safe for production. A rule that never fires in shadow is unobserved. Shadow validation requires statistically meaningful traffic volumes across your standard business workflows. Read our operational walkthrough on managing Envoy Gateway WAF shadow mode for triage strategies.
From shadow to blocking: 1%, 10%, 100%, with rollback
Blocking is promoted per route in many, many, then many steps, with an automatic rollback threshold. Traffic patterns differ across routes. A payment webhook endpoint handling serialized XML or JSON tokens has completely different input patterns than an asset serving route or an OAuth callback handler. The promotion unit is the individual HTTPRoute resource.
The progression occurs across defined stages:
- Route many matching traffic into active blocking. The module evaluates all traffic, but returns an HTTP 403 Forbidden only on a deterministic many sample of matching sessions. The remaining many continues in shadow mode while operators observe telemetry for anomalies.
- Expand enforcement to many matching traffic if the initial threshold runs cleanly without unexpected client rejections. This phase increases exposure across less frequent client variations.
- Activate many enforcement across the route. All requests matching active signatures on that route are denied at the gateway boundary.
Each promotion step links to an automatic rollback threshold. The operator defines an acceptable error budget, such as an unexpected spike in client-side 403 responses relative to historical shadow rates. If the gateway detects that the rejection threshold exceeds this limit within the observation window, the module automatically reverts the route policy to shadow mode to protect legitimate traffic. Defining this metric upfront prevents manual incident response when a rule unexpectedly blocks legitimate customer transactions.
When valid traffic triggers a signature, operators must resolve the issue without disabling the rule entirely. Exceptions are scoped to a rule, a route, and a parameter. They are not a global rule disable. For example, if a search route accepts SQL syntax inside a query parameter, an operator applies a RevetmentException targeting rule ID 942100 solely on the /search route for parameter query. The rule remains fully active across all other parameters on that route and across all other routes in the cluster.
apiVersion: revetment.io/v1alpha1
kind: RevetmentException
metadata:
name: allow-search-keywords
namespace: workloads
spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: customer-api
ruleId: 942100
parameter:
location: Query
name: query
We document this promotion process in our timeline detailing 28 days from shadow to blocking. The only named deployment is the operator's own production; Revetment does not publish customer logos, named users, or case studies. You can inspect live enforcement configurations on our production snapshot page, where Revetment runs on 18 of 18 policied routes, all blocking since 24 October 2026.
Failure modes and limits you still own
Application-level transport protections are distinct from signature inspection. Revetment does not implement rate limiting, slowloris protection, HTTP/2 rapid-reset budgets, or concurrency limits. Within the Envoy Gateway ecosystem, these protections are configured through Envoy's native rate-limiting filters and connection limit policies defined in the Envoy Gateway documentation.
Identity and automation security also sit outside the module's scope. Revetment does not sell bot management, device fingerprinting, account-takeover protection, or credential-stuffing protection. Managing automated scrapers or credential stuffers requires specialized behavioral analysis or edge challenge engines.
No WAF can promise complete detection or an absence of false positives. Revetment's workflow is built to show the false positives before blocking. The system surface is engineered to identify match discrepancies while in shadow mode so you can scope exceptions accurately before promoting routes.
Revetment is pre-GA. It runs in the operator's own production, but the site does not claim general availability or scale proof. Support is best effort from one maintainer, with no SLA on any tier. Security reports follow the response times on our security coordination page.
Certain administrative enterprise capabilities remain in active development. SSO (SAML/OIDC) and roles are planned for Q1 2027 on Pro. They are not available today. A FIPS build of the data plane is planned. Revetment is not FIPS certified today. Managed feed rollout across a fleet, with automatic rollback, is planned for Q1 2027 on Pro. Per-route promotion with rollback is available today.
Data custody, packaging, and console boundaries
The data plane inspects requests inside your Envoy process and sends no traffic to Revetment. The hosted console is optional. All request evaluation occurs locally within the Envoy memory space inside your Kubernetes cluster nodes. Customer request headers, cookies, query parameters, and payload bodies do not leave your computing boundary during inspection.
The console is hosted or self-hosted. Accounts are operator-invited, not self-serve, and there is no free trial; the Free tier is a product tier. If you utilize the hosted console for event aggregation, the module transmits only redacted shadow event metadata over a secure outbound TLS connection. If you deploy the self-hosted console, this metadata remains entirely within your infrastructure.
Event retention windows depend on your deployment configuration:
- The hosted console keeps 7 days on Free and 13 months on Pro.
- Self-hosted retention is yours to set based on your persistent storage configuration.
Revetment ships as a Helm chart and container images. It is composed of multiple components. Revetment is not open source. The Helm chart and the four images are Apache-2.0. The source repository is private. You can pull the public charts and images directly from our public repository.
Pricing is per cluster, never per request, rule, route, or user. The Free, Pro, and Enterprise tiers are listed on our pricing page. Enterprise tiers are quoted based on specific support requirements. Air-gapped rule bundles are an Enterprise feature.
Revetment does not hold SOC 2, ISO 27001, PCI DSS, HIPAA, or FedRAMP certifications. Enterprise includes evidence packs for a customer's SOC 2 and PCI DSS 6.4.2 audit. Those are evidence packs, not a Revetment certification. These compliance packs provide deployment manifests, control validation tests, and rule configuration snapshots that you can provide directly to third-party auditors to demonstrate L7 security controls on your Kubernetes ingress.
A decision checklist before you attach anything
Before installing an Envoy Gateway security module, evaluate your existing cluster infrastructure against this operational checklist:
- Confirm that your cluster runs Envoy Gateway and that your ingress definitions use Gateway API
HTTPRouteresources. Revetment attaches to Envoy Gateway through the Kubernetes Gateway API. It is not an ingress controller and does not run on NGINX, Traefik, HAProxy, or Istio. - Review the 477 supported PL1 rule IDs alongside the list of omitted rules on the rule limitation list. Confirm that your primary threat model aligns with the supported inspection engine.
- Identify a single, representative
HTTPRoutewith moderate, consistent traffic to host your initial deployment. Avoid applying policies across all routes simultaneously. - Define the exact error threshold, such as an unexpected increase in client-side many responses, that will trigger a route demotion before shifting traffic into blocking mode.
- Document which upstream systems handle network floods, bot filtering, and rate limiting before traffic reaches the gateway.
- Check our installation guides at our installation index. Each install guide states its own validation status; describe only the providers whose guide is marked verified.
The mechanism is the argument
Running a WAF inside Envoy Gateway centers on architectural boundaries. When inspection runs as a native module, evaluation occurs directly in stream memory without intermediate network hops, serialization layers, or external daemons. Policy definition remains declarative, leveraging Kubernetes Gateway API primitives to bind security controls to existing route definitions.
Revetment publishes no latency or throughput benchmark; describe the mechanism and the rule coverage instead of a performance number. Evaluate the system based on its architecture: verify that in-process execution fits your reliability requirements, that the 477 compiled CRS v4.30.0 rules cover your core L7 threat profile, and that staged promotion (many, many, many) gives your team the visibility needed to operate safely.
Frequently asked questions
Is Revetment a WASM plugin or a sidecar for Envoy Gateway?
Revetment runs as a native module inside the Envoy process. It is not a sidecar, a WASM plugin, an ext_proc server, or a separate proxy. It compiles directly into the Envoy binary to inspect requests within process stream memory.
Which OWASP CRS rules does Revetment load, and which ones does it not?
477 of the pinned OWASP CRS v4.30.0 rule ids compile at paranoia level 1. The rules that do not load are named on https://revetment.io/what-revetment-cannot-stop. Omitted rules include those requiring unsupported regex features, response body modification, or external file lookups.
Does shadow mode block anything, or only record?
Shadow mode records what a rule would have blocked and lets the request through. Blocking is a separate, per-route promotion. Detections generate diagnostic events without rejecting client requests or modifying payload buffers.
Does request traffic leave my cluster when Revetment is attached?
The data plane inspects requests inside your Envoy process and sends no traffic to Revetment. The hosted console is optional. All L7 payload inspection occurs locally inside your Envoy Gateway pods.
Can I disable a noisy CRS rule globally instead of writing an exception?
Exceptions are scoped to a rule, a route, and a parameter. They are not a global rule disable. Disabling a rule globally across all ingress paths is not supported because it removes baseline protections cluster-wide; exceptions isolate exclusions strictly to the route and input parameter that requires it.
Start with shadow mode on a single HTTPRoute: attach a RevetmentPolicy, let it record for a week, then read the grouped events before you promote anything. The install guides at https://revetment.io/install state their own validation status, and https://revetment.io/what-revetment-cannot-stop lists the rules that do not load.