mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* feat(proxy)!: refuse to start in fips_mode without a hex salt key With general_settings.fips_mode on, the proxy now refuses to start unless the key it encrypts stored secrets with (LITELLM_SALT_KEY, or the master key when LITELLM_SALT_KEY is not set) is at least 32 bytes of hex. The fips_mode key derivations already need that shape, so a deployment with any other key used to boot and then fail on its first secret write. The hex pattern moves to fips.py so the boot gate and the KBKDF helper share one definition. Standard mode is unchanged. * feat(proxy)!: refuse fips_mode salt keys under 112 bits instead of non-hex keys The fips_mode boot gate, derive_key_from_salt_key and their tests now share key_derivation_key: a salt key of 32+ bytes of hex (optionally sk-) is decoded as before, any other key is taken as its UTF-8 bytes, and a key under 14 bytes is refused. The refusal names the master key when LITELLM_SALT_KEY is not set. * fix(proxy): keep the raw salt key out of the frames that raise fips_mode refusals derive_key_from_salt_key no longer binds LITELLM_SALT_KEY to a local before refusing it, and enforce_fips_mode now takes get_salt_key instead of the key itself, so only fips_mode_refusal sees the key and it returns before the raise. An error reporter that captures frame locals can no longer pick up the key from a refused boot or a refused key derivation. * feat(proxy)!: derive fips_mode keys from the salt key's own bytes, without decoding hex fips_mode is only for new deployments, so there is no derived key to keep byte-identical with main. key_derivation_key now always takes the UTF-8 bytes of the salt key and only enforces the 112-bit floor. * feat(proxy)!: require LITELLM_SALT_KEY to start in fips_mode The master key no longer stands in for a missing salt key. It also signs UI session tokens, and NIST SP 800-108r1 section 5 says a key-derivation key is used for nothing else. enforce_fips_mode and fips_mode_refusal go back to main's one-argument signatures and read LITELLM_SALT_KEY themselves. |
||
|---|---|---|
| .. | ||
| html_forms | ||
| __init__.py | ||
| test_admin_ui_utils.py | ||
| test_auth_cache_invalidation_pubsub.py | ||
| test_cache_aware_routing.py | ||
| test_cache_codec.py | ||
| test_callback_config_validation.py | ||
| test_callback_utils.py | ||
| test_check_batch_cost.py | ||
| test_check_responses_cost.py | ||
| test_codex_catalog_source.py | ||
| test_codex_model_catalog.py | ||
| test_codex_model_translation.py | ||
| test_codex_version.py | ||
| test_config_sync_pubsub.py | ||
| test_credential_hydration.py | ||
| test_custom_openapi_spec.py | ||
| test_customer_usage.py | ||
| test_debug_utils.py | ||
| test_discoverable_model_filter.py | ||
| test_encrypt_decrypt_utils.py | ||
| test_error_body_call_id.py | ||
| test_expired_ui_session_key_cleanup_manager.py | ||
| test_fips.py | ||
| test_get_routes.py | ||
| test_http_parsing_utils.py | ||
| test_json_merge_patch.py | ||
| test_key_expiry_alert_manager.py | ||
| test_key_rotation_e2e.py | ||
| test_key_rotation_integration.py | ||
| test_key_rotation_lock.py | ||
| test_key_rotation_manager.py | ||
| test_load_config_utils.py | ||
| test_model_deprecation.py | ||
| test_model_listing_utils.py | ||
| test_openai_endpoint_utils.py | ||
| test_openai_error_payload.py | ||
| test_openapi_route.py | ||
| test_openapi_schema_compat.py | ||
| test_periodic_reload_schedule.py | ||
| test_proxy_encrypt_decrypt.py | ||
| test_proxy_rate_limit_error.py | ||
| test_rbac_utils.py | ||
| test_realtime_cache.py | ||
| test_registry_read_through.py | ||
| test_request_tag_mappings.py | ||
| test_reset_budget_job.py | ||
| test_resource_ownership.py | ||
| test_scheduled_job_stagger.py | ||
| test_semantic_text_index.py | ||
| test_slow_gc_logger.py | ||
| test_sse_keepalive.py | ||
| test_static_asset_utils.py | ||
| test_swagger_utils.py | ||
| test_timezone_utils.py | ||
| test_token_count_log.py | ||
| test_token_count_settings.py | ||
| test_upsert_budget_membership.py | ||
| test_user_api_key_cache.py | ||
| test_validation_error_body.py | ||