Skip to main content

πŸ“ Google Logging Log Metric Filter and Alerts for Audit Configuration Changes do not exist 🟒

  • Contextual name: πŸ“ Log Metric Filter and Alerts for Audit Configuration Changes do not exist 🟒
  • ID: /ce/ca/google/logging/configuration-changes-monitoring
  • Located in: πŸ“ Google Logging

Flags​

Our Metadata​

  • Policy Type: COMPLIANCE_POLICY
  • Policy Category:
    • SECURITY

Similar Policies​

Logic​

Description​

Open File

Description​

Google Cloud Platform (GCP) services write audit log entries to the Admin Activity and Data Access logs to help answer the questions of, "who did what, where, and when?" within GCP projects.

Cloud audit logging records information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by GCP services. Cloud audit logging provides a history of GCP API calls for an account, including API calls made via the console, SDKs, command-line tools, and other GCP services.

Rationale​

Admin activity and data access logs produced by cloud audit logging enable security analysis, resource change tracking, and compliance auditing.

Configuring the metric filter and alerts for audit configuration changes ensures the recommended state of audit configuration is maintained so that all activities in the project are audit-able at any point in time.

Impact​

Enabling of logging may result in your project being charged for the additional logs usage.

... see more

Remediation​

Open File

Remediation​

From Google Cloud Console​

Create the prescribed log metric​
  1. Go to Logging/Logs-based Metrics by visiting https://console.cloud.google.com/logs/metrics and click "CREATE METRIC".

  2. Click the down arrow symbol on the Filter Bar at the rightmost corner and select Convert to Advanced Filter.

  3. Clear any text and add:

     protoPayload.methodName="SetIamPolicy" 
    AND protoPayload.serviceData.policyDelta.auditConfigDeltas:*
  4. Click Submit Filter. Display logs appear based on the filter text entered by the user.

  5. In the Metric Editor menu on the right, fill out the name field. Set Units to 1 (default) and Type to Counter. This will ensure that the log metric counts the number of log entries matching the user's advanced logs query.

  6. Click Create Metric.

Create a prescribed Alert Policy​
  1. Identify the new metric the user just created, under the section User-defined Metrics at https://console.cloud.google.com/logs/metrics.
  2. Click the 3-dot icon in the rightmost column for the new metric and select Create alert from Metric. A new page opens.

... see more

policy.yaml​

Open File

Linked Framework Sections​

SectionSub SectionsInternal RulesPoliciesFlags
πŸ’Ό CIS GCP v3.0.0 β†’ πŸ’Ό 2.5 Ensure That the Log Metric Filter and Alerts Exist for Audit Configuration Changes - Level 1 (Automated)1
πŸ’Ό Cloudaware Framework β†’ πŸ’Ό Logging and Monitoring Configuration49