The Google Cloud Platform sensor
The Google Cloud Platform sensor collects and processes audit information related to Google Cloud resources.
This section guides you through adding an XDR sensor that retrieves Google Cloud events in GravityZone Control Center.
Important
This integration requires a Google Cloud Pub/Sub subscription, which may incur additional costs.
Prerequisites
To complete the prerequisites, you must first decide on the scope of data being sent to GravityZone. You can set up the sensor to collect data from one Google Cloud project or from your entire Google Cloud organization. Careful consideration should be taken when choosing the second option, as it may result in higher resource usage and costs.
Collecting data from a Google Cloud project
Before setting up the Google Cloud Platform sensor, make sure you complete these steps:
Create a project in the Google Cloud console. If you already have one you can use for this purpose, skip this step.
In this project, create a Pub/Sub topic with the default settings.
On the topic's details page, scroll down to the Subscriptions tab and copy the Subscription ID. This information is required for the sensor configuration process in GravityZone Control Center.
Create a log routing sink associated with the previously created topic.
Type
Log router
in the search bar at the top of the page, then click the corresponding Logging > Log router page result.Click Create sink.
In the Sink details section, add a name and a description, and click Next.
In the Sink destination section, select the Cloud Pub/Sub topic service and the topic you have previously created. Click Next.
Click Create sink.
Configure the Pub/Sub topic with the Pub/Sub Publisher role.
Type
Log router
in the search bar at the top of the page, then click the corresponding Logging > Log router page result.In the Log router sinks dashboard, click the inline menu for your newly created sink and select View sink details.
Copy the value of the Writer identity field, starting after
serviceAccount:
.Type
Topics
in the search bar at the top of the page, then click the corresponding Pub/Sub > Topics page result.In the Topics dashboard, click the inline menu for the previously created topic and select View permissions.
In the right-side panel, click Add principal.
In the New principals field, add the Writer identity value you have copied at step c.
For the Role field, choose Pub/Sub Publisher.
Click Save.
Create an IAM service account configured with the Pub/Sub Subscriber role.
Type
Service Accounts
in the search bar at the top of the page, then click the corresponding IAM & Admin > Service Accounts page result.In the Service accounts section, click Create service account.
In the Service account details section, add a name for your service account.
The Service account ID is generated automatically.
Click Create and continue.
In the Grant this service account access to the project section, select the Pub/Sub Subscriber role.
Click Continue.
Click Done.
You will be redirected to the Service accounts dashboard.
Export the service account key in JSON format.
In the Service accounts dashboard, click the inline menu for your service account and select Manage keys.
In the Add key menu, select Create new key.
Keep the default settings and click Create.
This action downloads the JSON file required for the sensor configuration process in GravityZone Control Center.
Collecting data from a Google Cloud organization
Important
This procedure requires that you have the Logging Admin role assigned.
Before setting up the Google Cloud Platform sensor in GravityZone, make sure sure you complete these steps:
In the Google Cloud console, create a project in your organization. If you already have one you can use for this purpose, skip this step.
In this project, create a Pub/Sub topic with the default settings.
On the topic's details page, scroll down to the Subscriptions tab and copy the Subscription ID. This information is required for the sensor configuration process in GravityZone Control Center.
At the top of the topic's details page, click the Copy to clipboard button. The full Topic name is required for the next step.
Create a log routing sink associated with the previously created topic.
Select your organization from the drop-down menu next to the Google Cloud logo.
Type
Log router
in the search bar at the top of the page, then click the corresponding Logging > Log router page result.Click Create sink.
In the Sink details section, add a name and a description, and click Next.
In the Sink destination section, select the Cloud Pub/Sub topic service.
Click inside the Select Cloud Pub/Sub topic field and select the Use a Cloud Pub/Sub topic in a project option. The field will autocomplete with a path template.
In the Sink destination field, delete the all information after
pubsub.googleapis.com/
and add the information you copied at step 4.Click Next.
In the Choose logs to include in sink section, select the Include logs ingested by this organization and all child resources option.
Click Next and then Create sink.
Configure the Pub/Sub topic with the Pub/Sub Publisher role.
Type
Log router
in the search bar at the top of the page, then click the corresponding Logging > Log router page result.In the Log router sinks dashboard, click the inline menu for your newly created log routing sink and select View sink details.
Copy the value of the Writer Identity field, starting after
serviceAccount:
.Type
Topics
in the search bar at the top of the page, then click the corresponding Pub/Sub > Topics page result.Select your Google Cloud project.
In the Topics dashboard, click the inline menu for the topic you created at step 2 and select View permissions.
In the right-side panel, verify that the value you copied at step 6c is displayed in the Role/Principal section. If it is, move to step 7. If it is not listed there, follow the steps below.
Click the Add principal button.
In the New principals field, add the Writer Identity value you copied in step c.
For the Role field, choose Pub/Sub Publisher.
Click Save.
Create an IAM service account configured with the Pub/Sub Subscriber role.
Type
Service Accounts
in the search bar at the top of the page, then click the corresponding IAM & Admin > Service Accounts page result.In the Service accounts section, click Create Service Account.
In the Service account details section, add a name for your service account.
The Service account ID is generated automatically.
Click Create and continue.
In the Grant this service account access to the project section, select the Pub/Sub Subscriber role.
Click Continue.
Click Done.
You will be redirected to the Service accounts dashboard.
Export the service account key in JSON format.
In the Service accounts dashboard, click the inline menu for your service account and select Manage keys.
In the Add key menu, select Create new key.
Keep the default settings and click Create.
This action downloads the JSON file required for the sensor configuration process in GravityZone Control Center.
Setting up the Google Cloud Platform sensor
To configure the Google Cloud Platform sensor, follow these steps:
In the Configuration > Sensors Management page, select Add new to integrate a new sensor.
Select the Google Cloud Platform sensor and click Integrate.
On the Check Requirements page, confirm that the prerequisite steps have been completed.
Name the integration and provide the necessary Google Cloud Platform details.
In the Topic subscription ID field, add the subscription ID you copied at step 3 of the Prerequisites procedure.
In the Service account details section, import the document you downloaded at the last step of the Prerequisites procedure.
Select Test connectivity.
Select Add sensor.
The new integration will be available in the Sensors Management grid.