Skip to content

docs(waf): Firewall events — sampled matches, retention, privacy, API/CLI#67

Draft
acoshift wants to merge 2 commits into
mainfrom
waf-events
Draft

docs(waf): Firewall events — sampled matches, retention, privacy, API/CLI#67
acoshift wants to merge 2 commits into
mainfrom
waf-events

Conversation

@acoshift

Copy link
Copy Markdown
Member

Summary

Documents the Firewall events feature (spec: SPEC-waf-events.md, workstream #7) on content/networking/waf.md, after the Metrics section:

  • What events are: sampled concrete requests a rule matched (time, action, rule, client IP + country, method, host, path), surfaced as a table under the metrics charts.
  • Sampling caps: 10 events/min/rule per ingress instance (blocks exempt) and 60 events/min/zone bounding everything, blocks included — matching the parapet implementation (wafevent.go).
  • Retention: 3 days for events vs 30 days for the anonymous match counters.
  • Privacy callout (spec §H/§I): client IP is PII; no query strings, headers, cookies, or bodies — method, host, and path only.
  • Never count events — the metrics charts count every match and stay the source of truth.
  • API: waf.events (newest first, ruleId/action filters, limit default 50 / max 200, nextbefore keyset cursor). CLI: deploys waf events.
  • scripts/screenshots/capture.mjs gains the waf-events entry (spec §H) so the screenshot TODO resolves with a plain refresh.sh run once the console section is merged.

All examples use documentation IPs (203.0.113.x) — no real event data.

Draft — merge gate

Docs deploy on merge, and this page describes the console events table and the deploys waf events CLI command. Per spec §J rollout order (docs depend on console #5 and CLI #6), keep this PR draft until the console waf-events branch is merged and deployed and the CLI subcommand has shipped. After console merges, run scripts/screenshots/refresh.sh and resolve the TODO(screenshot) in waf.md (replace the comment with the shot line, dropping the /* */ escapes) before marking ready.

Expected merge conflicts

Two other open docs branches also touch content/networking/waf.md:

  • waf-ip-lists (+157 lines on waf.md) — will conflict around the section ordering.
  • waf-test (+103 lines on waf.md, also edits scripts/screenshots/capture.mjs) — will conflict on both files; whichever merges second rebases.

Rollout (spec §J — every step inert alone)

  1. waf_events DDL migration (apiserver) — apply before the binary.
  2. apiserver binary (collector.setWAFEvents, waf.events).
  3. parapet-ingress-controller image + WAF_EVENTS_TOKEN Secret (feat(waf): sampled match-event ring + bearer-authed cursor endpoint moonrhythm/parapet-ingress-controller#182).
  4. collector envs waf_events_target + waf_events_token (same Secret value); unset = off.
  5. console (events table) → then this docs PR + CLI.

Gate: api repo re-pin to main before CLI/mcp branches build against the new waf.events types.

Test evidence

  • hugo --gc --minify builds green (59 pages); rendered /networking/waf/ contains the Firewall events section, and the commented screenshot TODO leaves no literal shortcode text or waf-events.png reference in the output.
  • node --check scripts/screenshots/capture.mjs passes.
  • Console table columns cross-checked against the console waf-events branch (Time, Action, Rule, IP, Country, Method, Host, Path) — the docs no longer claim a response-status column.

acoshift added 2 commits July 11, 2026 08:16
…privacy note, API/CLI

Documents the sampled WAF match events (waf.events): what an event row
shows, per-ingress-instance sampling caps (10/min per rule, blocks
exempt; 60/min per zone), 3-day retention with an explicit privacy note
on client IPs (no query strings, headers, cookies, or bodies), that the
metrics charts remain the exact counts, filters + keyset pagination, and
the curl/CLI usage.

Screenshot is left as an escaped-shortcode placeholder (the shot
shortcode fails the build on a missing image); capture it via
scripts/screenshots/refresh.sh once the console section ships.
…ntry, clarify screenshot TODO

- The console events table has no response-status column (Time, Action,
  Rule, IP, Country, Method, Host, Path) — remove the parenthetical
  claiming blocks show their status.
- capture.mjs gains the waf-events entry per SPEC-waf-events.md §H, so
  resolving the screenshot TODO after the console section merges needs
  no further script change.
- The TODO now says to strip the /* */ Hugo-escape markers, not just
  uncomment — uncommenting alone would render the shortcode literally.
@deploys-app

deploys-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

Preview docs-pr-67

URL: https://docs-pr-67-606515731026706458.rcf2.deploys.app

Site: fbf16eb3b85c7c262058ef8377c4ffb969e6d419bf72727746e5bb945e683b61

Commit: a2f9b42

updated 2026-07-11T01:39:11Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant