Google BigQuery
This document provides guidance on how to integrate BigQuery with the SOAR module of Google Security Operations.
Integration version: 12.0
This integration uses one or more open source components. You can download a zipped copy of the source code of this integration from a Cloud Storage bucket.
Use cases
In the Google SecOps SOAR platform, the Google BigQuery integration solves the following use cases:
Threat intelligence enrichment: automatically enrich security alerts with threat intelligence data stored in BigQuery to assess the severity and credibility of potential threats.
For example, you can configure Google SecOps to query a BigQuery table containing known malicious IP addresses every time when a suspicious IP address triggers an alert. Google SecOps checks for a match in the BigQuery table and retrieves additional context like associated malware families.
User behavior analysis: identify anomalous user activity by analyzing historical user activity logs stored in BigQuery to detect insider threats and compromised accounts.
For example, you can configure Google SecOps to query BigQuery for login attempts outside of a user usual geolocation and trigger an automated incident response for a detected suspicious activity.
Security data lake analysis: use the BigQuery querying capabilities to analyze large volumes of security data from various sources aggregated in a data lake to improve threat hunting and incident investigation.
For example, you can configure Google SecOps to query BigQuery for all events related to a specific file hash across multiple security tools logs that are stored in the data lake.
Long-term security data retention: use the BigQuery storage to retain large volumes of security logs for extended periods to support historical analysis, compliance reporting, and forensic investigations.
For example, you can configure Google SecOps to automatically archive resolved incident data into BigQuery for long-term storage and help ensure data availability for future audits or investigations.
Before you begin
To use the integration, you need a Google Cloud service account. You can use an existing service account or create a new one.
Create a service account
For guidance on creating a service account, see Create service accounts.
If you use a service account to authenticate to Google Cloud, create a service account key in JSON and provide the content of the downloaded JSON file when configuring the integration parameters.
For security reasons, we recommend using Workload Identity Federation for GKE email addresses instead of a service account key. For more information about the workload identities, see Identities for workloads.
Integrate BigQuery with Google SecOps
The integration requires the following parameters:
Parameters | Description |
---|---|
Account Type |
Optional The type of BigQuery account. Provide the value that is set in the The default value is
|
Project ID |
Optional The project ID of the BigQuery account. Provide the value that is set in the |
Private Key ID |
Optional The private key ID of the BigQuery account. Provide the value that is set in the |
Private Key |
Optional The private key of the BigQuery account. Provide the value that is set in the |
Client Email |
Optional The client email address of the BigQuery account. Provide the value that is set in the
|
Client ID |
Optional The client ID of the BigQuery account. Provide the value that is set in the |
Auth URI |
Optional The authentication URI of the BigQuery account. Provide the value that is set in the The default value is
|
Token URI |
Optional The token URI of the BigQuery account. Provide the value that is set in the The default value is
|
Auth Provider X509 URL |
Optional The authentication provider X.509 URL of the BigQuery account. Provide the value that is set in the
The default value is
|
Client X509 URL |
Optional The client X.509 URL of the BigQuery account. Provide the value that is set in the
The default value is
|
Service Account Json File Content |
Optional The content of the service account key JSON file. You can configure either this parameter, or the To configure this parameter, provide the full content of the service account key JSON file that you have downloaded when creating a service account. If you configure this parameter, the integration ignores other connection parameters. |
Workload Identity Email |
Optional The client email address of your service account. You can configure either this parameter or the If you set this parameter, configure
the To impersonate service accounts with the Workload Identity Federation for GKE email
address, grant the |
Quota Project ID |
Optional The Google Cloud project ID that you use for
Google Cloud APIs and billing. This parameter requires you to grant
the If you set no value for this parameter, the integration retrieves the project ID from your Google Cloud service account. |
Verify SSL |
Optional If selected, the integration verifies that the SSL certificate for the connection to the Google Cloud service is valid. Selected by default. |
For detailed instructions about configuring an integration in Google SecOps, see Configure integrations.
You can make changes at a later stage if needed. After you configure an integration instance, you can use it in playbooks. For more information about configuring and supporting multiple instances, see Supporting multiple instances.
Actions
The Google BigQuery integration includes the following actions:
Ping
Use the Ping action to test connectivity to the BigQuery.
This action doesn't run on entities.
Action inputs
None.
Action outputs
The action provides the following outputs:
Action output type | Availability |
---|---|
Case wall attachment | Not available |
Case wall link | Not available |
Case wall table | Not available |
Enrichment table | Not available |
JSON result | Not available |
Output messages | Available |
Script result | Available |
Output messages
On a Case Wall, the Ping action provides the following output messages:
Output message | Message description |
---|---|
Successfully connected to the Google BigQuery server with
the provided connection parameters! |
Action succeeded. |
Failed to connect to the Google BigQuery server! Error is
ERROR_REASON |
Action failed. Check the connection to the server, input parameters, or credentials. |
Script result
The following table describes the values for the script result output when using the Ping action:
Script result name | Value |
---|---|
is_success |
True or False |
Run SQL Query
Use the Run SQL Query action to execute queries in BigQuery.
This action doesn't run on entities.
Action inputs
The Run SQL Query action requires the following parameters:
Parameters | Description |
---|---|
Dataset Name |
Required The name of the dataset to use when executing queries. |
Query |
Required The SQL query to execute. |
Max Results To Return |
Optional The number of results to return for every response. The default value is 50 results. |
Action outputs
The Run SQL Query action provides the following outputs:
Action output type | Availability |
---|---|
Case wall attachment | Not available |
Case wall link | Not available |
Case wall table | Not available |
Enrichment table | Not available |
JSON result | Not available |
Output messages | Available |
Script result | Available |
JSON result
The following example describes the JSON result output received when using the Run SQL Query action:
{
"Airport_Code": "CODE",
"Airport_Name": "NAME",
"Time_Label": "2015/05",
"Time_Month": 5,
"Time_Month_Name": "May",
"Time_Year": 2015,
"Statistics___of_Delays_Carrier": 351,
"Statistics___of_Delays_Late_Aircraft": 546,
"Statistics___of_Delays_National_Aviation_System": 292,
"Statistics___of_Delays_Security": 2,
"Statistics___of_Delays_Weather": 100,
"Statistics_Carriers_Names": "Example Airlines Inc.,Example Airlines Co.",
"Statistics_Carriers_Total": 3,
"Statistics_Flights_Cancelled": 88,
"Statistics_Flights_Delayed": 1289,
"Statistics_Flights_Diverted": 32,
"Statistics_Flights_On_Time": 6182,
"Statistics_Flights_Total": 7591,
"Statistics_Minutes_Delayed_Carrier": 19332,
"Statistics_Minutes_Delayed_Late_Aircraft": 34376,
"Statistics_Minutes_Delayed_National_Aviation_System": 12346,
"Statistics_Minutes_Delayed_Security": 48,
"Statistics_Minutes_Delayed_Total": 76163,
"Statistics_Minutes_Delayed_Weather": 100061
}
Output messages
On a Case Wall, the Run SQL Query action provides the following output messages:
Output message | Message description |
---|---|
Successfully executed query in the BigQuery dataset
DATASET_NAME. |
Action succeeded. |
Error executing action "Run SQL Query". Reason:
ERROR_REASON |
Action failed. Check the connection to the server, input parameters, or credentials. |
Script result
The following table describes the values for the script result output when using the Run SQL Query action:
Script result name | Value |
---|---|
is_success |
True or False |