Lion Cipher Lab

Enable Kubernetes audit logging and hunt in it

Why it matters

In AWS you have CloudTrail: a running record of who called which API, when, and whether it was allowed. Kubernetes has the exact same thing — the control-plane audit log, written by the API server — and almost nobody turns it on. That is the gap this lab fixes. RBAC (role-based access control) decides what a caller is ALLOWED to do; the audit log records what actually HAPPENED, which is a completely different and equally essential question. When a container is compromised through a leaked token or a vulnerable dependency, the attacker does not trip an alarm by existing — they trip one by…

What you'll learn

Steps in this lab

  1. The words first: API server, audit log, and the gap RBAC leaves
  2. Prove the gap: a plain kind cluster writes no audit log
  3. Write the audit policy: four levels, and why RequestResponse on secrets
  4. Stand up a kind cluster that actually writes the log
  5. Generate security-relevant events on purpose
  6. Hunt in the log with jq: who read secrets, who exec'd, what was forbidden
  7. The judgment: cost vs signal, ship it off-cluster, and what this log is NOT

Open the full interactive lab →