GCP Workload Identity Federation
Use this authentication method to connect OX to Google Cloud without creating or storing a service account key. Instead, OX authenticates by using Google Cloud Workload Identity Federation and short-lived credentials.
This is the recommended authentication method for new connections and for organizations that require a keyless authentication model.
Prerequisites
A Google Cloud project with IAM permissions to:
Create service accounts
Manage service account keys
Enable required APIs (e.g., Compute Engine API, IAM API, Kubernetes Engine API).
Optional:
gcloudCLI installed and configured.
Step 1: Enable Google Cloud APIs [Google]
In the Google Cloud Console, navigate to APIs & Services.
In the left pane, select Library.
Search for and enable the following APIs:
Compute Engine API (
compute.googleapis.com)Kubernetes Engine API (
container.googleapis.com)Cloud Resource Manager API (
cloudresourcemanager.googleapis.com)

Alternatively, use the
gcloudCLI to enable all the required APIs at once:
Note: The CLI command enables a broader set of APIs than the minimum required for GKE. The additional APIs (such as BigQuery, Cloud KMS, and Dataproc) support other GCP features that OX Security may scan. If you prefer to enable only the minimum required APIs, use the manual UI steps in step 16c above.
To verify the APIs were enabled, run:
Step 2: Create a Workload Identity Pool and OIDC provider [Google]
Instead of creating a service account key, configure Google Cloud to trust OX as an external identity provider.
In the Google Cloud Console, go to IAM & Admin > Workload Identity Federation.
Select Create workload provider and pool.
Configure the Workload Identity Pool.
Configure the OIDC provider using the following values:
Pool ID
Enter a unique ID for the pool, for example, ox-pool. This value becomes part of the audience.
Provider
OpenID Connect (OIDC).
Provider name
Enter a display name, for example, ox-oidc.
Provider ID
Keep the generated value or enter ox-oidc. This value becomes part of the audience.
Issuer (URL)
Enter the issuer URL displayed in the OX connection dialog.
Audience
Keep Default audience selected. Copy the generated audience value. You will use it later when configuring the connector in OX.
Configure the following attribute mapping:
google.subject
assertion.sub
Select Save.
Step 3: Grant OX read-only access [Google]
Grant OX read-only access by using one of the following methods:
Option A: Service account (recommended): Grants the Workload Identity Pool permission to impersonate the read-only service account that you created in Connect using Token & Project ID. This option provides broader compatibility with Google Cloud services.
Option B: Direct access: Grants the required read-only IAM roles directly to the Workload Identity Pool instead of using a service account.
Option A: Service account (recommended)
Go to IAM & Admin > Service Accounts.
Open the read-only service account that you created in Connect using Token & Project ID.
Open the Principals with access tab.

Select Grant access.

In New principals, enter:
Replace:
<PROJECT_NUMBER>with your numeric Google Cloud project number.<POOL_ID>with the ID of your Workload Identity Pool.
Assign the Workload Identity User (
roles/iam.workloadIdentityUser) role.Select Save.
Option B: Direct access
Go to IAM & Admin > IAM.
Select Grant access.
In New principals, enter:
Replace:
<PROJECT_NUMBER>with your numeric Google Cloud project number.<POOL_ID>with the ID of your Workload Identity Pool.
Assign the same read-only IAM roles described in Connect using Token & Project ID.
Select Save.
Step 5: Connect GCP to OX
In the OX platform, go to Connectors and search for GCP.
Select GCP.

Select Workload Identity Federation as the authentication method.
Configure the following parameters:
Workload Identity Pool Provider
Paste the Default audience value that you copied when creating the OIDC provider. This field is required.
Service Account
Optional. Enter the email address of the read-only service account if you configured Option A. Leave this field empty if you configured Option B.
Select Connect.
Multi-project access
To use the same Workload Identity Federation configuration across multiple GCP projects:
Create the Workload Identity Pool and OIDC provider only once.
For each additional project, grant the required read-only IAM roles to the identity that you selected in Step 2:
If you configured Option A, grant the roles to the service account.
If you configured Option B, grant the roles directly to the Workload Identity Pool principal.
The Workload Identity Pool, OIDC provider, and, if applicable, the service account impersonation configuration can be reused across all configured projects.
Last updated
