Ensure there is at least one sink used to export copies of all the log entries available within your Google Cloud Platform (GCP) project. A sink is an object created to hold a log query and a destination. You can export logs by creating one or more log sinks that include a log query and an export destination. As Google Cloud Logging service receives new log entries, they are compared against each sink. If a log entry matches a sink object query, then a copy of the log entry is written to the sink's export destination.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
You can export copies of your logs outside of Google Cloud Logging environment using log sinks. You might want to export your logs for security, compliance, and operational reasons such as to store the logs for an extended period of time, to stream the logs to other applications, repositories, or third parties, and to use the exported logs as input data for big-data analysis tools.
Audit
To determine if there are sinks created to export all the log entries generated within your Google Cloud projects, perform the following actions:
Remediation / Resolution
To create and configure log routing sinks that export all the log entries generated within your Google Cloud projects, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Routing and storage overview
- Configure and manage sinks
- View logs in sink destinations
- Build queries in the Logs Explorer
- Configure aggregated sinks
- gsutil tool
- Create storage buckets
- iam - Get, set, or change bucket and/or object IAM permissions
- GCP Command Line Interface (CLI) Documentation
- Securing Google Cloud Computing Platform
- GSutil Documentation
- gcloud projects list
- gcloud beta logging sinks list
- gcloud beta logging sinks create