Concepts / Cloud security

Cloud security

Least privilege (cloud IAM)

Also called IAM over-permission, over-privileged key, wildcard policy, scoped policy

A cloud access key should grant only the exact actions and resources its job needs; a wildcard grant hands over far more.

A leaked key reads what its policy allows
A leaked key reads what its policy allows

With a wildcard policy a leaked key reads every bucket. With a policy scoped to one bucket, the same leak reaches only that bucket.

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]].

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab