A team of external compliance reviewers needs permission to inspect Admin Activity audit logs for a target Google Cloud project to verify infrastructure modification events. The reviewers must not be able to view sensitive Data Access audit logs containing user payloads, nor should they receive read or write permissions for project compute and storage resources. Following Google Cloud security best practices and the principle of least privilege, which IAM role configuration should be implemented?
- Grant the Logs Viewer (roles/logging.viewer) role to the compliance team directly on the target project.Answer
- BGrant the basic Viewer (roles/viewer) role to the compliance team directly on the target project.
- CGrant the Logs Viewer (roles/logging.viewer) role at the parent folder level, while revoking logging permissions on the target project.
- DGrant the basic Editor (roles/editor) role to the compliance team to allow log access through Cloud Logging APIs.
Answer
Grant the Logs Viewer (roles/logging.viewer) role to the compliance team directly on the target project.
Granting the predefined Logs Viewer (roles/logging.viewer) role on the project provides the exact permissions required to inspect Admin Activity logs, System Event logs, and Access Transparency logs. It explicitly excludes access to sensitive Data Access logs (which require Private Logs Viewer) and does not grant any read/write permissions to underlying GCP resources.
Step-by-Step Solution
Key Concept
Least Privilege IAM Access for Cloud Audit Logs
Estimated Time:1m 30s