Parse, Validate, Authorize, Process
Validation answers “is this value well-formed and meaningful?”; authorization separately answers “may this principal perform this action?”
Frame the problem
Security starts with a concrete asset, attacker capability and trust crossing.
Why the system fails
The program uses data before parsing it, validates only shape, or mistakes sanitization for authorization.
The important question is not “what is Parse, Validate, Authorize, Process?” but “which assumption let untrusted data or an over-scoped identity cross untrusted request → typed application data?” Trace the decision at the boundary, then constrain what can happen after the first control fails.
Design the control in layers
Start with the control closest to the interpretation or privilege boundary: Parse into an explicit schema before use Then add a control that reduces blast radius and telemetry that proves the decision was enforced.
The resulting design is not labelled secure. Record the identified controls, the known failure paths, the remaining exposure, and the evidence you would need during an incident.
| Prevent | Detect | Recover |
|---|---|---|
| Parse into an explicit schema before use · Validate ranges, relationships and business semantics · Authorize the operation after identifying the resource | Structured validation failures by field and caller | Contain the affected identity or component, scope impact from audit evidence, and preserve a regression test. |
Key points
- Asset: Application invariants and every interpreter reached downstream.
- Boundary: Untrusted request → typed application data
- Primary control: Parse into an explicit schema before use
- Detection signal: Structured validation failures by field and caller
- Always ask what limits damage when the primary control fails.
Boundary control exercise
This lesson uses the shared boundary-control exercise.
Follow the attack
Safe conceptual simulation: capability → missing control → crossed boundary → asset impact.
- 1Attacker starts with: A caller who controls request paths, headers and bodies.
- 2The program uses data before parsing it, validates only shape, or mistakes sanitization for authorization.
- 3The weak or missing boundary control is crossed: Untrusted request → typed application data
- 4Impact: Corrupted state, injection, resource exhaustion or unauthorized operations.
- Corrupted state, injection, resource exhaustion or unauthorized operations.
Defend, detect, recover
One prevention is a single point of security failure. Layer it and make failure observable.
- • Parse into an explicit schema before use
- • Validate ranges, relationships and business semantics
- • Authorize the operation after identifying the resource
- • Structured validation failures by field and caller
- • Contain the affected identity or component.
- • Scope access from audit evidence.
- • Fix the boundary and add a regression test.
- • Misconfiguration and new access paths can bypass the intended control.
- • A privileged insider or compromised control plane may still reach the asset.