<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Explanation on Coraza Kubernetes Operator</title><link>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/</link><description>Recent content in Explanation on Coraza Kubernetes Operator</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/index.xml" rel="self" type="application/rss+xml"/><item><title>Architecture</title><link>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/architecture/</guid><description>&lt;p&gt;The Coraza Kubernetes Operator uses a two-controller architecture with a shared in-memory cache to deliver firewall rules to WASM plugins running in Envoy sidecars.&lt;/p&gt;
&lt;h2 id="high-level-overview"&gt;High-Level Overview&lt;/h2&gt;
&lt;p&gt;The operator manages two custom resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;RuleSet&lt;/strong&gt; &amp;ndash; Aggregates SecLang rules from ConfigMaps and compiles them into a cached, validated ruleset.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Engine&lt;/strong&gt; &amp;ndash; Attaches a RuleSet to one or more Gateways by deploying a Coraza WASM plugin into Envoy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The data flows through these components:&lt;/p&gt;</description></item><item><title>Rule Processing</title><link>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/rule-processing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/rule-processing/</guid><description>&lt;p&gt;This page explains the lifecycle of firewall rules from ConfigMap to enforcement in the WASM plugin.&lt;/p&gt;
&lt;h2 id="rule-aggregation"&gt;Rule Aggregation&lt;/h2&gt;
&lt;p&gt;A RuleSet references an ordered list of ConfigMaps. Each ConfigMap must contain a key named &lt;code&gt;rules&lt;/code&gt; with SecLang directives as its value. The operator reads these ConfigMaps in the specified order and concatenates their contents to form a single rule body.&lt;/p&gt;
&lt;p&gt;The order matters because SecLang directives are evaluated sequentially. Engine configuration directives (such as &lt;code&gt;SecRuleEngine On&lt;/code&gt;) must appear before detection rules.&lt;/p&gt;</description></item><item><title>Istio WASM Integration</title><link>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/istio-wasm-integration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/istio-wasm-integration/</guid><description>&lt;p&gt;The Coraza Kubernetes Operator integrates with Istio by deploying a WebAssembly (WASM) plugin into Envoy proxies attached to Kubernetes Gateways. This page explains how that integration works.&lt;/p&gt;
&lt;h2 id="how-istio-wasmplugin-works"&gt;How Istio WasmPlugin Works&lt;/h2&gt;
&lt;p&gt;Istio provides a &lt;a href="https://istio.io/latest/docs/reference/config/proxy_extensions/wasm-plugin/"&gt;WasmPlugin&lt;/a&gt; resource that instructs Envoy to load and execute a WASM module. The operator creates WasmPlugin resources to inject the Coraza WAF into the request processing pipeline.&lt;/p&gt;
&lt;p&gt;When a WasmPlugin is applied, Istio:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Downloads the WASM binary from the specified OCI registry.&lt;/li&gt;
&lt;li&gt;Loads it into the Envoy proxy as a filter.&lt;/li&gt;
&lt;li&gt;Routes HTTP requests through the WASM filter before forwarding them to the backend.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="the-coraza-proxy-wasm-plugin"&gt;The coraza-proxy-wasm Plugin&lt;/h2&gt;
&lt;p&gt;The WASM module used by the operator is &lt;a href="https://github.com/networking-incubator/coraza-proxy-wasm"&gt;coraza-proxy-wasm&lt;/a&gt;. It is a purpose-built Envoy WASM filter that:&lt;/p&gt;</description></item><item><title>Known Limitations</title><link>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/known-limitations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/known-limitations/</guid><description>&lt;p&gt;This page describes known limitations when running the Coraza WAF with Istio using WASM mode. These limitations are specific to the WASM execution environment and do not apply to all deployment modes.&lt;/p&gt;
&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;Out of approximately 3,300 OWASP CoreRuleSet conformance tests, 190 tests (6%) are currently excluded, resulting in a &lt;strong&gt;94% pass rate&lt;/strong&gt;. The excluded tests fall into four categories:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Category&lt;/th&gt;
 &lt;th&gt;Tests&lt;/th&gt;
 &lt;th&gt;Impact&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Enhanced Security&lt;/td&gt;
 &lt;td&gt;45&lt;/td&gt;
 &lt;td&gt;Positive &amp;ndash; Envoy provides additional protection.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Tool Limitations&lt;/td&gt;
 &lt;td&gt;113&lt;/td&gt;
 &lt;td&gt;Requires alternative controls or monitoring.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Coraza/WASM Bugs&lt;/td&gt;
 &lt;td&gt;13&lt;/td&gt;
 &lt;td&gt;Requires fixes in Coraza or coraza-proxy-wasm.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Under Investigation&lt;/td&gt;
 &lt;td&gt;19&lt;/td&gt;
 &lt;td&gt;Requires further analysis.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="operator-behavior"&gt;Operator Behavior&lt;/h2&gt;
