- Start setting up the integration in Encord and choose an authentication type.
- Give Encord access to your bucket, using one of:
- The Encord service account (default).
- Workload Identity Federation (WIF). Encord uses a service account in your own GCP project, without any service account keys.
- Set up a CORS configuration.
- Test the integration.
Ensure all objects in the bucket use the Standard Storage class.
1. Start Setting Up The Integration
- Navigate to Workspace Settings > Cloud Buckets and click +New integration.

- Select Google Cloud Storage.
- Give your integration a meaningful title.

-
In Step 2 of the integration, choose an authentication type:
- Encord service account: grant an Encord-managed service account access to your bucket. Continue to 2A. Grant Service Account Access.
- Workload Identity Federation (WIF): Encord uses a service account in your own GCP project. Your project trusts Encord as an identity provider, so there are no service account keys or shared secrets to store or rotate. Continue to 2B. Set Up Workload Identity Federation.
2A. Grant Service Account Access
Use this method if you selected Encord service account in Step 2 of the integration.- Log into your Google Cloud account and navigate to the GCP bucket you want to integrate with Encord.
- Click Grant Access to add a service account for Encord, in the bucket’s PERMISSION tab.
-
Add the service account shown in Step 3 of the integration in Encord as a New Principal. This is
cord-cloud-storage-integrator@cord-ai-platform.iam.gserviceaccount.comunless your Workspace has its own Encord service account. Assign the following roles:
Storage Object ViewerStorage Object Creator
Storage Object Creator is needed for features that require write permissions, including re-encoding data and creating image sequences.
2A.1 Register the Cloud Bucket with Encord
Paste the name of your GCP bucket into Step 3.1 of the integration in Encord.
2B. Set Up Workload Identity Federation
Use this method if you selected Workload Identity Federation (WIF) in Step 2 of the integration. Step 3 of the integration lists each sub-step and shows the values to copy into the Google Cloud console. See Service integrations to learn how WIF works.You need permission to create workload identity pools, service accounts, and IAM bindings in your GCP project.
2B.1 Create a GCP Service Integration in Encord
Only Workspace Admins can create service integrations. If Service integrations does not appear in your Workspace settings, contact Encord to enable it for your Workspace.
- In Encord, go to Workspace Settings and select Service integrations.
- Click New service integration.
-
Give the service integration a meaningful Title. For example,
Azure WIF - production storage. - Under Used for, select the cloud provider you are connecting: Azure, GCP, or AWS. Encord sets the signing algorithm to ES256 and fills in the target domain for that provider. You do not need to enter either.
- Click Create service integration.
2B.2 Enable the Required APIs
In the GCP project that contains your bucket, enable the following APIs. Step 3.2 of the integration has a link to enable each one.- IAM API (
iam.googleapis.com) - Security Token Service API (
sts.googleapis.com) - IAM Service Account Credentials API (
iamcredentials.googleapis.com)
2B.3 Create a Workload Identity Pool
- In the Google Cloud console, go to IAM & Admin > Workload Identity Federation and click Create pool.
- Give the pool any name. For example, use
encordas the pool ID.
2B.4 Add an OIDC Provider to the Pool
Add a provider to the pool with the following settings. Copy the values from Step 3.4 of the integration in Encord.2B.5 Register the Provider with Encord
- Open the provider’s details page in the Google Cloud console and copy its resource name.
-
Paste it into Step 3.5 of the integration in Encord, in the form:
2B.6 Create a Service Account that Can Read Your Bucket
- In the Google Cloud console, create a service account. For example,
encord-access. Do not create any keys for it. - Open your bucket’s Permissions tab, click Grant access, and grant the service account the following roles:
Storage Object ViewerStorage Object Creator(optional). This is needed for features that write to your bucket, including re-encoding data and creating image sequences.
- Paste the service account’s email into Step 3.6 of the integration in Encord.
2B.7 Let Encord Impersonate the Service Account
- In the Google Cloud console, open the service account you created and go to Permissions > Grant access.
-
Copy the New principal from Step 3.7 of the integration in Encord. It has the form:
- Assign the role Service Account Token Creator and click Save.
Service Account Token Creator is required, not just Workload Identity User, because Encord signs URLs to your files as the service account.
Set Up WIF Using the gcloud CLI
You can also set up WIF using the gcloud CLI. Copy the issuer URL and subject from the integration in Encord.- Provider resource name:
projects/<PROJECT_NUMBER>/locations/global/workloadIdentityPools/encord/providers/encord - Service account email:
encord-access@<PROJECT_ID>.iam.gserviceaccount.com
Revoke Access
Remove the service account’s Token Creator binding, the OIDC provider, or the pool to stop Encord getting new tokens. Tokens already issued stay valid for up to an hour, and URLs already signed stay valid until they expire. To cut off access immediately, also remove the service account’s access to your buckets.3. Create a CORS Configuration
A CORS configuration must be applied to the bucket you want to integrate with Encord. A CORS configuration enables Encord to request resources from the specified bucket.The only way to create a CORS configuration is using the command line or terminal tool.
gcloud command in your command line or terminal to create a CORS configuration.
- Replace <YOUR_BUCKET_NAME> with the name of the bucket you want to integrate.
- Replace
/path/to/you/cors.jsonwith the full path to your JSON CORS file. A sample JSON file is provided below.
JSON configuration file
The following JSON file can be used to set up the CORS configuration in Step 4 of your GCP integration.- Preflight requests are valid for 1 hour. Use the
maxAgeSecondsvariable to adjust the number of seconds the browser is allowed to make requests before it must repeat the preflight request. - Successful browser requests return the
Content-Typeof the resource in the response, as set by theresponseHeader. - Byte-range requests (
GET/HEAD) require theRangerequest header and the exposed response headers shown above so large scene files (such as MCAP) can stream in chunks in the browser.
4. Test Integration
Click the Run a test button on the integration to test the integration.


