litellm/tests/unit/proxy/auth
ryan-crabbe-berri 34134d7ae5
fix(auth): log routine 401 rejections as one warning without a traceback (#48613)
A missing or malformed Authorization header, a blocked key, a non-admin key on an
admin-only or master-key-only route and a SCIM-deactivated user were raised as bare
exceptions, so the auth failure handler could not see the 401 and logged each one at
ERROR with a full traceback, which flooded the log under scanner traffic

They now raise a typed 401 carrying the quiet-log marker that the non-sk bearer
rejection already used, and the unknown sk- key rejection joins the same path, so
each lands as one WARNING line on stdout with no traceback. The client response is
unchanged
2026-10-27 12:46:22 -07:00
..
__init__.py
test_admin_viewer_handler_access.py
test_auth_checks.py
test_auth_checks_object_access_and_lookup.py feat(proxy): map baggage values to budget tags (#47358) 2026-10-20 09:09:42 +00:00
test_auth_exception_handler.py fix(auth): log routine 401 rejections as one warning without a traceback (#48613) 2026-10-27 12:46:22 -07:00
test_auth_hot_path_network_requests.py
test_auth_object_prefetch.py
test_auth_utils.py feat(chatgpt): forward client subscriptions through the gateway (#41522) 2026-10-26 15:44:05 -07:00
test_authorization.py
test_banned_params_extra_body.py
test_cli_auth.py
test_custom_auth_end_user_budget.py
test_default_end_user_budget_simple.py
test_fallback_budget.py
test_fallback_model_access.py
test_handle_jwt.py
test_info_routes.py
test_jwt.py
test_litellm_license.py
test_login_utils.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00
test_master_key_boot_check.py
test_mcp_ip_filtering.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00
test_model_access_group_budgets.py
test_model_checks.py fix(proxy): match partial wildcards against prefix-stripped model ids (#46390) 2026-10-20 02:49:42 +00:00
test_model_checks_fallbacks.py
test_models_fallback_endpoint.py
test_multi_budget_windows.py
test_multipart_bypass_repro.py
test_network.py
test_oauth2_proxy_hook.py
test_object_permission_loading.py
test_onboarding.py
test_organization_budget_enforcement.py
test_password_hashing.py
test_password_policy.py feat(proxy): add LITELLM_OFFLINE_MODE, one switch for the fetches LiteLLM makes on its own (#48096) 2026-10-23 16:54:19 -07:00
test_personal_key_team_model_access.py
test_proxy_routes.py
test_rds_iam_token.py
test_resolvers_exceptions.py
test_resolvers_grants.py
test_resolvers_models.py
test_resolvers_seam.py
test_resolvers_store.py
test_route_checks.py fix(auth): log routine 401 rejections as one warning without a traceback (#48613) 2026-10-27 12:46:22 -07:00
test_router_override_fallback_auth.py
test_search_tool_deny_by_default.py fix(proxy): scope dashboard search grants to user (#48464) 2026-10-26 15:01:40 -07:00
test_team_grants.py
test_team_member_budget.py feat(teams): show caller member spend and budget on Your Teams (#45674) 2026-10-24 17:09:55 -07:00
test_unmapped_model_budget_enforcement.py
test_user_api_key_auth.py fix(auth): log routine 401 rejections as one warning without a traceback (#48613) 2026-10-27 12:46:22 -07:00
test_user_api_key_auth_request_flow.py fix(proxy): validate JSON object bodies before request handling (#48438) 2026-10-26 16:11:38 -07:00