&lt;p&gt;The RuleSet controller automatically detects and rejects any RuleSet containing rules listed in this document. When unsupported rules are found:&lt;/p&gt;</description></item><item><title>Security Model</title><link>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/security-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://networking-incubator.github.io/coraza-kubernetes-operator/v0.4/explanation/security-model/</guid><description>&lt;p&gt;This page describes the security model of the Coraza Kubernetes Operator, including RBAC permissions, network security, and authentication mechanisms.&lt;/p&gt;
&lt;h2 id="rbac-permissions"&gt;RBAC Permissions&lt;/h2&gt;
&lt;p&gt;The operator requires two sets of RBAC permissions:&lt;/p&gt;
&lt;h3 id="cluster-scoped-permissions-clusterrole"&gt;Cluster-Scoped Permissions (ClusterRole)&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Resource&lt;/th&gt;
 &lt;th&gt;Verbs&lt;/th&gt;
 &lt;th&gt;Purpose&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;ConfigMaps, Secrets&lt;/td&gt;
 &lt;td&gt;get, list, watch&lt;/td&gt;
 &lt;td&gt;Read firewall rules and data files.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Pods&lt;/td&gt;
 &lt;td&gt;list, watch&lt;/td&gt;
 &lt;td&gt;Discover Gateway pods matching Engine workload selectors.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;ServiceAccounts&lt;/td&gt;
 &lt;td&gt;create, get, list, patch, update, watch&lt;/td&gt;
 &lt;td&gt;Manage service accounts for cache authentication.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;ServiceAccounts/token&lt;/td&gt;
 &lt;td&gt;create&lt;/td&gt;
 &lt;td&gt;Issue tokens for WASM plugin authentication.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Events&lt;/td&gt;
 &lt;td&gt;create, patch&lt;/td&gt;
 &lt;td&gt;Record events on managed resources.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Deployments&lt;/td&gt;
 &lt;td&gt;get&lt;/td&gt;
 &lt;td&gt;Read operator deployment metadata.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;TokenReviews, SubjectAccessReviews&lt;/td&gt;
 &lt;td&gt;create&lt;/td&gt;
 &lt;td&gt;Authenticate and authorize metrics endpoint access.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Leases&lt;/td&gt;
 &lt;td&gt;create, delete, get, list, patch, update, watch&lt;/td&gt;
 &lt;td&gt;Leader election.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;WasmPlugins (Istio)&lt;/td&gt;
 &lt;td&gt;create, delete, get, list, patch, update, watch&lt;/td&gt;
 &lt;td&gt;Manage Istio WASM plugin resources.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Gateways (Gateway API)&lt;/td&gt;
 &lt;td&gt;list, watch&lt;/td&gt;
 &lt;td&gt;Discover Gateways for Engine status reporting.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;ServiceEntries, DestinationRules (Istio)&lt;/td&gt;
 &lt;td&gt;create, get, patch, update&lt;/td&gt;
 &lt;td&gt;Create Istio prerequisites for cache server mesh connectivity.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="namespace-scoped-permissions-role"&gt;Namespace-Scoped Permissions (Role)&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Resource&lt;/th&gt;
 &lt;th&gt;Verbs&lt;/th&gt;
 &lt;th&gt;Purpose&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;NetworkPolicies&lt;/td&gt;
 &lt;td&gt;create, delete, get, list, patch, update, watch&lt;/td&gt;
 &lt;td&gt;Manage network policies for cache server access.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The operator follows the principle of least privilege. It does not request permissions beyond what is needed for its controllers.&lt;/p&gt;</description></item></channel></rss>