Other Articles

General – Enable Cloud Audit Logs

Secure Configuration Checks > GCP

This check ensures that Cloud Audit Logs record admin reads, data reads and data writes for all services in the project. No member may be exempted from these logs.

Check Details

  • Resource: Google Cloud Project
  • Check: Enable Cloud Audit Logs
  • Risk: Without these logs, you cannot see who read or changed your data. Misuse and breaches can go undetected.

Remediation via Google Cloud Console

  1. Log in to the Google Cloud Console and navigate to IAM & Admin > Audit Logs. Cloud Audit Logs page
  2. Click Set default configuration. Set Default audit configuration
  3. On the Log Types tab, select Admin Read, Data Read and Data Write. Click Save. Default audit configuration
  4. On the Exempted principals tab, remove every principal that is listed. Click Save.
  5. In the service list, open each service that has its own configuration. Make sure all three log types are selected and that no principals are exempted.

Remediation via Google Cloud CLI

  1. Open the Google Cloud Console and launch Cloud Shell. GCP Cloud Shell
  2. Download the IAM policy of the project:

    gcloud projects get-iam-policy <PROJECT_ID> --format=yaml > policy.yaml
    
  3. Edit policy.yaml with nano policy.yaml and add this block:

    auditConfigs:
    - service: allServices
      auditLogConfigs:
      - logType: ADMIN_READ
      - logType: DATA_READ
      - logType: DATA_WRITE
    

    If an auditConfigs block already exists, replace it. Delete every exemptedMembers entry.

  4. Apply the updated policy:

    gcloud projects set-iam-policy <PROJECT_ID> policy.yaml
    

    Replace <PROJECT_ID> with your project ID. The command replaces the whole policy, so always start from the policy that you downloaded.

  5. Verify the audit configuration:

    gcloud projects get-iam-policy <PROJECT_ID> --format="yaml(auditConfigs)"
    

Default Value

Admin Activity audit logs are always on and cannot be turned off. Data Access audit logs are off by default, except for BigQuery. They can produce a large volume of logs.

Updated on 09 November, 2026