litellm/tests/test_litellm/proxy/auth
ryan-crabbe-berri 85b5920528 feat(proxy): auth_v2 enforces team/org/global budgets by reusing v1's functions
Closes the hierarchy-budget gap: team, organization, and global caps live in v1's
common_checks (not the pre-call hooks), which auth_v2 does not run, so they were
unenforced under v2. enforce_hierarchy_budgets calls the exact same functions v1
uses - _team_max_budget_check, _organization_max_budget_check, and
get_global_proxy_spend + _global_proxy_budget_check - so there is one budget
implementation with two callers (true single authority), with the correct
spend-counter conventions and no edit to v1's path. Wired into the inference
branch for all login types; a breach surfaces as the same 429 ProxyException v1
raises.

Verified in-process: a team over budget is blocked (BudgetExceededError), under
budget is allowed, and a teamless identity is a no-op. Real-counter accuracy
across pods remains a live check (see INTEGRATION.md).
2026-06-05 12:09:47 -07:00
..
v2 feat(proxy): auth_v2 enforces team/org/global budgets by reusing v1's functions 2026-06-05 12:09:47 -07:00
test_admin_viewer_handler_access.py fix(rbac): restore admin-viewer read parity for Logs page + settings reads 2026-04-29 19:21:41 -07:00
test_auth_checks.py Litellm oss staging 030626 (#29578) 2026-06-03 11:01:51 -07:00
test_auth_exception_handler.py Fix proxy auth status code tests (#27555) 2026-05-09 14:47:48 -07:00
test_auth_hot_path_network_requests.py fix: update docker test file to right path 2026-02-19 18:44:28 +05:30
test_auth_utils.py fix(proxy): resolve managed video model ids for auth (#29545) 2026-06-02 19:31:36 -07:00
test_banned_params_extra_body.py chore(tests): drop redundant membership check; trim test comment 2026-05-14 03:39:15 +00:00
test_cli_auth.py cover cli sso start validation 2026-04-29 17:25:32 -07:00
test_custom_auth_end_user_budget.py Litellm oss staging 030626 (#29578) 2026-06-03 11:01:51 -07:00
test_handle_jwt.py fix(proxy): passthrough 404 when SERVER_ROOT_PATH is set (#29658) 2026-06-04 07:44:51 -07:00
test_info_routes.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_litellm_license.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_login_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mcp_ip_filtering.py [internal copy of #28008] Support MCP OAuth passthrough and issuer-scoped JWT auth (#28356) 2026-06-02 12:22:04 -07:00
test_model_checks.py fix(proxy): hydrate wildcard discovery credentials (#28284) (#28419) 2026-05-20 20:03:05 -07:00
test_model_checks_fallbacks.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_multi_budget_windows.py feat: multiple concurrent budget windows per API key and team (#24883) (#25109) 2026-04-06 14:02:04 -07:00
test_oauth2_proxy_hook.py chore(auth): require trusted proxy for header identity auth 2026-04-29 21:20:21 -07:00
test_object_permission_loading.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_onboarding.py chore(auth): address onboarding review follow-ups 2026-04-29 19:10:30 -07:00
test_organization_budget_enforcement.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_password_hashing.py chore: fixes 2026-03-30 18:36:58 -07:00
test_route_checks.py fix(proxy): passthrough 404 when SERVER_ROOT_PATH is set (#29658) 2026-06-04 07:44:51 -07:00
test_router_override_fallback_auth.py [Fix] Proxy: Repair Merge Fallout In Router-Override Fallback Auth 2026-05-01 17:48:51 -07:00
test_team_member_budget.py Fix team member budget enforcement without user row (#27273) 2026-05-06 11:42:29 -07:00
test_unmapped_model_budget_enforcement.py perf: eliminate per-request callback scanning on proxy hot path (#27858) 2026-05-14 09:28:31 -07:00
test_user_api_key_auth.py fix(proxy): enforce allowed_passthrough_routes for auth=true pass-thr… (#29256) 2026-05-30 17:07:24 -07:00