[Bug]: An immutable gateway accepts and serves deployments from the control plane
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Read gateway/gateway-controller/pkg/immutable/loader.go and the control-plane handling around pkg/controlplane/client.go:532 and :1465. Trace how immutable mode affects deployment events and startup sync, then check the relevant deployment tests. Done means control-plane deployments are rejected with a clear failure reason and are not restored or served after a restart.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Please select the area the issue is related to
Gateway, Platform API
Please select the aspect the issue is related to
Aspect/Configuration (Config files, settings, env vars, defaults)
Description
An immutable gateway ([immutable_gateway] enabled = true) is meant to serve only the artifacts in its files, and it refuses changes through its REST API with 405. But a deployment made from the control plane is applied, served and reported back as a success. It is also restored on every restart, because the startup sync re-applies the control plane's deployments after the artifacts are loaded from files.
Observed
POST /rest-apison the gateway:405 {"status":"error","message":"Gateway is in immutable mode. Mutating operations are not allowed."}- A REST API created in the control plane and deployed to this gateway (
POST /api/v0.9/rest-apis/{id}/deployments): the deployment reachesDEPLOYED, and the gateway'sGET /rest-apis/{id}answers 200. - After restarting gateway-controller (which wipes its SQLite database),
GET /rest-apis/{id}answers 200 again.
Expected
The immutable gateway rejects a deployment from the control plane, and the control plane shows the deployment as failed with a clear reason. The gateway serves only what its artifact files define.
Cause
- Immutable mode is enforced only by the REST middleware (
gateway/gateway-controller/pkg/immutable/loader.go:256). The control-plane client handlesapi.deployedand the other deploy events (pkg/controlplane/client.go:1465onwards) without checking immutable mode. - The startup sync (
pkg/controlplane/client.go:532,syncDeployments) doesn't check it either, so the control plane's deployments come back after every restart. - Platform-api has no notion of an immutable gateway, so it can't refuse the deployment itself.
Steps to Reproduce
- Start a gateway with SQLite storage and
[immutable_gateway] enabled = true, connected to platform-api. - Create a REST API in the control plane and deploy it to that gateway.
- The deployment shows
DEPLOYED, and the gateway serves the API. - Restart gateway-controller: the API is served again.
Severity Level of the Issue
Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)
Environment Details (with versions)
Current main (0ee943ff4). Platform-api and gateway built from source and run by the IT suite (tests/framework), with the gateway on SQLite, on macOS with Rancher Desktop.
- Lenguaje dominante
- Go
- Estrellas
- 85
- Forks
- 137
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 247
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wso2/api-platform
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
wso2/api-platform#4369 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy acceptsAbiertoArea/Policies Aspect/Other Severity/Trivial Type/Bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
wso2/api-platform#4355 ·
Los mantenedores suelen responder en 1 día
-
Area/Gateway Aspect/API Severity/Minor Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wso2/api-platform#4348 ·
Los mantenedores suelen responder en 1 día
-
Aspect/AI Aspect/API. Severity/Major
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
wso2/api-platform#4343 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: content-length-guardrail policy accepts a non-string streamingJsonPath at API creationAbiertoArea/Policies Aspect/Configuration Severity/Minor Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
wso2/api-platform#4330 ·
Los mantenedores suelen responder en 1 día
Todos los issues de wso2/api-platform
Issues similares
-
benchmark
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
mozilla-ai/cq#601 ·
Los mantenedores suelen responder en 1 día
-
documentation migration
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día