litellm/tests/test_litellm/proxy/auth
harish-berri 16f74fed15 refactor(auth): ensure cached UserAPIKeyAuth objects are returned as deep copies to prevent mutation
Currently the in memory cache uses a hash map which returns references to elements and not deep copies. Since we dont want to enforce this at the interface level, allowing copy creation at call sites necessary. This minimizes performane overhead.

- Updated `get_key_object` to return a deep copy of cached UserAPIKeyAuth objects.
- Modified `update_valid_token_with_end_user_params` to create a deep copy of the valid token before applying updates.
- Added unit tests to verify that original cached tokens remain unmodified after updates.
2026-04-29 18:56:13 +00:00
..
test_auth_checks.py Fix bug that bypasses per-team member budget limit 2026-04-22 10:41:13 -07:00
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 test: add coverage for get_project_model_rpm/tpm_limit and check_complete_credentials 2026-04-17 19:38:13 -07:00
test_cli_auth.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_custom_auth_end_user_budget.py refactor(auth): ensure cached UserAPIKeyAuth objects are returned as deep copies to prevent mutation 2026-04-29 18:56:13 +00:00
test_handle_jwt.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -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 Return Clear error message why no tools are available / IP Filtering occured 2026-02-26 09:56:44 +05:30
test_model_checks.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -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_object_permission_loading.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_onboarding.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -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 Split MCP routes into inference vs management categories 2026-04-23 16:52:45 -07:00
test_team_member_budget.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_unmapped_model_budget_enforcement.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_user_api_key_auth.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00