How Synapse infers per-endpoint JSON schemas from live traffic — and why training is deferred until after the body-phase WAF verdict. Microsecond validation. No manifests. Poison-resistant baselines.
~5μs
Learn Per Request
~3μs
Validate Per Request
1.5×
Length Tolerance
LRU
Schema Eviction
Request Path — Validate Now, Train Later
STAGE 01
Parse & Template
JSON body parsed. Path normalized to an endpoint template (e.g. /api/users/:id).
// endpoint: /api/users · samples: 42
id → uuid(len 36)
email → email(len ≤ 48)
age → number (0–120)
verified → boolean
joined → iso-date
Downstream Consumers of the Schema
WAF · schema_violation
BODY-PHASE RULE KIND
Rules match on total_score via compare_threshold (gte/gt/eq/lte/lt). Evaluated synchronously in the body phase — same pass that produces the verdict.
DLP Scanner
POST-VERDICT HAND-OFF
Learned field patterns inform which fields are candidates for PII / secret scanning. Runs after the WAF verdict on allowed bodies.
Anomaly Detection
STRUCTURAL DRIFT
Unexpected fields, missing required fields, and type promotions to mixed surface as anomalies — feeding risk scores and Horizon telemetry.
Anti-poisoning guarantee
The body-phase WAF runs before the learner trains. If a request is blocked — SQLi, schema violation, DLP hit — its payload is dropped without entering the baseline. Attackers cannot teach Synapse to trust the shape of an attack, even under sustained traffic. Schemas stay clean.