diff --git a/docs/reference/env-vars.md b/docs/reference/env-vars.md index 61c0245e9c..096cfdc42d 100644 --- a/docs/reference/env-vars.md +++ b/docs/reference/env-vars.md @@ -250,6 +250,30 @@ The following environment variables control the configuration of the Nextflow ru : Defines the minimum size of the `.command.run` staging script for it to be written to a separate `.command.stage` file (default: `'1 MB'`). : This setting is useful for executors that impose a size limit on job scripts. +## Seqera Platform settings + +`TOWER_ACCESS_TOKEN` +: Access token for authenticating with Seqera Platform. Can also be configured via the `tower.accessToken` config option. + +`TOWER_API_ENDPOINT` +: Defines the Seqera Platform API endpoint (default: `https://api.cloud.seqera.io`). Can also be configured via the `tower.endpoint` config option. + +`TOWER_AUTH_DOMAIN` +: :::{versionadded} 25.10.0 + ::: +: Specifies the Auth0 domain to use for authentication when connecting to a custom Platform endpoint. When set, this takes precedence over the built-in mappings for known Platform endpoints. + +`TOWER_AUTH_ID` +: :::{versionadded} 25.10.0 + ::: +: Specifies the Auth0 client ID to use for authentication when connecting to a custom Platform endpoint. Must be used in conjunction with `TOWER_AUTH_DOMAIN`. + +`TOWER_REFRESH_TOKEN` +: Refresh token for maintaining authentication with Seqera Platform. Can also be configured via the `tower.refreshToken` config option. + +`TOWER_WORKSPACE_ID` +: Workspace ID for the Seqera Platform workspace to use. Can also be configured via the `tower.workspaceId` config option. + ## Other settings `FTP_PROXY` diff --git a/modules/nextflow/src/main/groovy/nextflow/platform/PlatformHelper.groovy b/modules/nextflow/src/main/groovy/nextflow/platform/PlatformHelper.groovy index daa2cc871c..2d18a4cc3a 100644 --- a/modules/nextflow/src/main/groovy/nextflow/platform/PlatformHelper.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/platform/PlatformHelper.groovy @@ -57,6 +57,8 @@ class PlatformHelper { */ static String getAuthClientId(String endpoint) { switch(endpoint) { + case SysEnv.get('TOWER_AUTH_ID'): + return SysEnv.get('TOWER_AUTH_ID') case 'https://api.cloud.dev-seqera.io': return 'Ep2LhYiYmuV9hhz0dH6dbXVq0S7s7SWZ' case 'https://api.cloud.stage-seqera.io':