Skip to content
Docs›Concepts›Shadow mode
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

  1. compile: rule is emitted with action: log.
  2. push: rule lands on the gateway. Origin sees every request; the gateway logs what it would have done.
  3. observe: you watch the event-log tail. Confirm no false positives on legitimate traffic.
  4. promote: you promote the rule from the dashboard. It flips to action: block and the watch window arms.
  5. watch: error-rate & p99 latency are sampled every second.
  6. (maybe) rollback: if either metric exceeds threshold, the rule auto-rolls to log and your org is notified with the offending payload.
/ 03section

Thresholds

FieldTypeDefaultDescription
errorRate.deltapercentage+0.5%Compared against the trailing 5-minute baseline at promote time.
latency.p99.deltapercentage+15%Compared against the trailing 5-minute baseline at promote time.
windowduration60sSample window after promote. Configurable 30s–600s.
rollback.actionenumlogWhat 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.