Skip to content

Part 08

Defense: Context for Reports

1 min readBroken Access Control

You’re not a defender, but understanding the fix makes your reports better and your conversations with security teams more credible.

  • Deny by default. Every endpoint should require an explicit allow.
  • Centralize policy. Use a single policy engine (OPA, Cedar, Casbin, Auth0 FGA, SpiceDB) rather than scattering if checks across the codebase.
  • Authorize on the resource, not just the role. “Is the caller an admin?” is incomplete, should be “is the caller authorized for this specific resource?”
  • Field-level allowlists for writes. Never bind a request body directly to a model.
  • Tenant context as a first-class principle. Every query in a multi-tenant app should filter by tenant at the lowest layer (row-level security in DB).
  • Re-validate at every trust boundary. Microservices, queues, workers, webhooks, each is a boundary.
  • Test authz with the same rigor as the rest of the stack. Contract tests per endpoint per role.
  • Log + alert on authz failures. A spike in 403s is a fingerprint of someone testing.
  • Carry authz into the AI layer. Enforce document ACLs at RAG retrieval time, and run agent tools with the user’s privileges, not the application’s, the checks must follow the data into the model (§5.7).
  • Treat the pipeline as production. Pin CI actions to commit SHAs, scope job tokens to least privilege, bind pipeline triggers to caller identity, and isolate runners per project (§5.8).

Broken Access ControlFor authorized security research only: bug bounty programs, your own systems, or scoped engagements with written permission.