Skip to content

feat(plugins): federated backend selection #528

Open

Description

@uniqueg

Goal

Make gateway backend selection fit a federation of federations without central control: many gateways (institutional, community, personal), many TES backends (clouds, compute centres, hospitals, companies, users' own machines), and no single operator who knows them all.

Model

  • A gateway is a user agent, not a gatekeeper. It finds, matches, ranks and tries backends, fails over and tracks tasks; it never grants access. Admission is enforced by backends, data-use constraints by data hosts.
  • Client and gateway are roles of a hop. A gateway speaks TES, so gateways chain; the first hop acting for the user carries out the user's trust decisions.
  • The user decides whom to trust; gateways resolve. A request carries candidates: backend IDs, URLs and/or source references (e.g. a registry, verified entries only), with an optional binding order. Gateways resolve references (fetch, cache, refresh) and apply plugins.
  • Trust only narrows along the chain. Each hop may narrow and rank candidates, never add new ones. Forwarding to another gateway passes the remaining candidates on.
  • Defaults fill gaps. Without candidates in the request, a hop uses its configured default sources. Operators may enforce filters only to protect their own gateway (these only narrow).
  • Rejections are retryable. A definite rejection by a backend (401/403/422) moves on to the next candidate; 5xx and read timeouts stay "unknown outcome" and stop.
  • No gateway-wide credential to backends the operator doesn't control. Forward the user's identity, ideally as an audience-bound token per backend.

Plugin kinds

  1. Sources: registries (Cloud Registry with verified/type/environment filters, caching, last-good fallback), static lists, data locality.
  2. Filters: capabilities (GPU, TES version), location, "verified by X", data-use constraints, declared admission requirements.
  3. Rankers: distance, cost, load, random, ordered. A binding client order wins for the backends it names.
  4. Router/failover.

Client interface (sketch)

  • gateway.backends v2: candidates, ordered, only, exclude, prefer. An empty result gives a 4xx with reasons, never a fallback to something the user ruled out.
  • gateway.args: one JSON object keyed by plugin ID for client parameters. Plugins declare these as a schema, shown in /plugins; invalid values give a 400; undeclared parameters are operator-only. (Tag names like gateway.<plugin>.<param> don't work because plugin IDs contain dots.)
  • Operator parameters per plugin in config.

Out of scope

Federated identity and federated trust as such. Standards questions (backends declaring admission requirements in service-info, DRS saying where data may be processed, passing candidates along a gateway chain) go to the GA4GH Cloud Work Stream.

FOCA 0.18.0

No change of semantics: gateway.backends keeps "listed first, then the rest", and the client tags are documented as experimental.

Next step

Split into PR-sized sub-issues once the design is agreed (engine plugin kinds and candidate model; gateway.backends v2; gateway.args; retryable rejections and forwarding candidates; credential rule; Cloud Registry source plugin in foca-plugins; routing as a library for SDK/CLI).

Activity

  1. added this to the v0.19.0 milestone on Oct 26, 2026
  2. added
    priority: medium
    status flag: discuss
    status: triage
    type: feature
    workload: weeks
    on Oct 26, 2026
  3. modified the milestones: v0.19.0, v0.20.0, v0.21.0 on Oct 31, 2026
  4. uniqueg commented on Nov 4, 2026

    @uniqueg
    MemberAuthor

    Moved out of v0.21.0 by the maintainer, with no milestone for now. This goes beyond what the current work needs and depends on further design of the token flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumstatus flag: discussstatus: triagetype: featureworkload: weeks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions