A cloud engineer is migrating an enterprise Cloud Storage bucket named `archival-reports-prod` to meet security audit compliance standards requiring Uniform Bucket-Level Access (UBLA). Previously, legacy applications relied on individual object Access Control Lists (ACLs) for read permissions. Immediately after the engineer enables UBLA on the bucket, a dedicated service account `[email protected]` receives HTTP 403 Access Denied errors when reading objects. The engineer must restore object read permissions for this service account while strictly maintaining UBLA enforcement. Which administrative action should the engineer take?
- Grant the predefined Storage Object Viewer role (roles/storage.objectViewer) to serviceAccount:[email protected] at the bucket level.Answer
- BExecute gcloud storage objects update gs://archival-reports-prod/* --add-acl-grant=entity=serviceAccount:[email protected],role=READER to re-grant read access on all objects.
- CGrant the primitive Viewer role (roles/viewer) to serviceAccount:[email protected] at the Google Cloud project level.
- DDisable Uniform Bucket-Level Access, grant object ACLs to the service account, and attach a project-level IAM deny policy to block access to all other buckets.
Answer
Grant the predefined Storage Object Viewer role (roles/storage.objectViewer) to serviceAccount:[email protected] at the bucket level.
When Uniform Bucket-Level Access (UBLA) is enabled on a Cloud Storage bucket, ACLs are disabled and ignored. Permission management transitions exclusively to IAM. Assigning the predefined Storage Object Viewer role (`roles/storage.objectViewer`) directly to the service account at the bucket level grants read access to all objects in the bucket while upholding UBLA compliance and maintaining least-privilege security standards.
Step-by-Step Solution
Key Concept
Uniform Bucket-Level Access (UBLA) enforcement and Cloud Storage IAM role delegation