An e-commerce platform recently enabled Uniform Bucket-Level Access on a Cloud Storage bucket named `order-receipts-prod` to align with company security governance. Shortly after enforcement, an automated ingestion microservice fails when uploading receipt PDFs, returning an HTTP 400 error indicating that Access Control Lists (ACLs) are disabled. Inspection reveals the microservice uses a legacy SDK configured to attach a `public-read` canned ACL to each uploaded object. You must restore microservice functionality while maintaining Uniform Bucket-Level Access compliance on the bucket. Which action should you take?
- Update the microservice code to upload objects without specifying canned ACLs, and assign the Storage Object Creator role to the microservice service account on the bucket.Cevap
- BModify the bucket configuration to allow fine-grained ACLs alongside Uniform Bucket-Level Access so the legacy canned ACL uploads can succeed.
- CRemove the canned ACL payload from the microservice and grant the microservice service account the Project Editor primitive role.
- DGrant object-level Owner ACLs to the microservice service account and revoke IAM Viewer permissions at the project level to override inherited access.
Cevap
Update the microservice code to upload objects without specifying canned ACLs, and assign the Storage Object Creator role to the microservice service account on the bucket.
When Uniform Bucket-Level Access (UBLA) is enabled on a Google Cloud Storage bucket, fine-grained object Access Control Lists (ACLs) are disabled. All access must be authorized using Cloud IAM permissions. Removing the legacy canned ACL metadata from the application's upload request fixes the API rejection, while granting the predefined 'Storage Object Creator' IAM role to the microservice's service account ensures least-privilege compliance.
Adım Adım Çözüm
Anahtar Kavram
Uniform Bucket-Level Access and IAM Role Allocation