Skip to content

Step 2: Set Up BigQuery Authentication

Composable Audience Studio (CAS) connects to BigQuery using JSON keyfile or Workload Identity Federation (WIF) authentication.

For WIF, first open the Treasure AI console and navigate to Integration Hub > Authentications. Select Google BigQuery, click New Authentication, and select Workload Identity Federation as the authentication method. Copy the read-only Treasure AI's AWS Account ID value from the form; you will use it to configure the AWS provider in GCP. Leave the form open while you complete the GCP setup.

Follow Setting Up Workload Identity Federation (WIF) using that AWS account ID. For CAS, grant the federated identity or impersonated service account the roles in Step 1: BigQuery IAM Permissions instead of the import-specific roles in the linked guide. The downloaded external_account JSON is the ADC keyfile you will enter in Step 3.

Then review the network access requirements in GCP Step 4 and continue to Step 3: Configure BigQuery Authentication in Integration Hub to finish and save the authentication.

For JSON keyfile, follow GCP Steps 1–3 below to create a service account, grant IAM roles, and generate a JSON key.

GCP Step 1: Create a Service Account

  1. Open the Google Cloud Console > IAM & Admin > Service Accounts.
  2. Click Create Service Account.
  3. Enter a display name (e.g., TAI-CAS-Service).
  4. Click Create and Continue.
  5. Note the service account email address assigned (e.g., tai-cas-service@<project_id>.iam.gserviceaccount.com).

GCP Step 2: Grant IAM Roles

Grant the service account the required IAM roles as described in Step 1: Prepare Your BigQuery Data. Minimum required:

  • roles/bigquery.jobUser at project level
  • roles/bigquery.dataEditor at dataset level

GCP Step 3: Generate a JSON Key

  1. In the Service Account details page, go to the Keys tab.
  2. Click Add Key > Create new key.
  3. Choose JSON format > Create.
  4. The browser downloads the .json key file automatically.
Keep the JSON file secure

This file grants full access to the service account. Store it safely and do not share it.

GCP Step 4: Allow Treasure AI Server IPs to Access BigQuery (If Necessary)

If your GCP project uses VPC Service Controls or organization policies that restrict API access by IP, add Treasure AI's export IP addresses to the allowed list.

Note

For the list of Treasure AI IP addresses to add, see Static IP Addresses for Integrations and Result Workers. Whitelist both the Import and Export tabs.