🔴 Crítico | Segurança/Performance | API
Problema
MAX_JSON_PAYLOAD_SIZE=52428800 (50MB) — extremamente alto para uma API key-value.
Impacto
20 requisições simultâneas de 50MB = 1GB de memória. Engine LSM-tree não tem limite de tamanho de valor por chave. DoS por exaustão de memória trivial.
Evidência
src/api/config.rs:50-51: max_json_payload_size: 50 * 1024 * 1024
Recomendação
Reduzir para 1MB (1048576) como default. Implementar limite configurável por endpoint. Validar no middleware ANTES de chegar ao handler.
Validação
curl -X PUT -d "$(python3 -c "print(\"x\"*2000000)")" http://localhost:8080/keys/test → deve retornar 413.
Prioridade: Imediata
🔴 Crítico | Segurança/Performance | API
Problema
MAX_JSON_PAYLOAD_SIZE=52428800(50MB) — extremamente alto para uma API key-value.Impacto
20 requisições simultâneas de 50MB = 1GB de memória. Engine LSM-tree não tem limite de tamanho de valor por chave. DoS por exaustão de memória trivial.
Evidência
src/api/config.rs:50-51:max_json_payload_size: 50 * 1024 * 1024Recomendação
Reduzir para 1MB (1048576) como default. Implementar limite configurável por endpoint. Validar no middleware ANTES de chegar ao handler.
Validação
curl -X PUT -d "$(python3 -c "print(\"x\"*2000000)")" http://localhost:8080/keys/test→ deve retornar 413.Prioridade: Imediata