Lion Cipher Lab

Build Attribute-Based Access Control (ABAC) — and see where RBAC runs out

Why it matters

Almost every access decision that actually bites in the real world is CONDITIONAL: a doctor may read a chart, but only for their own patients; an engineer may deploy, but only during business hours and only to their own team's service; a contractor may view a document, but only if it is not classified above their clearance and only from a corporate IP. Role-Based Access Control — the model most people reach for first — answers 'what can this role do?' and it is excellent for coarse, stable grants. But the moment access depends on the relationship between the person and the specific thing, or…

What you'll learn

Steps in this lab

  1. Where RBAC runs out — the 'role explosion' problem
  2. The ABAC idea: Subject × Action × Resource × Environment → Permit/Deny
  3. Set up: confirm Python and make a file (no installs needed)
  4. Build the ABAC engine: attributes, predicates, and authorize()
  5. Run it: watch the SAME subject flip from Permit to Deny
  6. Name the parts: PDP, PEP, PIP, PAP (the NIST model)
  7. The real world: OPA / Rego and AWS IAM condition keys
  8. The judgment: when ABAC beats RBAC, when RBAC still wins, and the hybrid
  9. What you did — and the reflex to keep

Open the full interactive lab →