Repository navigation
Description
Why?
Child of #194 and #201. The middleware management spec merged in #196 adds middlewares from Git repositories, PyPI packages and local paths at runtime, and the API has no security. Implemented as specified, anyone who can reach the API can run code in proTES. Even restricted to admins, installing code at runtime bypasses review and image builds, and fails on read-only container file systems (FOCA's chart). #201 also requires the middleware API to be restricted to ECP_CLN:ADMIN.
How?
- Middlewares come only from installed packages: an entry-point group (e.g.
pro_tes.middlewares), with the built-in ones (random and distance-based task distribution) registered there; third-party middlewares are installed into the image. - Revise
api/middleware_management.yaml: a middleware is referenced by its entry-point name (with its config), nogit/pypi/localsources or package locations; problem details for errors; served under the TES base path. - Security: bearer auth; only the role
admin(ECP_CLN:ADMIN) may change the stack; reads per the decision on the middleware direction. - Register the spec again in
config.yaml(it was unregistered in the FOCA 0.15 upgrade, refactor!: upgrade to FOCA 0.15 #203). - Docs: middlewares page (how to write, package and install a middleware).
Acceptance criteria
- The API cannot install or import code that isn't an installed, registered middleware; tests cover rejected references.
- Only admins can change the middleware stack.
- The built-in middlewares are available through entry points; documented.
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
uniqueg commentedon Oct 24, 2026
Closing as superseded.
The goals of this issue are met by the new plugin engine in FOCA
(
foca.plugins, elixir-cloud-aai/foca#486, FOCA 0.18.0):listed in the operator's allowlist (
plugins.available) are imported,optionally pinned to a distribution and version;
The entry-point group is
foca.plugins(notpro_tes.middlewares), asthe same engine serves proWES and later gateways. proTES adopts it in
#321. The unused management spec (
api/middleware_management.yaml) andthe
middlewarescollection are removed in #316.