Skip to content

How do you make sure every read and write checks that this user is allowed to see this record?

Module
02/05Module
To read
~9 minTo read

It starts with a failure

An invoices API checked that the user was signed in, then fetched the invoice by the ID in the URL. What do you think a curious customer found?

In the module you make your guess first, then read what happened and why.

  1. 01

    Check the Record, Not Just the Login

  2. 02

    Enforce It on the Server, at Every Entry Point

  3. 03

    Deny by Default, in the Database Too

  4. 04

    Return and Accept Only Allowed Fields

SpecAccess rules: who can see what

A spec for your own app, as a text file you download. The module also gives you the prompt for Claude Code, Codex or Antigravity, a checklist to check what it built, and recommended skills.

  • Authentication and authorization
  • API gateways