A security team needs to grant a newly hired compliance auditor access to review IAM policy bindings and inspect Cloud Logging logs within project `analytics-prod-404`. The auditor must NOT be granted access to read actual data stored inside Cloud Storage buckets or BigQuery tables, nor be permitted to modify any security policies. Which of the following IAM role assignments adhere to the principle of least privilege while fulfilling these requirements? (Select TWO.)
- Assign the Security Reviewer role (`roles/iam.securityReviewer`) on project `analytics-prod-404`.Answer
- Assign the Logs Viewer role (`roles/logging.viewer`) on project `analytics-prod-404`.Answer
- CAssign the Project Viewer role (`roles/viewer`) on project `analytics-prod-404`.
- DAssign the Security Reviewer role (`roles/iam.securityReviewer`) at the Organization level.
Answer
The correct role assignments are granting the Security Reviewer role (`roles/iam.securityReviewer`) on project `analytics-prod-404` and granting the Logs Viewer role (`roles/logging.viewer`) on project `analytics-prod-404`.
Combining the predefined roles `roles/iam.securityReviewer` and `roles/logging.viewer` at the project resource level directly satisfies the least-privilege requirement. It provides read access to security configurations and Cloud Logging logs without exposing stored data or extending access beyond project `analytics-prod-404`.
Step-by-Step Solution
Key Concept
Principle of Least Privilege with Predefined Roles and Resource Hierarchy Scoping