Connect a GCP Organization
Connect your entire GCP organization to automatically onboard all current and future projects, without adding them individually.
Prerequisites
Before you begin:
- Grant sufficient permissions to the user who will create projects, create service accounts, authorize the service accounts, and enable logging in the Google Cloud Console.
- Define exceptions to allow Tenable network access if you use VPC Service Controls to restrict access to Google-managed services.
- Create a dedicated project for each Google Organization that will host the service account used by Tenable. If you already created a project when connecting a project to Tenable, use the same one.
- Enable billing for the dedicated project in the Google Cloud Console. For instructions, see Google's documentation on enabling billing.
-
Terraform-specific:
- Ensure you have Terraform CLI v0.13+ installed.
- Ensure terraform init can download and install Google Cloud provider v7.11+ without conflicting with your existing configurations.
- Prevent API throttling — GCP enforces API rate limits at the project level. Sharing a project with other service accounts increases the risk of hitting these limits and being blocked.
- Isolate expenses — A shared project obscures billing and usage data, making it harder to track the exact costs generated by a Tenable service account.
Connect an Organization
To connect a GCP organization:
- In the Tenable One AI Exposure Console, navigate to Settings > Integrations and click + Add Integration.
- In the Integrations Library, click GCP Organization. The GCP Organization wizard opens.
-
In the Configuration step (step 1 of 2)::
- Enter a name for the integration.
- Enter the organization ID.
Under Google Workspace, select whether to use an existing Google Workspace integration. If an integration does not exist, you can click + Create.
Note: Tenable recommends using your Google Workspace with your organization to enable identity-related visibility and complete risk assessment. Doing so:- Enables identity-related visibility, including users, permissions, and least-privilege analysis, providing a more complete risk assessment across your GCP cloud environment.
- Allows visibility into identities, permissions, and access relationships, enhancing security posture management beyond just resource visibility.
- Under Capabilities, select the capabilities to enable. Your selection determines the required permissions and dynamically updates the deployment script. Tenable recommends enabling all capabilities to provide the most comprehensive security coverage. For more information, see Google Required Permissions.
-
Under Deployment, select one of the following deployment options:
- Cloud Shell. Script-based deployment.
- Enter the Management Project ID. This is the ID of the dedicated project hosting the service account for this integration.
- Copy the script displayed in the AI Exposure wizard, create a file with the script content, and then run it in your Cloud Shell to grant AI Exposure the required permissions.
- Terraform. Module-based deployment. See Prerequisites before deploying.
- Enter the Management Project ID. This is the ID of the dedicated project hosting the service account for this integration.
- In the Google Cloud Console, navigate to the project you created.
- Go to IAM & Admin > Labels, click + Add label, and add the key/value pair that appears in the AI Exposure wizard.
- Copy the module invocation displayed in the AI Exposure wizard, add it to your Terraform configuration, and then run terraform apply. The module creates the identity and grants Tenable the permissions to connect and scan the environment.
Manual. Manually, via the Google Cloud Console. See Manually Deploy a GCP Organization for step-by-step instructions.
Caution: When you finish manual deployment, return to the wizard to complete Post Deployment, and Step 2: Scopes and Hierarchy.
- Cloud Shell. Script-based deployment.
Under Post Deployment, enter the following values.
Note: Keep the following in mind about the integration values:- How to retrieve values
- Cloud Shell: Copy/paste the values from the script output.
- Terraform. Retrieve the values from the Terraform output.
- Manual: See Manually Deploy a GCP Organization for how to retrieve these values.
- Shared integration values
- These values must be identical across the organization and all its member projects.
- When an organization is connected, these fields can only be updated at the organization level. Changes will automatically propagate to all member projects.
- Service Account Email
- Pub/Sub Subscription Name
- How to retrieve values
- When finished, click Next.
-
In the Scopes step (step 2 of 2):
- (Optional) Select Automatically update compartments structure to mirror your compartment's structure as folders within Tenable, preserving the hierarchy and keeping the view synchronized. For more information, see Account Hierarchy and Folders.
Under Scopes, choose which compartments to onboard:
- Sync all current and future projects (recommended)
- Include specific folders and projects
- Exclude specific folders and projects
Note: If you include/exclude an entire folder, all current and future projects within the group are included/excluded. If you include/exclude specific projects in a folder, only the selected projects will be included/excluded.
- Click Finish.
Next steps:
After your organization is added successfully:
- You can see the organization on the Integrations > GCP Organization page.
- You can see projects that belong to the organization on the Accounts > GCP page. From here you can manage your projects and view project details to see, for example, which features are enabled and whether the required permissions were granted.
Data about project resources will start to appear in AI Exposure. The time it takes for all data to appear varies depending on the size of your cloud environment.
Manually Deploy a GCP Organization
As an alternative to the script-based deployment, you can manually deploy your GCP organization via the Google Cloud Console. These procedures are relevant if you selected Manual for the deployment type when connecting your GCP organization.
- Create a Service Account for Tenable
- Authorize the Service Account at the Org Level
- Configure Audit Logs
Create a Service Account for Tenable
Create a dedicated GCP project and service account that Tenable uses to access and monitor your organization.
- In the Google Cloud Console, navigate to the project you created.
- Go to IAM & Admin > Roles and then click + Create custom role.
- Enter a title, description, and ID.
- Click + Add permissions, and add the permissions listed under Create Service Account in Required Permissions.
- Click Create to finish creating the role.
- Go to IAM & Admin > Service Accounts and then click + Create service account.
- Enter a Service account name, ID, and description.
- Copy and save the service account email that is generated. You will need to enter this value in the Post Deployment section of the wizard when connecting your organization to AI Exposure.
- Click Create and continue.
- Select the custom role you created, and then click Continue and Done.
-
Select the newly created service account, click the Principals with access tab, and then Grant access.
Important: If you are unable to grant access, you may have an organization policy with a domain restriction constraint that prevents choosing Tenable as a principal in IAM policies. This prevents Tenable from impersonating the created service account. If this is the case, follow the procedure described in Add Tenable as an Allowed Domain. - In the Add principals section, enter [email protected] in the New principals field.
- In the Assign roles section, select the Service Account Token Creator role and then click Save to finish.
-
Go to IAM & Admin > Labels, click + Add label, and add the key/value pair that appears in the AI Exposure wizard:
- Key: ermetic-external-id
- Value — Appears in the Deployment section of the AI Exposure wizard
- Click Save to finish creating the service account.
Authorize the Service Account at the Org Level
Grant the service account the permissions Tenable requires to scan and monitor your organization.
- In the Google Cloud Console, select the organization you want to connect to Tenable using the project picker at the top left of the screen.
- Navigate to IAM & Admin > IAM and then click Grant access.
- In the Add principals section, enter the service account email you saved earlier in the New principals field.
- In the Assign roles section, select relevant roles according to the desired capabilities.
- Click Save to finish.
Configure Audit Logs
Set up a Pub/Sub topic, subscription, and log sink to stream GCP audit logs to Tenable.
-
In the Google Cloud Console, select the relevant project with the project picker and create a Pub/Sub topic by following these steps:
- Navigate to Pub/Sub > Topics and then click + Create topic.
- In the Topic ID field, enter tenable-audit-logs.
- Clear Add a default subscription.
- Select Enable message retention and set the duration to at least 1 day.
- Click Create.
-
Create a Pub/Sub subscription by following these steps:
- Navigate to Pub/Sub > Subscriptions and then click + Create subscription.
- In the Subscription ID field, enter tenable-audit-logs-sub.
- Select the topic you created earlier.
- In the Delivery type section, select Pull.
- In the Message retention duration section, set the duration to at least 1 day.
- In the Retry policy section, select Retry after exponential backoff delay and keep the default values.
- In the Expiration period section, select Never expire.
- Click Create.
- In the Permissions tab of the newly created subscription, click Add principal.
- In the Add principals section, enter the service account email you saved earlier in the New principals field.
- In the Assign roles section, select the Pub/Sub Subscriber role and then click Save to finish.
- Copy and save the Pub/Sub subscription name. You will need to enter this value in the Post Deployment section of the wizard when connecting your organization to AI Exposure.
-
Create a log sink at the organization level by following these steps:
- Select the relevant organization with the project picker and navigate to Logging > Configure > Log router.
- Click Create sink.
- In the Sink name field, enter tenable-audit-logs and then click Next.
- For the sink service, select Cloud Pub/Sub topic and then Use a Cloud Pub/Sub topic in a project.
- In the Sink destination field, replace [PROJECT_ID] and [TOPIC_ID] with the relevant IDs and click Next.
-
Select Include logs ingested by this organization and all child resources, and then paste the following in the inclusion filter:
CopyLOG_ID(cloudaudit.googleapis.com/activity) OR
LOG_ID(cloudaudit.googleapis.com/data_access) OR
LOG_ID(cloudaudit.googleapis.com/policy) - Click Next.
- Click + Add exclusion.
-
In the Exclusion filter name field, enter exclude-k8s-internal and then paste the following in the exclusion filter:
CopyprotoPayload.authenticationInfo.principalEmail-:* OR
protoPayload.authenticationInfo.principalEmail=~"^system:" OR
protoPayload.authenticationInfo.principalEmail=~"@container-engine-robot.iam.gserviceaccount.com$" OR
protoPayload.authenticationInfo.principalEmail=~"@security-center-api.iam.gserviceaccount.com$" - Click Create sink.
Important: Even if you are a GCP Organization Admin or Super Admin, Google Cloud segregates logging permissions by default. If you receive the error Permission logging.sinks.create denied on resource when trying to create the sink, you must explicitly grant your user account the Logging Admin or Logs Configuration Writer role at the organization level. -
Assign the Pub/Sub Publisher role to the service account at the organization level.
- Go to IAM & Admin > IAM.
- Find the service account and click Edit principal.
- Click + Add another role.
- Select Pub/Sub Publisher.
- Click Save.