liveBook · Manning

Schema validation

As explained in Secure APIs

Schema validation is the checking of data against a defined schema's fields, types, structure, and constraints.

Schema validation checks whether an API request conforms to its defined data schema. A WAF can compare request payloads with the API specification and reject invalid requests with a useful error message and status code. section 9.4

This gives the WAF a structured way to distinguish acceptable API input from malformed or suspicious traffic, adding protection beyond application-level attacks. section 9.4

Rejecting a malicious request

A WAF may reject a request such as GET /payments?filter=' or 1=1-- when its content indicates SQL injection. Schema validation complements this filtering by enforcing the API specification for request payloads. section 9.4

How Secure APIs covers it

How deep it goes
Explains payload conformance and rejection responses, but does not detail schema syntax or individual validation rules.
Examples
Uses a payments filter request containing a SQL injection attack and a WAF rejection figure.
What you can do after
Operate/configure a WAF by providing an API specification for request-payload validation and rejection.
How it connects
Connects schema validation with web application firewalls, API specifications, SQL injection, and malicious traffic.

Also explained in

Compare how 7 books explain schema validation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.