[Bug]: content-length-guardrail policy accepts a non-string streamingJsonPath at API creation
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
Línea de trabajo
Encuentra el esquema de la política content-length-guardrail y compara sus parámetros de respuesta con el parámetro de cadena documentado streamingJsonPath y el ejemplo word-count-guardrail. Revisa la suite de integración mencionada en wso2/gateway-controllers#415 para entender el comportamiento actual al crear APIs. El trabajo estará completo cuando la creación de APIs rechace un valor de streamingJsonPath que no sea una cadena con HTTP 400, de forma coherente con jsonPath.
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
Please select the aspect the issue is related to
Aspect/Configuration (Config files, settings, env vars, defaults)
Description
The content-length-guardrail documentation lists streamingJsonPath as a string parameter of the response configuration. The policy reads it and refuses a value that is not a string. Its schema does not declare the parameter, so a wrong value passes API creation and fails at runtime instead.
The API is created, and every request to the operation then gets HTTP 500. A typo in this parameter breaks the operation instead of failing the deployment. jsonPath is declared as a string, and a non-string jsonPath is rejected at creation as expected.
The other seven policies in the repository that read streamingJsonPath all declare it in their schema, for example word-count-guardrail:
streamingJsonPath:
type: string
The integration suite in wso2/gateway-controllers#415 asserts the current behaviour.
Steps to Reproduce
- Create a REST API with an operation that attaches the policy with a non-string
streamingJsonPath:{"name":"content-length-guardrail","version":"v1","params":{"response":{"enabled":true,"min":1,"max":10,"streamingJsonPath":5}}} - The API is created.
- Every request to that operation gets HTTP 500. An operation on the same API with a valid configuration still works.
- Repeat with
"jsonPath": 5. API creation fails with HTTP 400, as expected.
Severity Level of the Issue
Severity/Minor (Non-critical functionality. Can be fixed in future releases)
Environment Details (with versions)
- Policy:
content-length-guardrailv1.1.0, wso2/gateway-controllers main (4f1520a8) - Gateway versions: 1.1.0 (patched), 1.2.0 and latest (
main-59dcd51)
- 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
-
Area/Policies Aspect/API Aspect/Configuration Severity/Minor Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
wso2/api-platform#4329 ·
Los mantenedores suelen responder en 1 día
Todos los issues de wso2/api-platform
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
security
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
keyxmakerx/Chronicle#2285 ·
Los mantenedores suelen responder en 1 día