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
{{ message }}
Repository navigation
馃悰(delete) delete may target the wrong index when a service has sub-services聽#173
get_opensearch_indices returns one index per allowed service, built from a set (the services filter isn't applied), not the requested one. As soon as the calling service has sub-services ("Allowed services for search"), [0] is an arbitrary index in set-iteration order. The delete can then run on a different service's index than params.service.
Permissions still apply (the caller's sub must be in users), so this isn't an escalation. But deletions can silently do nothing, or hit the wrong service's index.
The existing tests in test_api_documents_delete.py only create one service with no sub-services, so they can't catch this.
Expected
Delete always targets get_opensearch_index_name(params.service) once the service is validated. Add a test with a service that has sub-services.
Activity
lunika commentedon Oct 19, 2026
Same root cause as #172. Related: #174.