mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Adds a configurable password-strength policy (default: min 12 chars, upper/lower/number/special, all individually toggleable, floored at 8 so a misconfigured minimum cannot disable the length check, and unicode-aware so an accented letter cannot satisfy the special- character requirement) enforced on every path that sets a local user's password: /user/update, /user/bulk_update, and the invitation onboarding claim flow. Adds general_settings.disable_password_login_when_sso_enabled, which rejects username/password login on /login, /v2/login and /v3/login (including the UI_USERNAME/UI_PASSWORD admin fallback) once ANY configured SSO provider is FULLY ready: every companion secret/ endpoint an OAuth provider needs, checked independently per provider so a stray leftover client id for an unused provider can't mask a different, fully configured one; and for SAML, the optional python3-saml runtime being importable, checked without letting a fully-missing package's ModuleNotFoundError take down password login itself. SSO becomes the enforced boundary for interactive UI access without an incomplete, mixed, or half-installed SSO setup locking every admin out or breaking login outright. Master-key API access is untouched, and unsetting the setting plus a restart restores password login as the documented recovery path. |
||
|---|---|---|
| .. | ||
| .coverage_baseline | ||
| __init__.py | ||
| _coverage_check.py | ||
| _pin_check.py | ||
| conftest.py | ||
| test_background_health.py | ||
| test_exception_handlers.py | ||
| test_harness_smoke.py | ||
| test_lifecycle.py | ||
| test_openapi_customization.py | ||
| test_proxy_config.py | ||
| test_routes_anthropic_beta.py | ||
| test_routes_assistants.py | ||
| test_routes_audio.py | ||
| test_routes_chat_completions.py | ||
| test_routes_completions.py | ||
| test_routes_config.py | ||
| test_routes_embeddings.py | ||
| test_routes_invitation.py | ||
| test_routes_login_sso.py | ||
| test_routes_misc.py | ||
| test_routes_model_cost_map.py | ||
| test_routes_model_info.py | ||
| test_routes_model_metrics.py | ||
| test_routes_models.py | ||
| test_routes_moderations.py | ||
| test_routes_onboarding.py | ||
| test_routes_queue.py | ||
| test_routes_threads.py | ||
| test_routes_utils.py | ||
| test_spend_counters.py | ||
| test_streaming_helpers.py | ||
| test_team_model_name_translation.py | ||