Information Security
IAM and Access Management
Capital One 2019. One HTTP request to http://169.254.169.254/latest/meta-data/iam/security-credentials/. The WAF EC2 instance's credentials. The IAM role had GetObject on all S3 buckets. The fix was a 5-minute policy change that the team had discussed but never prioritized. 106 million records. $80 million fine. IAM misconfiguration is not a technical failure - it is a process failure. Least privilege must be enforced systematically, not aspirationally.
- **Capital One 2019**: overly permissive IAM role + SSRF = 106 million records. The IAM policy was corrected in 5 minutes - it just was not done earlier.
- **Tesla 2018**: K8s dashboard with no password -> pod with AWS credentials in env vars -> crypto mining on EC2 at Tesla's expense.
- **Uber 2022**: AWS credentials committed to GitHub -> S3 and RDS access -> 57 million records. Rule: IRSA only, no static keys.
IAM Policies: Precise Permission Boundaries
2019. Capital One. The IAM role for the WAF service had s3:GetObject on all S3 buckets instead of one specific bucket. Through an SSRF attack, the attacker obtained the EC2 instance credentials and used the overly permissive IAM role to download 106 million customer records. The fix: 5 minutes to scope the policy to one bucket. The cost of not doing it earlier: $80 million fine.
Wildcard * in Action or Resource is a red flag. s3:* combined with * Resource equals full S3 access to the entire account. AWS Access Analyzer automatically finds overly permissive policies and generates least-privilege recommendations based on CloudTrail access history. Run it quarterly on all IAM roles.
A Lambda function processes orders and writes to a DynamoDB table named 'orders'. What is the minimal IAM policy needed?