Shield WAF

Sectora's edge web-application firewall. Runs in front of your origin at Cloudflare's edge, blocks attacks before they reach your code, and accepts one-click virtual-patch rules from any DAST or SAST finding.

What Shield is

Shield is a managed Cloudflare-Worker-based WAF. Your customer-facing domain CNAMEs to customers.sectora.io. Cloudflare routes the request to the Shield Worker, which terminates TLS, runs every protection layer below, then proxies the request to your origin and processes the response on the way back.

Unlike traditional WAFs (Cloudflare default, AWS WAF, Imperva), Shield is tightly coupled to Sectora's scanner output — every confirmed vulnerability becomes a one-click virtual patch, live on every edge location within about a minute.

Architecture in 30 seconds

Browser
   │
   ├── DNS lookup: customer.com → CNAME → customers.sectora.io (DNS-only / gray cloud)
   │
   ▼
Cloudflare for SaaS (custom hostname, per-customer cert)
   │
   ▼
Shield Worker
   ├── Pre-flight (PLATFORM_REDIRECTS, internal __shield/* endpoints)
   ├── Config lookup (KV: which customer is this hostname?)
   ├── WAF layers (ordered, short-circuit on block):
   │     1. IP access policies (allow/deny lists)
   │     2. Rate limiting (per IP, API key or session; per endpoint)
   │     3. Bot detection (heuristic + fingerprint)
   │     4. Managed rulesets (OWASP CRS, exploit signatures)
   │     5. Virtual patches (deployed from DAST/SAST findings)
   │     6. Schema enforcement (block requests that violate your OpenAPI)
   │     7. Anomaly scoring (behavioural model: is this a real user?)
   │     8. Custom rules (your team's)
   │     9. Leaked credential check (stuffing attempts)
   ▼
Origin (your Cloud Run / Vercel / Fly / on-prem server)

Protection layers

Each layer is independently configurable; they execute in the order above and short-circuit on a block decision. Brief descriptions below — each has its own deep-dive page.

Virtual Patching

Deploy a WAF rule from any confirmed DAST/SAST finding in one click. Blocks the exact request shape that exploits the bug.

Deep dive →

Anomaly Scoring

Behavioural model scores every request 0–100 based on 14+ signals (mouse jitter, request cadence, header order, TLS fingerprint). Block above a threshold you control.

Deep dive →

Rate Limiting

Exact counters per IP, API key or session, with per-endpoint and per-country limits and burst allowance. Rolling out in measurement mode: limits the previous limiter enforced still block.

Deep dive →

Bot Detection

Identifies bots via JA4 fingerprint, header anomalies, missing browser-native APIs. Configurable action: log / challenge / block.

Deep dive →

IP Access

Allow / deny lists by IP, CIDR, ASN, or country. First layer to fire — cheapest decision when applicable.

Deep dive →

Managed Rulesets

Sectora-curated rules (OWASP CRS distillation + emerging exploit signatures). Updated weekly.

Deep dive →

Schema Enforcement

Upload your OpenAPI spec; Shield blocks requests that don't conform (wrong method, missing fields, extra fields). Stops mass-assignment + parameter-tampering attacks dead.

Deep dive →

Shield API

Manage sites, rules, virtual patches, and analytics programmatically. Same API the dashboard uses.

Deep dive →

Operating modes

Two modes for each protected site, set under Protection Mode on the site page:

ModeWhat it doesUse for
MonitorEvaluates every layer but never blocks a request on a detection; each match is logged as a would-block. Fail-closed errors and DLP masking still apply.New sites start here. Run for about a week to learn your normal traffic before switching to Block.
BlockLayers block on match. Real protection.Production, after the baseline period.

There is no site-wide challenge mode. A challenge is an action of individual features — bot detection, rate limiting's progressive response, and the origin-error protection below.

When Shield itself fails: fail mode

Fail mode decides what happens when one of Shield's own checks cannot run — a timeout, an unreadable config, an unavailable rate limiter. It does not cover your origin.

  • Open (default) — the request goes to your origin without that check. The site stays up; that request is not fully protected. These events are reported to Sectora (at most once per site every 10 minutes per edge instance).
  • Closed — Shield answers 503 {"error":"shield_unavailable","ref":…} instead. No unprotected traffic reaches the origin, at the cost of availability.

When your origin fails: origin-error protection

If your origin cannot be reached, Shield answers 502 (504 on a timeout) with{"error":"origin_unavailable","ref","reason"} — the reason describes the kind of failure without revealing your origin's address. An origin 5xx is passed through unchanged.

Optional, per site (Origin Error Protection, acting only while the site is in Block mode; in Monitor it is recorded): when the share of 5xx responses passes a threshold, Shield gives the origin room to recover with one of three actions — a maintenance page, a challenge, or rate limit (load shedding: a fixed number of requests per second still reach the origin, the rest get 503 with Retry-After). Probe requests test the origin and end the protection once it answers again; it never lasts longer than the maximum you set (5 minutes by default, 1 hour at most).

Also included

  • Protection chain — for every open DAST/API finding on a site, how far it has got from finding to a proven, enforcing virtual patch, and where the chain is broken. Verify now replays a patch's proof-of-concept through the edge on demand (once every 2 minutes per patch) and records the result; it never changes the patch.
  • Origin Lock — Shield sends a secret header and your origin refuses requests without it, so nobody can skip Shield by calling the origin directly. Snippets for Node.js, Go, Python, PHP, Laravel, WordPress, Apache/LiteSpeed, nginx and Cloudflare Workers; see Setup.
  • WebSocket protection — a WebSocket handshake goes through every request check. Per site (WebSockets) you can turn WebSockets off, limit them to paths, allow only listed Origins (against cross-site WebSocket hijacking), and inspect client messages: size and rate limits, a maximum connection time, and the WAF rules on text messages. Message inspection starts in monitor; switched to block, it enforces only while the site is in Block mode.
  • Body inspection limits — WAF body rules read up to 128 KB of a body with a declared text, JSON or form type. A body with no declared type, or a streamed body longer than that, is read up to the same limit and its matches are recorded but not enforced, with the reason stored on the request record. Multipart and binary bodies, and a declared length over the limit, are not body-inspected. The AI firewall reads up to 256 KB of a prompt body (1 MB on routes with excluded fields) and sees through whitespace padding and \u escapes; other escapes are inspected log-only.
  • DLP limits — a response is scanned up to the size you set (4 MB at most); a larger response is scanned up to that point rather than skipped. Block still blocks and detect still logs. A masking match in a response too large to read whole is passed through unmasked and recorded as such, and responses that could not be scanned are counted.
  • Security headers you can trust to apply — the dashboard rejects a header name or value the runtime could not send, naming the entry. If one reaches the edge anyway, it alone is skipped and the rest of the site's headers still apply.

Self-protection — sectora.io runs behind its own Shield

Sectora's own domains (sectora.io, www.sectora.io, staging.sectora.io) are on the PLATFORM_DOMAINS allowlist in the Worker — the management plane gets minimal WAF (no schema enforcement on /api/*, no rate limit on /_next/*) but full virtual-patch + IP access coverage.

Performance

Shield runs as a Cloudflare Worker at the edge location nearest the visitor. Measured on production traffic (15,907 requests between 08:21 and 10:21 UTC on 5 November 2026), the time Shield spends on a request before it reaches your origin is:

  • Median: about 40 ms
  • p90: about 240 ms

Response-side processing (security headers, DLP) adds a median of under 1 ms (p90 about 3 ms). Each request's timing is recorded by the Worker itself. The figures include every check a site has enabled, so a site with fewer layers sees less. Shield's cost is included in your Sectora plan — there is no separate Cloudflare bill.

Observability

Traffic and request logs

Each site's Traffic page shows request rate, blocks, latency and the recent requests with the decision on each, including would-blocks in Monitor mode. Request logs are stored in Cloudflare D1 and kept for 14 days (a hard limit of 30 days applies if exporting them falls behind).

Audit log

Every config change (rule added, mode flipped, virtual patch deployed) appears in Settings → Audit Log with the actor, before+after, and timestamp.

Getting started

  1. Verify your domain (Settings → Domains).
  2. Open Shield → Add site. Pick the verified domain.
  3. Set up DNS — CNAME your.domain → customers.sectora.io with DNS only (gray cloud).
  4. Sectora auto-provisions a per-hostname TLS cert via Cloudflare for SaaS (~5–10 min).
  5. Configure the layers you want enabled. Start in Monitor mode for a week.
  6. Flip to Block after the baseline period.

Full walkthrough: Shield Setup.

Comparison vs Cloudflare native / AWS WAF / Imperva

FeatureShieldCloudflareAWS WAFImperva
One-click virtual patch from scan findings✅———
OpenAPI schema enforcement✅limited—✅ ($$$)
Behavioural anomaly scoring (built-in)✅add-on—✅
Bot detection✅✅ (Bot Mgmt $5/M req)add-on✅
Leaked credential check✅✅——
OWASP managed rules✅✅✅✅
Per-target pricing (no per-request)✅———

What's next