Question

Difficulty: EasyConfiguring Storage Access Controls and Uniform Bucket-Level Access

Your organization requires that access to objects inside a Google Cloud Storage bucket named `finance-reports-prod` be managed strictly using unified Cloud IAM permissions, completely disabling fine-grained Object Access Control Lists (ACLs). Which command should you run to enable Uniform Bucket-Level Access on this bucket?

  1. gcloud storage buckets update gs://finance-reports-prod --uniform-bucket-level-accessAnswer
  2. B
    gcloud storage objects update gs://finance-reports-prod/* --canned-acl=bucketOwnerFullControl
  3. C
    gcloud storage buckets add-iam-policy-binding gs://finance-reports-prod --member=user:[email protected] --role=roles/owner
  4. D
    gcloud projects add-iam-policy-binding finance-project --member=user:[email protected] --role=roles/viewer

Answer

The command `gcloud storage buckets update gs://finance-reports-prod --uniform-bucket-level-access` correctly enables Uniform Bucket-Level Access on the bucket.
Executing `gcloud storage buckets update gs://finance-reports-prod --uniform-bucket-level-access` directly updates the target bucket configuration to enforce Uniform Bucket-Level Access, ensuring all access is governed by Cloud IAM roles and object ACLs are ignored.

Step-by-Step Solution

1
Identify the requirement for Uniform Bucket-Level Access (UBLA)
Recognize that legacy Object Access Control Lists (ACLs) must be disabled in favor of centralized Cloud IAM policies.
Uniform Bucket-Level Access unifies access control across Cloud Storage resources at the bucket level.
2
Select the appropriate gcloud CLI command and flag
Use `gcloud storage buckets update` with the `--uniform-bucket-level-access` flag targeted at the specific bucket URI.
This flag toggles the bucket setting to enforce uniform IAM permissions across all contained objects.

Key Concept

Configuring Uniform Bucket-Level Access in Google Cloud Storage
Rate this question