Lion Cipher Lab

Reimplement the AWS IAM policy-evaluation engine from scratch

Why it matters

The large majority of real AWS compromises are not exotic exploits -- they are identity misconfigurations: a policy that grants more than anyone intended, or a 'deny' someone assumed was in force but never was. The durable skill is not clicking 'deny' in the console; it is being able to reason precisely about WHY a given request is granted or refused, across identity policies, resource policies, SCPs and permissions boundaries at once. The single most expensive misconception in that reasoning is treating Allow as additive across every policy type -- as if attaching one more policy can only…

What you'll learn

Steps in this lab

  1. The question this engine answers
  2. The evaluation order, and why the order is the whole point
  3. Build the matchers: actions, ARNs, and conditions
  4. Build 'does this statement apply?'
  5. Build the core: eval_policies, ceilings, and the ordered authorize()
  6. Add a runner and four worked policy fixtures
  7. Run the four scenarios and read the real traces
  8. The judgment: why 'Allow is additive' is the costliest IAM myth
  9. Name the limits honestly: what this engine does NOT model

Open the full interactive lab →