Lion Cipher Lab

Reimplement EKS IRSA web-identity trust evaluation from scratch

Why it matters

IRSA (IAM Roles for Service Accounts) is how the overwhelming majority of production EKS workloads get AWS credentials: no long-lived access keys baked into a pod, just a short-lived signed token the pod trades for temporary role credentials. That trade is governed by a role TRUST policy, and trust policies are where the expensive mistakes live. The single costliest one is writing a trust policy that checks only the token's audience (aud) and forgets to pin the subject (sub) -- because then ANY service account in the entire cluster, in any namespace, can assume that role. It is a textbook…

What you'll learn

Steps in this lab

  1. The question this engine answers: how does a pod get AWS creds with no keys?
  2. Mint the projected ServiceAccount token: a signed JWT + a JWKS
  3. The trust policy, and the exact checks STS runs before it trusts a token
  4. Build the primitives: verify an RS256 signature, evaluate a condition
  5. Build the core: assume_role_with_web_identity with a decision trace
  6. Run six scenarios: watch the confused deputy, then pin sub to fix it
  7. The judgment: aud proves the cluster, only sub proves the pod
  8. IRSA vs EKS Pod Identity, and when NOT to hand-roll this

Open the full interactive lab →