litellm/tests/proxy_admin_ui_tests
Yuneng Jiang 01eee0944c
[Fix] Restrict /global/spend/* routes to admin roles
The routes in `global_spend_tracking_routes` (e.g. /global/spend/report,
/global/spend/teams, /global/spend/keys) return spend aggregated across
every team, customer, and api_key in the proxy. They were included in
`internal_user_routes` and `internal_user_view_only_routes`, so non-admin
roles could read proxy-wide spend.

Drop them from both non-admin route lists. PROXY_ADMIN and
PROXY_ADMIN_VIEW_ONLY access is preserved through their existing branches
in route_checks.py, and the `get_spend_routes` permission opt-in
continues to grant access for keys that need it.

Updates two pre-existing test parametrizations whose expected results
flip from True to False, and adds parametrized coverage over every
route in `global_spend_tracking_routes` for: PROXY_ADMIN_VIEW_ONLY
allowed, INTERNAL_USER blocked, INTERNAL_USER_VIEW_ONLY blocked,
INTERNAL_USER + get_spend_routes permission allowed.
2026-04-24 22:46:07 -07:00
..
e2e_ui_tests Fixing e2e 2025-12-05 12:40:58 -08:00
test-results
ui_unit_tests [Fix] Remove neon CLI dependency and pin all JS dependencies 2026-04-01 16:15:32 -07:00
utils Find inputs by placeholder 2025-12-03 21:51:45 -08:00
.npmrc chore: harden npm supply chain — pin overrides, enforce npm ci, add ignore-scripts (#24838) 2026-03-31 13:41:37 -07:00
conftest.py
package-lock.json fix pkg lock 2025-11-22 11:52:57 -08:00
package.json [Fix] Remove neon CLI dependency and pin all JS dependencies 2026-04-01 16:15:32 -07:00
playwright.config.ts
test_key_management.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_role_based_access.py [Fix] Restrict /global/spend/* routes to admin roles 2026-04-24 22:46:07 -07:00
test_route_check_unit_tests.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_sso_sign_in.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_usage_endpoints.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00