Google Cloud credentials
Seqera uses Google credentials to access your Google Cloud project for Google Cloud compute environments. The service account in the credentials must have the Google Cloud IAM roles.
You can authenticate in two ways:
- Workload Identity Federation (recommended): Seqera generates short-lived OpenID Connect (OIDC) tokens. No service account key is stored.
- 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 IAM roles.
Intelligent Compute does not support Workload Identity Federation credentials yet. For a compute environment with the Seqera Intelligent Compute compute mode, use a service account key. See Intelligent Compute credentials on Google Cloud.
Workload Identity Federation
Workload Identity Federation (WIF) is the recommended authentication method for production and regulated environments because it avoids long-lived service account keys. Instead, Seqera Platform generates short-lived OIDC tokens for authentication.
Seqera Platform advertises its OIDC issuer at https://cloud.seqera.io/api/.well-known/openid-configuration.
Enable APIs
Before setting up WIF, enable the following APIs for your Google Cloud project:
- Cloud Resource Manager API (
cloudresourcemanager.googleapis.com) - IAM API (
iam.googleapis.com) - IAM Service Account Credentials API (
iamcredentials.googleapis.com) - Cloud Logging API (
logging.googleapis.com) - Security Token Service API (
sts.googleapis.com)
The Compute Engine, Cloud Storage, and Secret Manager APIs (compute.googleapis.com, storage.googleapis.com, secretmanager.googleapis.com) are also required. Enable them if they are not already active in your project.
Set up WIF in the Google Cloud console
In the Google Cloud console:
-
Create a Workload Identity Pool and Provider in your Google Cloud project.
-
Set Seqera as an OIDC provider within the pool. Set the Issuer URL to
https://cloud.seqera.io/api. -
Set the Allowed audiences. If you leave it empty, Google Cloud derives a default audience from the provider resource path in the format
//iam.googleapis.com/projects/{PROJECT}/locations/global/workloadIdentityPools/{POOL}/providers/{PROVIDER}. If you specify a custom value, it must match exactly what you enter in the Token audience field when you create the WIF credential in Seqera. -
Define an attribute mapping and condition. At a minimum, set
google.subject=assertion.sub. This maps the subject claim from the Seqera JSON Web Token (JWT) to the Google Cloud identity space. See Attribute mappings and conditions. If a pop-up asks you to configure your application and provide an OIDC ID token path, dismiss it. -
Grant
roles/iam.workloadIdentityUseron the service account that WIF impersonates to the Workload Identity Pool principal. You can scope the grant to all pool identities or to a specific workspace:- All identities in the pool:
principalSet://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/* - Specific workspace only:
principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/org:{ORG_ID}:wsp:{WORKSPACE_ID}:workflow
If you have not yet created a service account, create one as described in Service account permissions.
- All identities in the pool:
-
(Optional) If you use the same WIF credential for Data Explorer, grant
roles/iam.serviceAccountTokenCreatoron the service account to the Workload Identity Pool principal:gcloud iam service-accounts add-iam-policy-binding SA_EMAIL \
--member="principalSet://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/*" \
--role="roles/iam.serviceAccountTokenCreator"Replace
SA_EMAIL,PROJECT_NUMBER, andPOOL_IDwith your values. Without this role, viewing or downloading file contents in Data Explorer fails. Seqera Platform logs the underlying error asSigningException: Failed to sign the provided bytescaused byPermission 'iam.serviceAccounts.signBlob' denied. Running pipelines is not affected.To scope this binding to a specific workspace, replace the
principalSetwildcard withprincipal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/org:{ORG_ID}:wsp:{WORKSPACE_ID}:workflow.
WIF credential values for Seqera Platform
After you set up WIF in the Google Cloud console, you need the following information to create a WIF credential in Seqera Platform:
- Service account email: The email address of the Google Cloud service account that WIF impersonates.
- Workload identity provider: The full resource path of the Workload Identity Provider, for example,
projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/providers/PROVIDER_ID. - Token audience (optional): The intended audience for the OIDC token. Configure this only if your Workload Identity Provider requires a specific audience value. The value must match the Allowed audiences value configured in the Google Cloud console.
If WIF authentication fails at runtime, see Workload Identity Federation authentication fails at runtime.
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.
- Select Keys > Add key > Create new key.
- Select JSON as the key type.
- Select Create.
Google Cloud downloads a JSON file to your computer. It contains the credential you need to configure the compute environment in Seqera.
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.
Add the service account key 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.
- Paste the contents of the JSON file in the Service account key field.
- 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.