Google Cloud Inventory
Overview
The Lacework Console provides visibility into Google Cloud resources that are integrated with Lacework. A resource can be any entity within the cloud deployment, such as GCE Virtual Machines, Pub/Sub topics, Cloud Storage buckets, security groups, etc. The GCP Resource Inventory page allows you to view and monitor in-use Google Cloud resources’ risk, compliance, and configuration changes and provides visibility for team members with limited or no access to the Google Cloud Console. Because Lacework takes regular snapshots of your resources, you can track their changes (diffs) through the Lacework Console. To access the Resource Inventory page, go to Resources > GCP Inventory.
Google Cloud resources are the components that enable services on Google Cloud. Google Cloud resources are grouped into specific projects, the first hierarchy level. Projects are grouped under a specific folder, the next level of hierarchy for Google Cloud resources. In addition, a specific folder can belong to another folder, which in turn can belong to yet another folder. Folders are grouped under a specific organization or Org, the top level of hierarchy for resources.
For more information about Google Cloud integration with Lacework, see Google Cloud Compliance and Audit Logs Integration - Terraform Using Google Cloud Shell and Google Cloud Compliance and Audit Logs Integration - Terraform From Any Supported Host.
Lacework takes a snapshot of resources on a periodic time frame. Depending on the time that Lacework takes the snapshot, changes may not be captured until up to 24 hours after the changes are made. See the following examples:
- A resource change is made on Monday at 1:00 AM and Lacework takes a snapshot on Monday at 2:00 AM, the snapshot includes the change.
- A resource change is made on Monday at 3:00 AM but Lacework took a snapshot on Monday at 2:00 AM, the snapshot does not include the change. The next snapshot on Tuesday at 2:00 AM will capture the change.
Lacework is currently expanding its service coverage in GCP. As we begin assessing these services for the first time, you may notice the New GCP service accessed in region alert on your Lacework Console. This alert will originate from Lacework Service IP Addresses and can be safely disregarded. If you have any questions regarding the alert, please contact Lacework Support for further assistance.
Supported Resource Types
Resource inventory supports the following resource type APIs.
Service | API |
---|---|
App Engine | Expand to view the list of APIs
|
Artifact Registry | Expand to view the list of APIs
|
BigQuery | Expand to view the list of APIs
|
Cloud Bigtable | Expand to view the list of APIs
|
Cloud Billing | cloudbilling.googleapis.com/BillingAccount |
Certificate Authority Service | Expand to view the list of APIs
|
Cloud Functions | cloudfunctions.googleapis.com/CloudFunction |
Cloud Run | Expand to view the list of APIs
|
Container Registry | containerregistry.googleapis.com/Image |
Dataproc | Expand to view the list of APIs
|
Dialogflow | Expand to view the list of APIs
|
Cloud Data Loss Prevention | Expand to view the list of APIs
|
Cloud DNS | Expand to view the list of APIs
|
Eventarc | eventarc.googleapis.com/Trigger |
Identity and Access Management | Expand to view the list of APIs
|
Cloud Key Management Service | Expand to view the list of APIs
|
Pub/Sub | Expand to view the list of APIs
|
Cloud Spanner | Expand to view the list of APIs
|
Cloud SQL | Expand to view the list of APIs
|
Cloud Storage | storage.googleapis.com/Bucket |
Cloud OS Config | Expand to view the list of APIs
|
Compute Engine | Expand to view the list of APIs
|
Google Kubernetes Engine | Expand to view the list of APIs
|
Resource Manager | Expand to view the list of APIs
|
Service Usage | serviceusage.googleapis.com/Service |
Cloud Data Fusion | datafusion.googleapis.com/Instance |
Cloud Logging | Expand to view the list of APIs
|
Network Management API | networkmanagement.googleapis.com/ConnectivityTest |
Managed Service for Microsoft Active Directory | managedidentities.googleapis.com/Domain |
Game Servers | Expand to view the list of APIs
|
Dataflow | dataflow.googleapis.com/Job |
Hub | gkehub.googleapis.com/Membership |
Secret Manager | Expand to view the list of APIs
|
Cloud TPU | tpu.googleapis.com/Node |
Filestore | file.googleapis.com/Instance |
Service Directory | servicedirectory.googleapis.com/Namespace |
Assured Workloads | assuredworkloads.googleapis.com/Workload |
API Gateway | Expand to view the list of APIs
|
App Engine Memcache | memcache.googleapis.com/Instance |
Document AI | Expand to view the list of APIs
|
Memorystore for Redis | redis.googleapis.com/Instance |
Vertex AI | Expand to view the list of APIs
|
Cloud Monitoring | monitoring.googleapis.com/AlertPolicy |
Serverless VPC Access | vpcaccess.googleapis.com/Connector |
Service Management | servicemanagement.googleapis.com/ManagedService |
Dataproc Metastore | Expand to view the list of APIs
|
For the full list of possible resources, see Supported asset types.
To view the list of resources from the Google Cloud console, select Asset Inventory > Resource.
Configure Permissions to Enable Access to Google Cloud Resources
In order to access and manage Google Cloud resources, you must enable certain permissions through the use of updated roles.
Configure Google Cloud Permissions by Updating Terraform Integration
You can use Terraform to integrate Google Cloud environments with Lacework. To enable access to Google Cloud resources if you have an existing Terraform template for Google Cloud integration, you must update and rerun the Lacework Google Cloud Terraform module. Perform the following tasks to access Google Cloud resource types:
Verify that your Terraform template is specifying the minimum Lacework Google Cloud Config module version
1.0
. To do this, open and examine your Terraform file for the following:1 module "gcp-config" {
2 source = "lacework/config/gcp"
3 version = "~> 1.0"
4 }noteThe
terraform init -upgrade
command in the next step will pull in the latest version. The minimum version1.2.0
is required to enable permissions to Google Cloud resource types.Update the Terraform integration to version 1.2.0 to utilize the new permissions for Google Cloud resources in the Lacework Google Cloud Config module by running an update and applying this update:
terraform init -upgrade
terraform apply
Configure Google Cloud Permissions Manually
In order to access and manage Google Cloud resources, you must enable certain permissions through the use of updated roles. You can do this automatically through Terraform as discussed in the previous section. Additionally, you can configure the permissions manually.
1. Add the roles/cloudasset.viewer
Role to your Google Cloud Service Account
Add the new role roles/cloudasset.viewer
to your service account to access your Google Cloud resource types. You can add this new role either at the individual project level or at the organization level.
You can add the role through the Google Cloud console or through the gcloud CLI, as described below.
Add Role through the Google Cloud console
- Navigate to IAM and Admin in the Google Cloud console.
- Locate the service account for the Google Cloud integration and click the Edit Permissions icon (located right of the entry).
- Click + Add Another Role.
- Select the role Cloud Asset > Cloud Asset Viewer.
- Click Save as.
Add Role through the gcloud CLI
To add the new role to a service account at the individual project level:
gcloud projects add-iam-policy-binding TARGET_PROJECT_ID \
--member serviceAccount:SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com \
--role roles/cloudasset.viewer
To add the new role to a service account at the organization level:
gcloud organizations add-iam-policy-binding TARGET_ORGANIZATION_ID \
--member serviceAccount:SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com \
--role roles/cloudasset.viewer
2. Enable the API for your Google Cloud Service Account
Enable the API that accesses your resource types on the Google Cloud project to which the service account belongs.
You can enable the API through the Google Cloud console or through the gcloud CLI, as described below:
Enable the API through Google Cloud console for your Project
Using the Google Cloud console, add cloudasset.googleapis.com
to enable access to the Google Cloud API:
- Log in to the specific project you want to integrate on the Google Cloud Console.
- Click
.
- Select APIs & Services > Library.
In the Search for APIs & Services field, enter
cloudasset.googleapis.com
. - Click on the result that matches the API name listed.
- Click ENABLE.
Enable the API through the gcloud CLI
Ensure that the gcloud config is set to use a Service Account with the permissions required to enable APIs.
gcloud --project <service_account_project_id> services enable cloudasset.googleapis.com
Resource Summary
Lacework populates this page after at least one Google Cloud integration is configured. The date/time range filter and any optional filters at top of the page apply to all data displayed on the page. If nothing is displayed, consider increasing the date range.
To access the Resource Summary information on the GCP Resource Inventory page, go to Resources > GCP Inventory.
Above the right side of the table, the following icons are available:
Icon | Label | Description |
---|---|---|
Download in CSV format | Click the Download in CSV format icon to get a comma-separated file of the table contents. | |
Select display columns | Click the Select display columns icon to hide or show the set of columns that are displayed in the table. | |
Refresh data | Click the Refresh data icon to refresh the table data. | |
Full screen | Click the Full screen icon to view the table on the entire screen. |
The columns in the Resources Summary table are described below. Each row in the table represents a resource.
Column | Description |
---|---|
Resource Name | Displays the name of the Google Cloud resource type. Click the name to open the resource’s configuration. |
Recently Updated (24hrs) | Displays whether there was an update in the last 24 hours. |
Organization | Displays the specific organization that the resource type belongs to. Organizations contain folders, which in turn contain projects of resource types. |
Folder ID | Displays the specific folder identifier that the resource type belongs to. A resource can belong to a folder. That folder can belong to another folder, which in turn can belong to yet another folder. To view the hierarchy of this multiple folder structure, click the specific Folder ID. |
Project ID | Displays the specific project that the resource type belongs to. Projects allow you to organize and group together resource types into specific projects. |
Service | Displays the Google Cloud service that the resource corresponds to. |
Type | Displays the type of resource. |
Region | Displays the region where the resource is located. |
Status | Displays the status of data collection from the resource. |
Tags | Click {...} to open the resource’s tags. |
Last Discovered Time | Displays the last time the Lacework agent discovered the resource. |
Configuration Diffs
To view a configuration diff, click a resource name under the Resource Name column. This opens a pane with configuration details. When a diff is present, it is always compared to the current configuration. If more than two configuration histories exist, click View more to display the Configuration History page.
To view a resource’s tag information, click {...} in the Tags column.
If you change an API (primary API) configuration, then it appears as a diff on the Lacework Console.
Configuration History
This page provides configuration histories for a resource. To open the Configuration History page, click View more. The link is available only if the resource has more than two configuration histories.
To compare two configurations, select their checkboxes and click the diff configurations icon.
The columns in the Configuration History table are described below.
Column | Description |
---|---|
Configuration | Click to view the configuration. |
Start Time | Displays when data collection started. |
End Time | Displays when data collection ended. |