Concepts · Shadow mode
Shadow mode
Shadow mode is native on 3 of 7 targets (Cloudflare, AWS WAFv2, OpenAppSec); Coraza/BunkerWeb use the engine's DetectionOnly switch; Kong and Envoy have no shadow mode today. See the gateway matrix. The rest of this page is the hosted-platform lifecycle: log first, promote per rule, auto-rollback on regression.
/ 01section
The contract
Hosted targets
On hosted targets (Cloudflare, AWS WAFv2), every rule x-security deploys lands in log action first. Promotion to block is per-rule, explicit, and reversible; a watch window arms after each promote and auto-rolls back on regression. No silent blocks. No global kill switches we hold.
/ 02section
Lifecycle of a rule
- compile: rule is emitted with
action: log. - push: rule lands on the gateway. Origin sees every request; the gateway logs what it would have done.
- observe: you watch the event-log tail. Confirm no false positives on legitimate traffic.
- promote: you promote the rule from the dashboard. It flips to
action: blockand the watch window arms. - watch: error-rate & p99 latency are sampled every second.
- (maybe) rollback: if either metric exceeds threshold, the rule auto-rolls to
logand your org is notified with the offending payload.
/ 03section
Thresholds
| Field | Type | Default | Description |
|---|---|---|---|
| errorRate.delta | percentage | +0.5% | Compared against the trailing 5-minute baseline at promote time. |
| latency.p99.delta | percentage | +15% | Compared against the trailing 5-minute baseline at promote time. |
| window | duration | 60s | Sample window after promote. Configurable 30s–600s. |
| rollback.action | enum | log | What action to revert to. log keeps observability; off removes the rule. |
/ 04section
What auto-rollback never does
- Touch a rule you did not promote yourself.
- Mass-rollback. Rollbacks are per-rule, with the rule id and reason in the audit log.
- Notify on legitimate traffic regression caused by your code change. The window starts at promote, not at the most recent deploy.
/ 05section
Audit trail
Every promote, rollback, and threshold breach is append-only, hash-chained, and org-scoped. See trust & data flow for the full audit-log and custody story.