Summary
Admin routes are declared as protected but the ApiKeyAuth middleware is never actually mounted on them. Any request to an admin endpoint succeeds regardless of whether a valid x-api-key header is present.
Affected Files
services/api/src/main.rs
services/api/src/security.rs
Problem
ApiKeyAuth is initialized and the key is read from config, but the middleware layer is never attached to the admin route group. Admin routes are reachable without any authentication at runtime.
Acceptance Criteria
Impact
Critical — any caller can invoke admin operations (e.g., market resolution, user management) without credentials.
Summary
Admin routes are declared as protected but the
ApiKeyAuthmiddleware is never actually mounted on them. Any request to an admin endpoint succeeds regardless of whether a validx-api-keyheader is present.Affected Files
services/api/src/main.rsservices/api/src/security.rsProblem
ApiKeyAuthis initialized and the key is read from config, but the middleware layer is never attached to the admin route group. Admin routes are reachable without any authentication at runtime.Acceptance Criteria
x-api-keyheader is required on all/admin/*endpoints.401 Unauthorized.AdminApiKeysecurity scheme.Impact
Critical — any caller can invoke admin operations (e.g., market resolution, user management) without credentials.