A security operations team needs to grant a newly hired auditor access to inspect system log entries in Cloud Logging and view Cloud Storage bucket metadata (such as bucket configuration and labels) within a single development project (`proj-dev-42`). The auditor must NOT be able to view object data stored inside the buckets, nor should they receive permissions across other projects in the organization. Adhering to the principle of least privilege, which of the following IAM role assignments should you implement? (Select TWO.)
- Grant the Logs Viewer role (roles/logging.viewer) bound to the principal on project proj-dev-42.Answer
- BGrant the primitive Viewer role (roles/viewer) bound to the principal on project proj-dev-42.
- Grant the Storage Bucket Viewer role (roles/storage.bucketViewer) bound to the principal on project proj-dev-42.Answer
- DGrant the Storage Object Viewer role (roles/storage.objectViewer) bound to the principal at the parent Organization level.
Answer
Grant the Logs Viewer role (roles/logging.viewer) on project proj-dev-42, and grant the Storage Bucket Viewer role (roles/storage.bucketViewer) on project proj-dev-42.
The solution grants narrow predefined roles at the specific project level. The Logs Viewer role allows the user to inspect logs in Cloud Logging, while the Storage Bucket Viewer role provides read-only access to Cloud Storage bucket metadata and configurations without allowing access to object contents.
Step-by-Step Solution
Key Concept
Principle of Least Privilege using Predefined IAM Roles and Project-Level Scoping