Google Cloud Batch credentials
Seqera uses Google credentials to access your Google Cloud project for Google Cloud Batch compute environments. The service account in the credentials must have the Google Cloud Batch IAM roles.
Choose one of two authentication methods:
- Workload Identity Federation (recommended): Seqera generates short-lived OpenID Connect (OIDC) tokens and stores no service account key.
- Service account key: Seqera stores a JSON key for the service account. Use it only if you cannot use Workload Identity Federation.
You need the following:
- A service account with the IAM roles for this setup option. See Google Cloud Batch IAM roles.
Workload Identity Federation
Workload identity federation is the recommended authentication method for production and regulated environments because it eliminates long-lived service account keys. Seqera Platform authenticates to Google Cloud with short-lived OIDC tokens instead. Before you create the credential, configure the workload identity pool, provider, attribute mapping, and service account impersonation in Google Cloud. See Workload identity federation for the setup steps, the subject model, and cloud audit attribution.
Service account keys
To authenticate using a service account key, create a service account JSON key file:
-
In the Google Cloud navigation menu, select IAM & Admin > Service Accounts.
-
Select the email address of the service account.
noteThe Compute Engine default service account is not recommended for production environments because it has broad permissions. To use a service account other than the Compute Engine default, specify the service account email address under Advanced options on the Seqera compute environment creation form.
-
Select Keys > Add key > Create new key.
-
Select JSON as the key type.
-
Select Create.
A JSON file downloads to your computer. This file contains the credential you need to configure the compute environment in Seqera.
From Seqera Platform Enterprise 26.2.2, Seqera accepts only service account keys ("type": "service_account"). Seqera rejects other Google credential files, such as external_account files, and keys with a non-Google token_uri or a universe_domain other than googleapis.com. If Seqera rejects the key of an existing credential, the credential stops working and is marked INVALID. Replace the key to restore it.
You can manage your key from the Service Accounts page.
Add the credentials in Seqera
- In your workspace, go to Credentials and add new credentials. You can also select + next to the Credentials drop-down when you create a compute environment.
- Enter a name for the credentials, for example, Google Cloud Credentials, and for Provider, select Google.
- Select the credential type:
- Service account key: Paste the contents of the JSON key file created in the service account keys section.
- Workload Identity: Enter the Service Account Email, Workload Identity Provider path, and optionally the Token Audience as described in the workload identity federation section.
- Select Add.
Validation
Seqera validates credentials against Google Cloud on a recurring schedule and marks credentials that fail as INVALID. Seqera blocks launches on compute environments whose credentials are INVALID. See Pre-flight checks.