What is Least Privilege?
The principle of least privilege, told as a story about giving everyone in the castle only the keys they need.
The cook carries the key ring for the whole castle.Her one job is the kitchen. But the vault key and the gate key hang on the same ring. It's just easier.
Lose the ring and every door opens. Not just the kitchen — the vault too.The thief wasn't after the kitchen. He just picked up a dropped ring — and the whole castle was on it.
Least privilege means giving only the keys the job needs.Only what's needed, only when needed, returned when not. Fewer keys means losing less when you lose them.
A key needed only today is borrowed briefly. And every month, unused keys are collected.A borrowed key wears a tag: until sunset. The ledger catches keys unused for three months and keys of people who left. Keys only ever pile up on their own.
Even if the thief steals the key, all he gets is one kitchen.Split keys by hat, keep the vault key in the vault's own box, and ask again at every door — the thief has almost nowhere to go.
Least privilege = give everyone only the keys their job needs, only when needed, and take back the unused ones. So that losing one loses little.
Give every user, program, and account only the minimum access its job requires. Excess privilege widens breach damage and gives privilege-escalation attacks a foothold. JIT access, role-based access control, and regular access reviews keep the principle alive.
When grown-ups say it
- Principle of least privilege
- Only the keys you need. Applies the same to people, programs, and service accounts.
- Privilege escalation
- From the kitchen key to the vault. A thief starts with one small key and hunts for bigger ones. Fewer keys, fewer places to go.
- Over-privileged
- More keys than the job needs. Nobody asks for a key back once it's given. That's why the check exists.
- Just-in-time access
- The key borrowed until sunset. Granted briefly when needed, returned automatically. → the master key in the vault
- Role
- The ring that comes with the hat. The cook's hat comes with the kitchen key only. → a key ring for every hat
- Admin account
- The ring for the whole castle. Never carried all day. Taken out only to fix things; the rest of the time, an ordinary key.
- Access review
- The monthly key check. Collects unused keys and the keys of people who left. → the castle's registry office
- Zero Trust
- Asking again at every door. Even with a key, every door checks again. Least privilege's partner. → the castle that asks at every door