feat(ecds): distribute WAF rules and RuleData via ECDS #547
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #547"
general
weight: 0.35
redhat-chai-bot
What
Replace HTTP rule polling and Istio
WasmPluginprovisioning with authenticated Envoy ECDS delivery of complete WAF configurations, including RuleData.Why
The polling path depends on a process-local rule cache populated by the leader and requires cache-token renewal inside plugin configuration. ECDS moves subscription and delivery into Envoy, lets every operator replica serve accepted configurations, and updates rules without restarting Gateway pods.
Changes
spec.ruleSetCacheServer; no second active rule-delivery mode.This is the implementation previously collected in fork PR #3, rebased onto upstream
mainat88cc6b0. All 77 implementation commits are signed and signed off. The architecture proposal in #542 remains separate: neither architecture commit is included in this branch. The original fork branch/PR is left intact.Verification
Passed on rebased HEAD
76c9438, using the Makefile's Istio 1.31.1 default:go test ./internal/... ./api/... ./cmd/... ./test/framework/... -count=1 -timeout 180s(includes controller envtest).go test -race ./internal/xds ./internal/ecds/render ./internal/rulesets/... -count=1 -timeout 180s.go build ./...and manager build with-tags 'no_fs_access coraza.no_memoize'.go vet -tags integration ./...andgit diff --check.Previously verified on the source branch (
5de300a), not rerun after this rebase: a from-scratch KIND demo with the real module (/→ 200,evilmonkey→ 403, RuleDataevildata→ 403), and live RuleData reload without a Gateway restart.Dependency and release limitations
The current companion plugin pin (
31bca96) is unpublished. The demo requires a local ECDS-aware plugin worktree:The committed 8-byte WASM fixture is for developer builds/tests, not request enforcement. Demo/release images must bundle the real module. Release publishing requires a published compatible plugin artifact and the pinned version/digest/source repository variables; this PR does not publish that dependency. The current plugin and JSON/CRS-alias contract are temporary and will be replaced separately from the operator-side ECDS transport and acceptance logic.
The WASM API change is breaking within v1alpha1: OCI
image/imagePullSecretfields are removed in favor of pairedurl/sha256. There is no legacy-image migration preflight. Coordinated CA rotation/certificate reuse, complete external-host trust/allowlist support, mixed-release module rollover, HA soak/chaos and OpenShift verification remain follow-on work; OLM is outside this MVP. EngineReadymeans accepted/provisioned, not proxy ACK or ongoing WAF health.Deferred review findings
Recorded for follow-up after the MVP merge, unchanged by this rebase:
1.
Include crs/<file>.confguard/validation-filesystem documentation mismatch.2.
SecDatasetbacktick content can be over-rejected by directive scanning.3. Stale
/dev/nullcomment where the validation trailer uses/dev/stdout.4. Startup envelope estimation assumes filenames without JSON escaping; actual rendered-size checks still protect delivery.
5. Persistent consumer NACKs/retry exhaustion have no CRD-visible signal, notably for typoed embedded-file references. Logs/metrics and last-known-good/bootstrap behavior are not proof that the new configuration is active.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Rule updates are delivered to Gateways over ECDS without requiring Gateway restarts.
The operator includes a default WASM module; custom modules can be configured with an HTTPS URL and SHA-256 digest.
RuleSets can explicitly allow or reject empty assembled rules. Engine and RuleSet status now report accepted configuration and content.
Helm supports generated or externally provided serving certificates.
Bug Fixes
Validation rejects reserved RuleData filenames and unsafe rule includes.
Documentation
* Upgrade guidance covers CRD updates and migration to URL-and-digest module configuration. Legacy cache-server settings are retained but ignored.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Review follow-up (
cffc58b)node.idpinning; they now returnUnimplemented.version_info(which is the previously accepted version). Stale-retry serialization remains in place.markRulesInvalidclearsRuleSet.status.acceptedContentonly when the rejected hash matches the accepted hash. Engine accepted-record clearing onInvalidRuleSetis unchanged by design.tls.generate=falseand no private key; Helm installs reuse an existing generated Secret vialookup.BumpRejected/Replaceserialization, NACK counter CAS, bearer-token cap, bounded/deduplicated revalidation, HTTP Range/HEAD, Makefile shell/timeout fixes, and all lint findings.golangci-lintpass.Remaining explicit deferrals: OLM/OperatorHub installs still lack the serving Secret (unpublished path; OPP remains red), and auth-failure rate limiting remains a follow-up. See the PR discussion summary for the per-thread assessment.