An automated log-processing service account running in a GCP environment requires read-only access to source logs stored in a Cloud Storage bucket in Project Alpha (`src-logs-bucket`) and must write processed log output to a destination Cloud Storage bucket in Project Beta (`dst-logs-bucket`). Which of the following IAM role assignments adhere to the principle of least privilege while providing the necessary permissions? (Select TWO answers.)
- Grant Storage Object Viewer (roles/storage.objectViewer) on the source Cloud Storage bucket in Project Alpha.Cevap
- BGrant Editor (roles/editor) at the project level for both Project Alpha and Project Beta.
- Grant Storage Object Creator (roles/storage.objectCreator) on the destination Cloud Storage bucket in Project Beta.Cevap
- DGrant Storage Object Admin (roles/storage.objectAdmin) at the parent Organization level.
Cevap
The correct role assignments are granting Storage Object Viewer (roles/storage.objectViewer) on the source Cloud Storage bucket in Project Alpha, and granting Storage Object Creator (roles/storage.objectCreator) on the destination Cloud Storage bucket in Project Beta.
To adhere to the principle of least privilege, access must be scoped to the specific target resources and restricted to the minimum required permissions. Granting Storage Object Viewer on the source bucket in Project Alpha permits reading log files without access to other project resources. Granting Storage Object Creator on the destination bucket in Project Beta allows writing output logs without permitting reading or modifying existing objects.
Adım Adım Çözüm
Anahtar Kavram
Applying Least Privilege with Resource-Scoped Predefined IAM Roles
Tahmini Süre:1m 30s