An organization requires a third-party security auditor service account to review configuration settings and read log archives stored inside a single designated Cloud Storage bucket (`sec-audit-logs-2026`) located within the `analytics-prod` project. The auditor must not be able to view objects in any other buckets, nor should they have permissions to alter or delete any resources. Following Google Cloud best practices and the Principle of Least Privilege, how should you grant the necessary permissions?
- Grant the predefined role Storage Object Viewer (`roles/storage.objectViewer`) directly on the `sec-audit-logs-2026` Cloud Storage bucket.Cevap
- BGrant the primitive Viewer role (`roles/viewer`) on the `analytics-prod` project resource.
- CGrant the predefined role Storage Object Viewer (`roles/storage.objectViewer`) at the parent Folder level containing the `analytics-prod` project.
- DGrant the primitive Editor role (`roles/editor`) directly on the `sec-audit-logs-2026` Cloud Storage bucket.
Cevap
Grant the predefined role Storage Object Viewer (`roles/storage.objectViewer`) directly on the `sec-audit-logs-2026` Cloud Storage bucket.
Binding the predefined role Storage Object Viewer directly to the designated bucket follows the Principle of Least Privilege by restricting access strictly to the requested bucket resource without granting excessive project-wide permissions or write capabilities.
Adım Adım Çözüm
Anahtar Kavram
Applying IAM policy bindings at the specific resource level using predefined roles to enforce least privilege.
Tahmini Süre:2m 0s