Lion Cipher Lab

Model, fix and retest object-level authorization in a tiny API, with the audit log a defender needs

Why it matters

Knowing that an API is vulnerable is half the work. The other half is seeing the fix go in, proving it with the same tests, and leaving behind a log that would have shown the problem. This lab does all three on an API small enough to read in one sitting. It uses the shape OWASP's cheat sheet recommends, an authorization matrix in a file that drives the tests, so you can watch rows change from failing to passing. And it adds the log lines that the access log in an earlier lab could not provide: who, which object, whose, and what the decision was.

What you'll learn

Steps in this lab

  1. What you are building, and the rule
  2. Save the API, the matrix, and the two scripts
  3. Run the matrix against the vulnerable API
  4. Read the audit log: a signal before any fix
  5. The fix: two conditions
  6. Retest with the same matrix, and read the new log
  7. The defender's view: what to carry into a real API
  8. Clean up

Open the full interactive lab →

Keep learning