Repository navigation
Description
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
- Sources: registries (Cloud Registry with verified/type/environment filters, caching, last-good fallback), static lists, data locality.
- Filters: capabilities (GPU, TES version), location, "verified by X", data-use constraints, declared admission requirements.
- Rankers: distance, cost, load, random, ordered. A binding client order wins for the backends it names.
- Router/failover.
Client interface (sketch)
gateway.backendsv2: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 likegateway.<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
uniqueg commentedon Nov 4, 2026
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.