litellm/tests/test_litellm/proxy/auth
Mateo Wang 49ca04d8c3
feat(bedrock): aws_bedrock_project_id for bedrock-mantle project / workspace association (#30163)
* feat(bedrock): support aws_bedrock_project_id for bedrock-mantle project association

Adds a litellm_params field to associate bedrock-mantle requests with an
Amazon Bedrock project, sent as the OpenAI-Project header on the
OpenAI-compatible chat and responses paths and as the anthropic-workspace
header on the Anthropic messages paths. This lets a single model entry opt
into a project-scoped data retention mode (e.g. provider_data_share for
Claude Fable 5) while the account-wide setting stays on default.

The param is carried via litellm_params only and is explicitly excluded
from optional_params so it can never leak into a request body.

Fixes #30070

* chore(ui): regenerate schema.d.ts for aws_bedrock_project_id

Generated with npm run gen:api after adding the field to LiteLLM_Params

* fix(proxy): ban client-supplied aws_bedrock_project_id in request bodies

The deployment pins aws_bedrock_project_id so the project's data
retention policy applies to its requests. Without this guard an
authenticated caller could supply the field in the request body and,
since client kwargs win the router merge, run requests under any
project reachable with the deployment's shared AWS credentials.

Adds the field to _BANNED_REQUEST_BODY_PARAMS so it is rejected at the
auth boundary by default while remaining available through the existing
admin opt-ins (allow_client_side_credentials proxy-wide or
configurable_clientside_auth_params per deployment).
2026-06-11 10:01:08 +05:30
..
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 090626 (#30021) 2026-06-10 10:34:07 -07:00
test_auth_exception_handler.py fix(proxy): return 5xx on DB infra errors during auth; reserve 401 for genuine auth failures (#29986) 2026-06-10 23:48:11 +00:00
test_auth_hot_path_network_requests.py
test_auth_utils.py feat(bedrock): aws_bedrock_project_id for bedrock-mantle project / workspace association (#30163) 2026-06-11 10:01:08 +05:30
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 feat(jwt-auth): opt-in fallback to DB team on unresolved JWT claim (#28913) 2026-06-09 01:09:03 +03:00
test_info_routes.py
test_litellm_license.py
test_login_utils.py
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_fallbacks.py
test_model_checks.py fix(proxy): hydrate wildcard discovery credentials (#28284) (#28419) 2026-05-20 20:03:05 -07:00
test_multi_budget_windows.py
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
test_onboarding.py chore(auth): address onboarding review follow-ups 2026-04-29 19:10:30 -07:00
test_organization_budget_enforcement.py
test_password_hashing.py
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): return 5xx on DB infra errors during auth; reserve 401 for genuine auth failures (#29986) 2026-06-10 23:48:11 +00:00