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
Found in the pre-release review of dev at 98771b3 (before v0.3.0).
Problem
Request bodies have no size limit, and they are read into memory before the bearer token is checked (Connexion builds the request object, including the body, outside the security decorator). Neither the app config nor FOCA sets Flask's MAX_CONTENT_LENGTH, and the API schemas have no maxLength. The Helm chart runs one replica with a 128Mi memory limit, and /tmp is an emptyDir without sizeLimit.
Impact
An unauthenticated client can make the pod run out of memory (or fill /tmp with multipart bodies) by sending very large request bodies. ingress-nginx limits bodies to 1m by default, but other ingress controllers and the OpenShift Route have no default limit.
Proposed fix
Set MAX_CONTENT_LENGTH (e.g. 1 MiB, configurable) on the Flask app, so oversized requests get 413 before any processing.
Test that a large body without a token gets 413.
Helm chart: set a body-size limit on the Ingress (e.g. nginx.ingress.kubernetes.io/proxy-body-size) and a sizeLimit on the /tmp volume.
Activity