Skip to content

feat!: call TES backends with service tokens #213

Closed

Description

@uniqueg

Why?

Child of #201. proTES passes the caller's HTTP Basic credentials through to TES backends: it stores them in plain text in MongoDB (basic_auth in every task), sends them in plain text through RabbitMQ to the Celery worker (task arguments, visible in Flower), and sends them to every backend it tries, so one node's credentials reach other nodes. Credentials in input and output URLs (user:pass@host) are also stored and forwarded to Funnel. Once clients send Authorization: Bearer (#212), there are no per-request credentials left anyway.

The ELIXIR On-Cloud auth policy (section 4) decides: proTES calls TES backends with its own client-credentials token from LS Login (backends check client_id = proTES), and the user's identity travels as data in TES task tags.

How?

  1. Fetch proTES's client-credentials token from LS Login (client ID and secret from the environment/a Kubernetes Secret, never from the config file or the database), cache it and fetch a new one shortly before it expires; use it for create, get, cancel and polling, also in the Celery worker.
  2. Per-backend auth mode as an option (decision on the transitional modes, e.g. basic with credentials from Secrets, pending), with a startup warning for backends without token auth.
  3. Remove parse_basic_auth(), BasicAuth, DbDocument.basic_auth and the credentials in Celery task arguments; a startup migration removes basic_auth from stored tasks.
  4. Set TES tags with the user's sub and the original client ID (names pending), overriding tags of the same names sent by callers.
  5. Reject (400) or strip credentials in input and output URLs, configurable; never store them.
  6. Backend URLs https only by default (option url_schemes), as cloud-registry does for service URLs.

Acceptance criteria

  • Tasks reach backends with proTES's token (or the configured transitional mode); no credentials of callers are stored, queued or forwarded.
  • Stored tasks no longer contain basic_auth after the upgrade.
  • Forwarded tasks carry the user's sub and client ID in tags; callers cannot set them.
  • Tests cover token caching and renewal, each auth mode and the migration.

Update (2026-10-22): generic configuration. proTES must stay generic, so that any organization can deploy it with its own identity provider, clients and groups. Wherever this issue names LS Login, ECP_CLN, Krini, Conquest or other ELIXIR On-Cloud specifics, read them as examples of deployment configuration: the implementation has no such defaults (issuers, audiences, service clients, group mappings and on-behalf-of clients are all set by the deployment), and config comments, chart values, docs and tests use generic, clearly fictitious values. ELIXIR On-Cloud deployment values are documented outside this repository.

Activity

  1. added
    priority: high
    status: blocked
    type flag: breaking change
    type: auth
    type: security
    workload: days
    ecp-wp4: M4.4
    on Oct 22, 2026
  2. self-assigned this
    on Oct 23, 2026
  3. moved this from Backlog to In progress in ELIXIR On-Cloudon Oct 23, 2026
  4. added
    status: in progress
    and removed
    status: blocked
    on Oct 23, 2026
  5. moved this from In progress to Done in ELIXIR On-Cloudon Oct 23, 2026
  6. removed
    status: in progress
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ecp-wp4: M4.4priority: hightype flag: breaking changetype: authtype: securityworkload: days

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions