GCP Associate Cloud Engineer Practice Question 100: Public Access Prevention Enforced
Google Cloud Associate Cloud Engineer · Test 10 · question 10 of 10
A security review finds that a few Cloud Storage buckets could be made publicly readable by mistake if a future IAM binding accidentally granted access to allUsers or allAuthenticatedUsers. You want to guarantee that these specific buckets can never become publicly accessible, regardless of any IAM policy or ACL that is applied to them later, without changing any organization-wide policy.
What should you configure on each bucket?
Show answer and explanation
Answer:
Setting public access prevention to enforced on a bucket blocks public access to that bucket's data regardless of any IAM policy or ACL, including bindings that grant access to allUsers or allAuthenticatedUsers, and it applies directly at the bucket level without needing an organization policy change.
Option A is wrong because uniform bucket-level access only disables ACLs in favor of IAM for managing permissions; it does not by itself prevent an IAM binding from granting public access. Option C is wrong because a locked retention policy controls how long objects must be retained before they can be deleted or overwritten; it has nothing to do with who can read the objects. Option D is wrong because CMEK controls which key is used to encrypt data at rest; it does not restrict who can be granted read access to the bucket's contents.
Reference: Public access prevention