Problem Statement
No request body size limits configured in FastAPI or nginx. Large payloads could cause DoS via memory exhaustion before application-level validation runs.
Evidence
quantara/web_app/api/main.py: No maximum_request_body_size configured
quantara/frontend/quantara.conf: No client_max_body_size directive in nginx
Impact
Medium — DoS vector. Attacker can send multi-GB JSON payloads exhausting server memory before Pydantic validation runs.
Proposed Solution
Set nginx client_max_body_size 1M (rejects at edge). Additionally configure FastAPI maximum_request_body_size as defense-in-depth.
Acceptance Criteria
File Map
quantara/web_app/api/main.py — configure body size limit
quantara/frontend/quantara.conf — add client_max_body_size 1M
quantara/frontend/quantara_dev.conf — add client_max_body_size 1M
Testing Strategy
- Integration: Send request with body >1MB, verify 413 response
Security Considerations
DoS hardening. Nginx-level limit is most effective — rejects before reaching application.
Definition of Done
Labels: security, quick-win
Priority: Medium
Difficulty: Beginner
Estimated Effort: 0.5h
Problem Statement
No request body size limits configured in FastAPI or nginx. Large payloads could cause DoS via memory exhaustion before application-level validation runs.
Evidence
quantara/web_app/api/main.py: Nomaximum_request_body_sizeconfiguredquantara/frontend/quantara.conf: Noclient_max_body_sizedirective in nginxImpact
Medium — DoS vector. Attacker can send multi-GB JSON payloads exhausting server memory before Pydantic validation runs.
Proposed Solution
Set nginx
client_max_body_size 1M(rejects at edge). Additionally configure FastAPImaximum_request_body_sizeas defense-in-depth.Acceptance Criteria
client_max_body_size 1MFile Map
quantara/web_app/api/main.py— configure body size limitquantara/frontend/quantara.conf— addclient_max_body_size 1Mquantara/frontend/quantara_dev.conf— addclient_max_body_size 1MTesting Strategy
Security Considerations
DoS hardening. Nginx-level limit is most effective — rejects before reaching application.
Definition of Done
Labels: security, quick-win
Priority: Medium
Difficulty: Beginner
Estimated Effort: 0.5h