Introduction to Web Security
Web security protects the people, data, and operations of a web application. Consider a private document shared by an author with one editor. Opening it, changing it, and recovering it after an outage pose different security questions.
On this page
Confidentiality, integrity, and availability
Confidentiality limits disclosure. Integrity preserves authorized changes and protects against unintended ones. Availability keeps the service and its data accessible when needed. Each goal can be expressed as an observable outcome.
Confidentiality An uninvited reader sees no document content.
Integrity A viewer cannot save a revision.
Availability A restored backup opens at the expected revision.
Model the data flow and its trust boundaries
A threat is something that could cause harm. A vulnerability is a weakness that makes the harm possible. At each trust boundary, record the asset, what could go wrong, and which component enforces the rule. In this example the browser proposes an edit and the API decides whether to accept it.
Asset Private document and revision history
Boundary Browser sends a proposed revision to the API
Risk A former editor could retain write access
Control Check current membership on each save
Evidence Revoking the editor prevents the next save