mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
* feat(proxy): let the admin-connected Moyai deployment sign users in through the gateway login The proxy-API sign-in (`lite login --pkce`) already does gateway login, a team consent page, PKCE, refresh and revoke, and mints a per-user, per-team credential the normal auth path enforces models, budgets and rate limits on. It refused every hosted callback, so Moyai could not use it. A proxy-API grant may now redirect to the Moyai deployment a proxy admin connected (the existing `moyai_url` setting) as well as to loopback. A credential delivered to a hosted callback is limited to the inference routes, and the limit is carried on the grant so a refresh keeps it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * test(proxy): let the gateway-endpoint minter stand-in take allowed_routes like the real minter Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * feat(proxy): bind the Moyai login credential to a client key (DPoP) and expire it in ten minutes A proxy-API grant for a hosted callback now needs an RFC 9449 DPoP proof at the token endpoint. The credential and its refresh token are bound to that key: every request with the credential must carry a fresh proof for its method, URL and token, checked where every authenticated request converges, with the proof's jti claimed in the shared single-use cache. The credential lives for ten minutes and is renewed with the rotating refresh token. `lite login` on loopback is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * fix(proxy): carry the DPoP key binding in the credential's metadata, not a new auth-object field A new field on UserAPIKeyAuth changed the serialized shape every cache and the Rust key store agree on byte for byte. The binding now rides in the minted credential's existing metadata, which every copy and cache already carries, so the auth object is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * fix(proxy): refuse a replayed DPoP proof on the token endpoint too Proofs on code exchange and refresh were verified but their jti was not claimed, so the replay guarantee was narrower there than on API requests. Both now go through one helper that verifies the proof and claims its jti. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * fix(proxy): answer a single-use store outage as unavailable, not as a bad DPoP proof A proof whose jti could not be recorded was refused as invalid_dpop_proof, so a client would drop a still-valid grant during a Redis fault. The token endpoint now answers 503 temporarily_unavailable and API requests 503, the way the code and refresh-token claims already do; only a missing, invalid, replayed or wrong-key proof is a 400/401. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| auth | ||
| events | ||
| faults | ||
| guardrail_translation | ||
| outbound_credentials | ||
| __init__.py | ||
| conftest.py | ||
| test_auth_profiles.py | ||
| test_byok_credential_cache.py | ||
| test_byok_oauth_endpoints.py | ||
| test_callback_oauth_error_responses.py | ||
| test_capabilities.py | ||
| test_catalog.py | ||
| test_client_allowlist.py | ||
| test_contracts.py | ||
| test_db_credentials.py | ||
| test_discoverable_endpoints.py | ||
| test_gateway_dcr_flow.py | ||
| test_id_jag_grant.py | ||
| test_idp_token_exchange.py | ||
| test_interactions.py | ||
| test_is_tool_name_prefixed.py | ||
| test_jwt_mcp_enforcement.py | ||
| test_jwt_mcp_simple.py | ||
| test_mcp_auth_header_extraction.py | ||
| test_mcp_auth_priority.py | ||
| test_mcp_block_recording.py | ||
| test_mcp_chat_completions.py | ||
| test_mcp_client_unit.py | ||
| test_mcp_cost_calculator.py | ||
| test_mcp_custom_fields.py | ||
| test_mcp_debug.py | ||
| test_mcp_discovery.py | ||
| test_mcp_elicitation_handler.py | ||
| test_mcp_env_vars.py | ||
| test_mcp_guardrail_usage_monitor.py | ||
| test_mcp_header_alias_utils.py | ||
| test_mcp_hook_extra_headers.py | ||
| test_mcp_logging.py | ||
| test_mcp_max_concurrent_requests.py | ||
| test_mcp_metadata_preservation.py | ||
| test_mcp_oauth_passthrough.py | ||
| test_mcp_oauth_passthrough_cold_start.py | ||
| test_mcp_oauth_passthrough_tools.py | ||
| test_mcp_partial_update.py | ||
| test_mcp_proxy_mode.py | ||
| test_mcp_sampling_completion_flow.py | ||
| test_mcp_sampling_model_access.py | ||
| test_mcp_sampling_model_resolution.py | ||
| test_mcp_sampling_priority_selection.py | ||
| test_mcp_sampling_request_builder.py | ||
| test_mcp_sampling_response_conversion.py | ||
| test_mcp_sampling_tool_conversion.py | ||
| test_mcp_server.py | ||
| test_mcp_server_identity_env.py | ||
| test_mcp_server_manager.py | ||
| test_mcp_server_tool_calls_and_headers.py | ||
| test_mcp_session_logging.py | ||
| test_mcp_sigv4_auth.py | ||
| test_mcp_stale_session.py | ||
| test_mcp_tool_search.py | ||
| test_mcp_toolset_scope.py | ||
| test_oauth2_flow_backfill.py | ||
| test_oauth2_mcp_config.yaml | ||
| test_oauth2_token_cache.py | ||
| test_oauth_identity_binding.py | ||
| test_oauth_issuer_stamp_backfill.py | ||
| test_openapi_spec_path_url.py | ||
| test_openapi_to_mcp_generator.py | ||
| test_openapi_tool_auth.py | ||
| test_operations.py | ||
| test_per_user_oauth_cache.py | ||
| test_proxy_api_credentials.py | ||
| test_rest_endpoints.py | ||
| test_result_conversion.py | ||
| test_semantic_tool_filter.py | ||
| test_server_resolution.py | ||
| test_short_mcp_tool_prefix.py | ||
| test_state_tokens.py | ||
| test_stored_auth_profiles.py | ||
| test_subscriptions.py | ||
| test_tool_registry.py | ||
| test_ui_session_utils.py | ||
| test_upstream.py | ||
| test_utils.py | ||