A company requires an external compliance officer to audit security configurations in a Google Cloud project named `finance-analytics-prod`. The auditor needs to inspect IAM policy bindings across the project and view metadata configurations for Cloud Spanner instances and databases. The auditor must NOT be able to read sensitive records stored inside the Spanner database tables or alter any GCP resources. Which TWO IAM role assignments should you configure for the auditor at the project level to satisfy these requirements while adhering to the principle of least privilege?
- Grant the Security Reviewer role (`roles/iam.securityReviewer`) on the project.Answer
- Grant the Cloud Spanner Viewer role (`roles/spanner.viewer`) on the project.Answer
- CGrant the primitive Viewer role (`roles/viewer`) on the project.
- DGrant the Security Reviewer role (`roles/iam.securityReviewer`) at the parent Organization level.
Answer
Assign the Security Reviewer role (`roles/iam.securityReviewer`) and the Cloud Spanner Viewer role (`roles/spanner.viewer`) at the project level.
To grant read-only security audit capabilities and Spanner metadata visibility under the principle of least privilege, predefined roles should be bound at the target project scope. The Security Reviewer role (`roles/iam.securityReviewer`) allows security configuration and IAM policy inspection, while the Cloud Spanner Viewer role (`roles/spanner.viewer`) grants metadata read access without permitting data row retrieval.
Step-by-Step Solution
Key Concept
Applying Predefined Roles at the Project Level for Least-Privilege IAM Audit Access