IAM Least Privilege
The access-control principle of granting users, roles, and workloads only the exact permissions and resource scope required to perform their task, minimizing blast radius on compromise
Table of Contents
Structure Diagram
Action: '*' · Resource: '*'
- Policys3:* on Resource: '*' (all buckets)
- CredentialsStatic long-lived Access Keys
- Blast Radius1 bug compromises entire cloud account
Exact action & ARN · Short-lived
- Policys3:GetObject on uploads-bucket/* only
- CredentialsShort-lived STS / OIDC role tokens
- Blast RadiusStrictly contained to 1 bucket read
What is IAM Least Privilege?
The access-control principle of granting users, roles, and workloads only the exact permissions and resource scope required to perform their task, minimizing blast radius on compromise. It is a core concept in Cloud Security within Cloud / DevOps.
Core Principles
The Principle of Least Privilege in IAM dictates that every human user and machine workload (pod, Lambda, CI runner) receives only the exact actions, specific resource ARNs, and conditions required to do its job—and nothing more.
In modern cloud environments, identity is the primary security perimeter. Even if an attacker compromises a web container via an application vulnerability, a tightly scoped IAM role prevents them from pivoting to production databases, backups, or billing settings.
Practical Takeaways
- Eliminate static long-lived keys: Replace permanent IAM user access keys with short-lived federated tokens via GitHub Actions OIDC, AWS EKS Pod Identity (IRSA), or GCP Workload Identity.
- Right-size permissions from audit logs: Use tools like AWS IAM Access Analyzer or GCP IAM Recommender to generate tight policies from actual CloudTrail usage and prune unused wildcard permissions regularly.
- Use Just-In-Time (JIT) elevation for humans: Give engineers read-only production access by default and require audited, time-boxed elevation (1–2 hours) for break-glass incident response.
Notable Examples
- EKS Pod Identity / IRSA & GKE Workload Identity: Binds narrow cloud permissions to individual Kubernetes Pods rather than sharing broad node-level roles.
- AWS Organizations SCPs: Enforces organization-wide guardrails (such as preventing CloudTrail deletion) that even account admins cannot bypass.
- Kubernetes RBAC: Scopes namespace-level
Rolepermissions so teams cannot read secrets or modify workloads outside their boundary.