A lead infrastructure engineer is setting up audit log access for a developer team working within a Google Cloud project. The developers currently possess permissions to view standard Admin Activity audit logs, but they are unable to view Data Access audit logs required for troubleshooting data interactions. Following Google Cloud security best practices and the principle of least privilege, which IAM role should be assigned to the developers?
- Private Logs Viewer (roles/logging.privateLogViewer)Answer
- BProject Viewer (roles/viewer)
- CLogs Viewer (roles/logging.viewer) assigned at the Organization level
- DOrganization Policy Admin (roles/orgpolicy.policyAdmin)
Answer
The Private Logs Viewer role (roles/logging.privateLogViewer) should be assigned to the developers.
Data Access audit logs contain sensitive API call data and user-provided data. Google Cloud restricts visibility of these logs so that standard log viewers (using roles/logging.viewer) cannot view them. To view Data Access audit logs while maintaining least privilege, users must be granted the Private Logs Viewer role (roles/logging.privateLogViewer).
Step-by-Step Solution
Key Concept
Cloud Audit Logs access control and least privilege role assignment for Data Access logs