Protect by default

Use defense in depth

Combine independent preventive, detective, and recovery controls so one failed safeguard does not become a complete compromise.

8 minute lesson

~~~

One perfect defense does not exist. Good systems assume a control can fail.

Input validation, database constraints, authorization, safe output handling, logs, and backups solve different parts of a failure. Layers help only when they are independent. Repeating the same assumption in five places is still one weakness.

A notes API checks ownership, the database query includes owner_id, and an audit event records denied cross-user reads. If the route check disappears, the query still blocks the read and the event reveals the attempt.

Five checks that all trust the same client-supplied owner ID are one defense, not five. Useful layers fail independently.

Choose one cross-user read and name its preventive, detective, and recovery controls. Disable the first control in a test environment, then show the remaining control still denies access and records the attempt.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →