Entire Google Cloud Organization
About connecting an entire Google Cloud organization
You can connect an entire Google Cloud organization to OX using Workload Identity Federation. OX uses one read-only service account to access projects across the organization without creating or maintaining a long-lived service account key.
Select a project to host the service account and Workload Identity Pool. The scanning reach comes from IAM roles granted at the organization level.
First, configure the required resources and permissions in Google Cloud. Then, use the generated values to complete the connection in OX.
Prerequisites
Make sure that you have:
The Google Cloud CLI (
gcloud) installed and configured, or access to Cloud Shell.Permissions to create a service account in the host project.
roles/resourcemanager.organizationAdminon the organization to grant the required roles at the organization level.roles/serviceusage.serviceUsageAdminto enable the required APIs in the projects in the organization.Access to the GCP connector in OX.
Run each command on a single line. Line continuations pasted into Cloud Shell split at the backslash.
Step 1: Configure Google Cloud
To configure an entire Google Cloud organization for OX:
Sign in to Google Cloud and list the available organizations and projects.
Set the variables for the organization, host project, and Workload Identity configuration.
Pick any project to hold the service account and the Workload Identity Pool. Scanning reach comes from the organization bindings configured later in this procedure.
Enable the APIs required to create the service account.
Create the read-only service account and set
SAto its email.One service account serves every project, and every organization. To reuse an existing one, set
SAto its email andPROJECTto the segment between@and.iam.gserviceaccount.com.Grant the read-only roles at the organization level.
Roles bind once at the organization and every project inherits them. Granting these needs
roles/resourcemanager.organizationAdminon the organization, and enabling the APIs in every project needsroles/serviceusage.serviceUsageAdmin. See Roles granted to OX for what each covers.Verify the organization IAM policy.
In OX, open Connectors > GCP > Workload Identity (Keyless) and copy the Issuer URI.
Return to your Google Cloud shell and set
ISSUER_URIto the Issuer URI that you copied from OX.Create the Workload Identity Pool in the host project.
The pool lives in the host project and covers the whole organization.
Create the Workload Identity provider.
Allow identities that authenticated through the pool to obtain credentials for the service account.
This grant is what lets the token OX presents become the identity of the service account.
Set the two batches of APIs that must be enabled in every project.
API enablement is set per project.
gcloud services enableaccepts up to 20 APIs per call, so the list runs in two batches.Enable the required APIs in every project in the organization.
The loop prints one line per project. It runs one project at a time, so a large organization can take a while. It is safe to re-run.
Projects created later pick up the organization roles by inheritance, while API enablement is per-project state that inherits nothing. Re-run this step as new projects appear, or add the API list to your project-creation template.
Step 2: Complete the connection in OX
In OX, go to Connectors > GCP.

Select Workload Identity (Keyless).
Enter the connection details:
FieldDescriptionWorkload Identity Pool Provider (audience)
Enter the Workload Identity Pool Provider value generated during the Google Cloud configuration.
Service account to impersonate
Enter the service account email generated during the Google Cloud configuration.
Connection Name
Enter a name that identifies the organization in OX.
Select Verify Connectivity.
After OX verifies the connection, select Connect.
Step 3: Connect GKE
You can connect GKE clusters in projects in the connected organization to OX. GKE uses the credentials configured for the GCP connector.
OX reads each GKE cluster through its Kubernetes API from the following IP addresses:
108.128.213.1134.247.61.212
If a cluster restricts control-plane access using a private endpoint or authorized networks, add both OX IP addresses to the allowlist.
To connect GKE clusters:
Add
108.128.213.11to the allowlist if access to the cluster control plane is restricted.Add
34.247.61.212to the allowlist if access to the cluster control plane is restricted.In OX, go to Connectors > GKE.

Select Connect.
Select the clusters that you want to connect.
Save the connection.
Last updated