Associate Cloud Engineer ยท Managing Cloud Storage and encryption keys
How do you secure objects in a Cloud Storage bucket?
Uniform bucket-level access vs ACLs, IAM roles for objects, signed URLs, public access prevention, versioning, retention policies and soft delete.
Key points
- Turn on uniform bucket-level access so only IAM governs access (ACLs are disabled).
- Enforce public access prevention to block allUsers and allAuthenticatedUsers.
- Share temporarily with signed URLs.
- Protect against loss with versioning, soft delete (default 7 days) and retention policies.
Source: https://docs.cloud.google.com/storage/docs/uniform-bucket-level-access
Practice questions
What happens to object ACLs when you enable uniform bucket-level access on a bucket?
- ACLs are disabled and access is controlled only by IAM
- ACLs are merged with IAM policies into one combined policy
- ACLs keep working but only for the bucket owner
- ACLs are converted to IAM bindings automatically
Show answer
Answer: A. ACLs are disabled and access is controlled only by IAM
With uniform bucket-level access, ACLs are disabled and only IAM grants access. They are not merged with IAM or converted automatically.
Which features help you recover from or prevent accidental deletion of objects?
- Object versioning
- Public access prevention
- Soft delete
- Retention policy
- Signed URLs
Show answer
Answer: A. Object versioning, C. Soft delete, D. Retention policy
Versioning keeps older generations, soft delete keeps deleted data for a retention window, and a retention policy blocks deletion until objects reach a given age. Public access prevention and signed URLs control who can reach data, not whether it can be deleted.
True or false: enforcing public access prevention on a bucket also makes signed URLs for that bucket stop working.
Show answer
Answer: False
False. Public access prevention blocks allUsers and allAuthenticatedUsers, but signed URLs rely on a service account's permissions and keep working.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
