Identity and Least Privilege
Short-lived credentials, role design and access reviews that hold up in an audit.
Hello. In this lesson I will take you through 3 ideas, one at a time.
Why it matters: Short-lived credentials, role design and access reviews that hold up in an audit. After each idea I will ask you one quick question.
In this lessonFollows you as you read
No long-lived keys
The short version: Static access keys in code, CI variables or laptops are the most common way cloud accounts are breached.
Static access keys in code, CI variables or laptops are the most common way cloud accounts are breached. Replace them with short-lived credentials: single sign-on for people, workload identity federation for CI pipelines, and instance or pod roles for applications. A key that expires in an hour is far less valuable to an attacker than one that lives for years.
The cost of getting identity wrong is high. IBM's 2026 Cost of a Data Breach study put the global average breach at USD 4.99 million.
What is the most common way cloud accounts are breached?
Design roles around jobs
The short version: Give people roles that match what they do, such as read-only for most engineers in production, a deploy role used only by the pipeline, and a time-limited admin role that needs approval.
Give people roles that match what they do, such as read-only for most engineers in production, a deploy role used only by the pipeline, and a time-limited admin role that needs approval. Start narrow and widen when there is a real need, rather than starting with administrator rights and promising to tighten later.
Use permission boundaries or deny policies so even a broad role cannot do the most dangerous things, such as deleting the log archive or turning off encryption.
What should most engineers have in production?
Review and prove it
The short version: Auditors and customers will ask who can do what.
Auditors and customers will ask who can do what. Make the answer a report, not a meeting.
- Quarterly access reviews with managers confirming each person's roles
- Alerts on use of break-glass or root accounts
- Unused permissions removed based on access analysis
- Service accounts owned by a named team, with expiry dates
What does a permission boundary do?
- Replace static keys with short-lived credentials everywhere
- Design roles around jobs and start narrow
- Use boundaries so broad roles still cannot do the worst things
- Run access reviews and alert on privileged use
Search your repositories and CI settings for static cloud keys. List each one, what uses it, and the short-lived alternative. Plan the removal of the three most powerful keys this month.
Mark it complete to track your progress on this device.