Security thinking

Draw trust boundaries

Mark where data or authority crosses between browsers, servers, databases, third parties, administrators, and local machines.

8 minute lesson

~~~

A trust boundary is a place where data or authority changes hands. Most security bugs appear because code trusts something too early.

The browser and server are different trust zones. So are your server and a webhook provider, or your application and a package downloaded during a build. Validate the crossing even when both systems belong to you.

A webhook reaches the same server as a browser request, but it carries a provider signature instead of a user session. Treating both requests alike can grant the webhook the wrong authority.

A diagram with boxes but no crossing data is decoration. Label the identity, payload, and credential that cross each boundary so we can name the verification.

Draw one note-creation request from browser to database and one webhook request into the same app. At every boundary, record the proof checked and test one request with that proof removed.

Lesson completed

Take this course offline

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

Get the download library →