mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
* fix(mcp)!: refuse HMAC JWT algorithms at the MCP client assertion and JWT signer in fips_mode PyJWT computes HS256/384/512 with hmac.new, which does not use the OpenSSL FIPS provider's HMAC service. With general_settings.fips_mode on, the MCP client assertion (client_assertion_signing_alg) and the MCP JWT signer's incoming-token check now accept only RS/PS/ES 256/384/512 and EdDSA. Standard mode is unchanged. * test(mcp): type the fips_mode JWT algorithm tests and serve the JWKS over HTTP * fix(mcp)!: compute HS256/384/512 with the FIPS provider's HMAC service in fips_mode Replaces the fips_mode JWT algorithm allowlist at the MCP client assertion and the MCP JWT signer. PyJWT's hmac.new builds HMAC outside the provider's MAC service; in fips_mode both sites now use a PyJWT whose HS* algorithms call hmac.digest, and refuse HMAC keys under 112 bits. EdDSA, ES521 and HS* with adequate keys work again in fips_mode. Standard mode is unchanged. * test(mcp): record the fips_mode hmac.digest call with a wrapping mock * fix(mcp): pass the digest name to hmac.digest so every supported Python takes OpenSSL's one-shot HMAC * fix(proxy)!: compute every HS256/384/512 JWT with the FIPS provider's HMAC service in fips_mode fips_mode now swaps HS* on PyJWT's registry for the whole process instead of at the two MCP sites, so the UI session cookie, onboarding, BYOK, MCP session and Lens tokens take the same route and the same 112-bit key floor. The Moyai connect code uses the one-shot HMAC in every mode. Standard mode keeps PyJWT's own HMAC. * fix(proxy): leave PyJWT's registry alone unless fips_mode swaps an algorithm * test(mcp): mint the short-key token with stock PyJWT so the check under test is the verifier * fix(proxy): leave the Moyai connect code HMAC as it is on main |
||
|---|---|---|
| .. | ||
| guardrail_hooks | ||
| __init__.py | ||
| test_anthropic_sse.py | ||
| test_auto_router_compression.py | ||
| test_content_filter_path_traversal.py | ||
| test_content_utils.py | ||
| test_custom_code_security.py | ||
| test_deferred_guardrail_logging.py | ||
| test_endpoint_image_scan.py | ||
| test_guardrail_coverage.py | ||
| test_guardrail_endpoints.py | ||
| test_guardrail_helpers.py | ||
| test_guardrail_initializers.py | ||
| test_guardrail_load_balancing.py | ||
| test_guardrail_registry.py | ||
| test_init_guardrails.py | ||
| test_llm_as_a_judge.py | ||
| test_mcp_jwt_signer.py | ||
| test_pillar_guardrails.py | ||
| test_prompt_security_guardrails.py | ||
| test_qostodian_nexus_guardrail.py | ||
| test_usage_endpoints.py | ||
| test_usage_tracking.py | ||