You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Implement Controllers for Middleware Management API #197
Implement complete backend controller logic for the middleware management REST API. This includes all seven HTTP request handlers with CRUD operations, order management, security validation, Pydantic models, and MongoDB integration. Controllers handle pagination, filtering, soft/hard deletes, and code validation using AST parsing for security checks.
✅ All 7 endpoints functional and returning correct HTTP status codes
✅ Unit tests passing with 100% controller coverage
✅ Response validation passing against OpenAPI schema
✅ No breaking changes to existing TES API functionality
We decided against a runtime management API for task plugins: operators
manage the available plugins and the default pipeline by configuration
only (versioned, reviewed and rolled out like any other config change),
and no code is installed at runtime. Clients can still choose the
pipeline per task, from the plugins the operator allowed, via a reserved
task tag (gateway.pipeline, see #218).
The plugin engine moves into FOCA (foca.plugins, FOCA 0.18.0, elixir-cloud-aai/foca#485),
so proTES, proWES and later gateways share it; proTES adopts it in #321. Thanks to everyone who worked on the management design: its goals
(admin control, discoverability, per-task choice) are covered by the
config, GET /plugins and the per-task tags.
Closing note: proTES moves its task middlewares to the FOCA plugin engine (elixir-cloud-aai/foca#485, in FOCA 0.18.0; proTES migration in #194). By design, plugins are managed by configuration only: admins enable, pin and order them in the app config, and there is no runtime API to install, enable or disable them. A middleware management API with controllers is therefore not planned. Available plugins can be listed read-only via GET /plugins and in /service-info.
Activity
keshxvdayal commentedon Jan 27, 2026
Middleware Management API Controllers - Implementation Plan
Objective
Implement complete backend controller logic for the middleware management REST API, enabling dynamic middleware configuration through seven CRUD endpoints.
Deliverables
1. Core Controllers (
controllers.py)?force=trueparameter2. Data Models (
models.py)MiddlewareCreate,MiddlewareUpdatewith field validation3. Security Validation (
validation.py)AbstractMiddlewareinheritance andapply_middleware()method4. Database Integration
taskStore.middlewareswith unique indexes on name/class_pathcreated_atandupdated_atfields5. Testing
Technical Approach
class_pathandsourcefields prevent code substitution attacksDependencies
External: FOCA, Connexion, Flask, MongoDB, Pydantic, PyMongo, requests
Internal:
pro_tes.middleware.abstract_middleware, database connection utilitiesSuccess Criteria
✅ All 7 endpoints functional and returning correct HTTP status codes
✅ Unit tests passing with 100% controller coverage
✅ Response validation passing against OpenAPI schema
✅ No breaking changes to existing TES API functionality
Pull Request for this issue
uniqueg commentedon Oct 24, 2026
Closing as not planned.
We decided against a runtime management API for task plugins: operators
manage the available plugins and the default pipeline by configuration
only (versioned, reviewed and rolled out like any other config change),
and no code is installed at runtime. Clients can still choose the
pipeline per task, from the plugins the operator allowed, via a reserved
task tag (
gateway.pipeline, see #218).The plugin engine moves into FOCA (
foca.plugins, FOCA 0.18.0, elixir-cloud-aai/foca#485),so proTES, proWES and later gateways share it; proTES adopts it in
#321. Thanks to everyone who worked on the management design: its goals
(admin control, discoverability, per-task choice) are covered by the
config,
GET /pluginsand the per-task tags.uniqueg commentedon Oct 26, 2026
Closing note: proTES moves its task middlewares to the FOCA plugin engine (elixir-cloud-aai/foca#485, in FOCA 0.18.0; proTES migration in #194). By design, plugins are managed by configuration only: admins enable, pin and order them in the app config, and there is no runtime API to install, enable or disable them. A middleware management API with controllers is therefore not planned. Available plugins can be listed read-only via
GET /pluginsand in/service-info.