litellm/tests/test_litellm/proxy/auth
Harshit28j 6d535e5639 fix(proxy): allow custom auth routes to bypass route authorization checks
Custom user-added routes (e.g. /ldap/ngs/ready) used with Depends(user_api_key_auth) were being rejected as admin-only after _run_post_custom_auth_checks was introduced in commit 14badde13c.

The route authorization check in common_checks is designed for LiteLLM's own management routes. Custom auth flows that add their own routes should be trusted since the custom auth function already validated the request. Budget and expiry checks still run.

Add skip_route_check parameter to common_checks() and pass skip_route_check=True from _run_post_custom_auth_checks() to skip route authorization while preserving budget/team/model checks.

Regression test added: test_common_checks_skip_route_check_for_custom_auth

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-03 20:20:47 +05:30
..
test_auth_checks.py fix(proxy): allow custom auth routes to bypass route authorization checks 2026-03-03 20:20:47 +05:30
test_auth_exception_handler.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -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): support slashes in google generateContent model names (#19737) 2026-01-25 22:59:50 -08:00
test_cli_auth.py Fix team cli auth flow (#19666) 2026-01-28 08:52:52 -08:00
test_custom_auth_end_user_budget.py fix: req changes 2026-02-26 15:19:32 +05:30
test_handle_jwt.py fix: set mock status_code in JWT OIDC discovery tests (#22361) 2026-03-02 21:57:54 -08:00
test_litellm_license.py Show remaining users on UI (#11568) 2025-06-09 22:04:45 -07:00
test_login_utils.py remove key blocking 2026-01-31 16:46:17 -08:00
test_mcp_ip_filtering.py Return Clear error message why no tools are available / IP Filtering occured 2026-02-26 09:56:44 +05:30
test_model_checks.py fixed byok models for teams issue (#21408) 2026-02-17 15:26:03 -08:00
test_model_checks_fallbacks.py feat: extended /v1/models endpoint, now it returns with fallbacks on demand (#12811) 2025-07-22 23:16:46 -07:00
test_object_permission_loading.py Fix:test_get_key_object_loads_object_permission 2026-02-18 19:18:15 +05:30
test_onboarding.py fix(onboarding): prevent invite link reuse for password reset 2026-02-28 17:39:03 -08:00
test_organization_budget_enforcement.py Fix/organization max budget not enforced (#17334) 2025-12-02 22:46:03 -08:00
test_route_checks.py tests and route permissions (#21508) 2026-02-18 16:58:38 -08:00
test_team_member_budget.py 3[Fix] CI/CD - logging_testing (#18204) 2025-12-18 10:52:24 -08:00
test_user_api_key_auth.py Revert "Merge pull request #21140 from BerriAI/litellm_perf_user_api_key_auth" 2026-02-21 16:57:42 -08:00