Least privilege
Least privilege is the security principle that every user, program and service should run with the smallest set of permissions it needs to do its job, for only as long as it needs them. A reporting job that reads one bucket should not be able to delete it.
How it works
In the cloud this means scoping identity and access management (IAM) policies by action and resource. Compare two grants for the same job:
Broad:
s3:*on*, which can read, write and delete every bucket in the account.Least privilege:
s3:GetObjectonarn:aws:s3:::reports-prod/*, which can only read objects in one bucket.
Short-lived credentials, separate roles per service, and access reviews keep the grant small over time. Unused permissions are found from access logs and removed.
Why it matters in production
Permissions decide the blast radius of a mistake or a leaked key. A stolen key that can only read one bucket is an incident. A stolen admin key can become the whole company's outage. Least privilege also makes audits shorter, because each role has a clear purpose.
See also
On the One2N blog
Further reading
