How it works · 33 of 38 Core
What is least privilege in cloud identity and access management?
A badge for every person and program
Identity & least privilege: Every person and every program in the cloud acts under an identity whose permissions list what it may do to which resources; least privilege means each identity can do only what its job needs, so a stolen, tricked or mistaken identity opens one room, not the building; programs get their identity from the platform as short-lived credentials (workload identity) instead of stored keys.
Loading the animation…
Say it like this Every person and every program in the cloud has an identity, and least privilege means each one can open only the doors its job needs, so a stolen or tricked identity opens one room, not the building.
Under the hood — for builders
- Real case: Capital One (2019)
- An outsider got a web firewall's role credentials, then used that role to list and copy the bank's storage buckets:
- Four months unseen
- In on 22–23 March 2019; Capital One found it on 19 July, about four months later.
- The regulator's verdict
- The OCC fined the bank $80 million for weak risk assessment before moving to the public cloud (2020).
- One badge, written two ways
- A policy says which actions a role (a program's identity) may take on which resources:
- Least privilege
- Give each role only the actions and resources its job needs: the firewall writes its logs, nothing else.
- Harden the metadata service
- Require IMDSv2: credentials need a session token from a PUT request, and PUTs carrying X-Forwarded-For are refused.
- Measure it
- Compare what each role may do with what it used in 90 days (IAM Access Analyzer); remove the rest.
- Watch out
- "*" in a policy is a door list nobody has read. One shared role for ten programs defeats all of this.
- Sources
- Capital One, cyber incident facts page · US v. Paige Thompson, criminal complaint (W.D. Wash., 2019) · OCC release 2020-101 (6 Aug 2020) · AWS EC2 guide, "Configure the instance metadata service" (read November 2026).
What happens in the identity & least privilege animation, step by step?
- In the cloud, every person and every program carries an identity, a badge, and the badge lists which doors it opens. This web firewall has one job that needs a door: writing its own logs.
- Your turn: tap the doors the firewall's badge should open. Teams in a hurry tick broadly so nothing breaks. What does this badge really need?
- Now a stranger sends the firewall a trick request, and it hands over its badge. The stranger walks the corridor and swipes every door: whatever the badge lists swings open.
- This happened. In 2019 an attacker tricked Capital One's misconfigured web firewall into handing over its credentials. They could list and read storage buckets: more than 700 were copied, with data on about 106 million people.
- Capital One's badge was short-lived, so it was the reach that did the damage. Give every program its own badge that expires within hours, scope it to its doors, and alarm when it tries one it never uses.
- Some keys can't be badges from the cloud: a payment partner's API key, a database password. Where should those live, so they don't end up in the code? Next: secrets and key management.
What everyday example explains identity & least privilege?
Staff badges in an office. Each badge opens only the rooms that person's job needs (permissions); the cleaner's badge doesn't open the safe, so a lost cleaner's badge costs a cleaning cupboard, not the safe (least privilege); and visitor badges stop working at the end of the day (short-lived credentials).
Why should a team care about identity & least privilege?
When you deploy a program, give it its own identity, write its permissions from what it does rather than "*", use the platform's short-lived credentials instead of stored keys, and review unused permissions; for people, grant admin rights on request and for hours, not permanently.