An enterprise financial organization runs microservice workloads across multiple Google Cloud projects in an organization. The security operations team requires all Data Access Audit Logs and application error logs to be streamed in real-time to a centralized security telemetry project for compliance auditing and threat detection. However, high-volume HTTP request logs and operational INFO logs must be excluded to prevent excessive Cloud Logging ingestion costs. The lead architect creates an organization-level Log Router sink targeting a Pub/Sub topic in the central project. How should the architect configure the Log Router sink and permissions to fulfill these requirements securely without dropping essential security logs?
- Configure an inclusion filter matching logName containing 'cloudaudit.googleapis.com/data_access' OR severity >= ERROR, and grant the Log Router unique service account the roles/pubsub.publisher role on the target Pub/Sub topic.Answer
- BConfigure a broad sink filter capturing all logs, but add an exclusion filter with severity <= INFO, and grant the Log Router unique service account the primitive Owner role on the centralized security project.
- CConfigure an inclusion filter for all organizational logs, grant the Log Router service account the roles/editor role on the destination project, and rely on BigQuery view filters after log export to drop unwanted logs.
- DConfigure the inclusion filter for audit and error logs, grant the Pub/Sub Publisher role, but rely strictly on IAM roles to prevent unauthorized cross-project egress without configuring VPC Service Controls perimeters.
Answer
Configure an inclusion filter matching logName containing 'cloudaudit.googleapis.com/data_access' OR severity >= ERROR, and grant the Log Router unique service account the roles/pubsub.publisher role on the target Pub/Sub topic.
The correct approach uses explicit inclusion filters to capture specific audit log types (Data Access Audit Logs) along with high-severity application errors (severity >= ERROR). This prevents low-severity noise from being ingested while ensuring audit records (which may have NOTICE or DEFAULT severity) are retained. Additionally, granting the predefined Pub/Sub Publisher role to the sink's dedicated service account adheres strictly to the principle of least privilege.
Step-by-Step Solution
Key Concept
Organization Log Router Sinks and Cloud Audit Logging Ingestion Optimization
Estimated Time:2m 0s