Cloud security
Least privilege (cloud IAM)
A cloud access key should grant only the exact actions and resources its job needs; a wildcard grant hands over far more.
Least privilege means an access key may do only what its job needs. In cloud IAM, a policy on each key lists
its allowed actions and resources. The usual mistake is a wildcard: an action allowed on *, every resource. The
key still works, but if it leaks it reads everything. Scope the policy to named resources: that also limits a key
stolen from the [[instance-metadata-ssrf|metadata service]].
Read next
- Public cloud storage Cloud object storage is private by default; a single `public` flag makes a bucket answer anyone, credentials or not.
- Instance metadata & SSRF Every cloud instance reads its role's short-term keys from a link-local metadata service; an app with an SSRF can be made to read them for an attacker.
- Broken access control An access check that rests on something the client controls, so an attacker simply sets it and walks past.
- Infrastructure-as-code security Cloud estates are built from declarative code; the misconfiguration ships from a line in that code, so the cheapest place to catch it is the review.
- Serverless injection A serverless function that folds untrusted input into a template or format string can be driven to reflect its own environment — where its role credentials live.