Soru

Zorluk: OrtaDeploying and Configuring Cloud Storage Buckets and Objects

A cloud engineer is configuring a Google Cloud Storage bucket named `media-assets-prod` for a streaming application. Security policies require that access control must be managed uniformly across all objects using Identity and Access Management (IAM) rather than individual object ACLs. Additionally, a service account named `[email protected]` must be granted permission to read objects stored in the bucket using modern `gcloud storage` CLI commands. Which TWO commands should the engineer execute to achieve this configuration? (Select TWO.)

  1. gcloud storage buckets update gs://media-assets-prod --uniform-bucket-level-accessCevap
  2. B
    gsutil acl ch -u [email protected]:R gs://media-assets-prod
  3. gcloud storage buckets add-iam-policy-binding gs://media-assets-prod --member="serviceAccount:[email protected]" --role="roles/storage.objectViewer"Cevap
  4. D
    gcloud storage buckets add-iam-policy-binding gs://media-assets-prod --member="serviceAccount:[email protected]" --role="roles/owner"

Cevap

Enabling uniform bucket-level access via `gcloud storage buckets update gs://media-assets-prod --uniform-bucket-level-access` and granting read permissions with `gcloud storage buckets add-iam-policy-binding gs://media-assets-prod --member="serviceAccount:[email protected]" --role="roles/storage.objectViewer"` fulfills all security requirements.
To satisfy uniform access control and principle of least privilege, Uniform Bucket-Level Access must be enabled using `gcloud storage buckets update --uniform-bucket-level-access`, and object read access must be granted using the predefined `roles/storage.objectViewer` IAM role via `gcloud storage buckets add-iam-policy-binding`.

Adım Adım Çözüm

1
Enable Uniform Bucket-Level Access on the Cloud Storage bucket
Disables Access Control Lists (ACLs) and forces IAM to handle permissions uniformly for all objects in the bucket.
Meets the security mandate of restricting access management strictly to IAM policies.
2
Bind the predefined IAM role `roles/storage.objectViewer` to the service account
Grants read access for objects inside `gs://media-assets-prod` without granting administrative access.
Adheres to the principle of least privilege for CDN read operations.

Anahtar Kavram

Deploying and configuring Cloud Storage buckets with Uniform Bucket-Level Access and IAM roles using gcloud storage CLI.
Bu soruyu puanla