More Info:

Ensure that BigQuery Audit Logging is configured properly across all projects.

Risk Level

Medium

Address

Security

Compliance Standards

HITRUST, SOC2, NISTCSF, PCIDSS

Triage and Remediation

Remediation

To remediate the misconfiguration “GCP BigQuery Should Have Audit Logging Enabled” for GCP using GCP console, you can follow the below steps:

  1. Open the Google Cloud Console and select the project where BigQuery is enabled.

  2. Go to the Navigation menu and select “BigQuery”.

  3. In the BigQuery console, click on the “More” button (three dots) on the left-hand side and select “View in APIs Explorer”.

  4. In the APIs Explorer, search for “tables.insert” in the search bar.

  5. In the “tables.insert” API, scroll down to the “Request body” section and add the following JSON code:

{
  "tableReference": {
    "projectId": "project-id",
    "datasetId": "dataset-id",
    "tableId": "table-id"
  },
  "schema": {
    "fields": [
      {
        "name": "column1",
        "type": "STRING"
      },
      {
        "name": "column2",
        "type": "INTEGER"
      }
    ]
  },
  "labels": {
    "key": "value"
  },
  "timePartitioning": {
    "type": "DAY",
    "field": "timestamp"
  }
}
  1. Click on the “Authorize and execute” button.

  2. On the next screen, click on the “Execute” button.

  3. Go back to the BigQuery console and click on the “More” button (three dots) on the left-hand side.

  4. Select “Audit logs” and ensure that the logs are enabled.

By following these steps, you will remediate the misconfiguration “GCP BigQuery Should Have Audit Logging Enabled” for GCP using GCP console.

Additional Reading: