== STEP 1 fresh test bucket, nothing public anonymous GET reports/q3.csv blocked (403 private) == STEP 2 attach a 'quick fix' policy: Principal *, s3:GetObject anonymous GET reports/q3.csv EXPOSED (allowed by public bucket policy) anonymous LIST bucket blocked (GetObject only: attacker must already know key names) == STEP 3 swap in the 'AWS: *' policy that also allows ListBucket anonymous LIST bucket EXPOSED keys visible: reports/payroll.csv, reports/q3.csv == STEP 4 the ACL route (separate bucket, public-read object ACL, no policy) anonymous GET promo/flyer.pdf EXPOSED (allowed by public object ACL) == STEP 5 which single switch fixes what? (exposure already in place) switch turned on old public policy old public ACL new public policy new public ACL BlockPublicAcls - - - stops it IgnorePublicAcls - stops it - - BlockPublicPolicy - - stops it - RestrictPublicBuckets stops it - - - ALL FOUR stops it stops it stops it stops it == STEP 6 all four switches on, then try the bad policy again anonymous GET reports/q3.csv blocked (public policy ignored (RestrictPublicBuckets)) put bad policy again AccessDenied: BlockPublicPolicy rejected the public policy == STEP 7 the trap: the bad policy is STILL attached policy still on bucket: True someone toggles switches off EXPOSED (allowed by public bucket policy) policy deleted + switches on blocked (403 private)