Destructive by-query endpoints silently ignore unknown filter params, so a mistyped filter deletes everything
Describe the issue
Reported from Cloud: delete-by-query endpoints ignore namespace / flowId filters and purge tenant-wide.
→ Needs reproduction before scheduling.
Likely cause
ExecutionController.deleteExecutionsByQuery (ExecutionController.java:539) takes filters only in the PHP-style nested form:
filters[namespace][CONTAINS]=testA caller passing the flat legacy form ?namespace=x&flowId=y supplies parameters the endpoint does not bind. They are ignored rather than rejected, so filters arrives empty and getExecutionIds(...) matches everything in the tenant. A typo or a stale client has the same effect as an intentional purge, with no error.
Same shape applies to the other destructive by-query routes: ExecutionController.java:2112 (kill), FlowController.java:829, TriggerController.java:364.
Expected
On destructive by-query endpoints, unknown or unbindable query parameters are a 400, not a silent no-op. An empty filter set on a delete should be rejected outright rather than treated as "match all".
Related
- kestra#11659 (dry-run for multi-object API requests) is the mitigation for the same class of problem;
- docs#3142 asks for the acceptable-filter documentation whose absence makes the wrong form easy to send.
Environment
- Kestra Version: develop
Source: kestra-io/kestra