mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
Introduces auth_v2 as a clean-slate, flag-gated auth path (general_settings auth_version: v2). When on, the existing auth is bypassed entirely and requests flow through a new authenticator chain plus a casbin authorization engine. Slice 1 scope: - Entry point fork in user_api_key_auth; v1 untouched when the flag is off - Authenticator chain with a virtual-key node resolving identity via the existing key store (reuses get_key_object; no parallel identity storage) - casbin engine: RBAC policy rows for the control plane, role bridged from the key's existing user_role; per-resource-id objects supported - Governs the model-deployment management plane only (/model/new, /model/update, /model/delete, /model/info); every other route is loud-open and logs a warning so unprotected surfaces are never silent - Policies/groupings stored in LiteLLM_CasbinRule, loaded on cold routes with a short snapshot cache; a bootstrap policy keeps proxy_admin fully authorized - Decision core (enforcer, route map, principal, authorizer, policy store) holds no framework imports, so it is unit-testable in isolation Tests cover the allow/deny matrix, deny-override, domain scoping, per-id granularity, loud-open behavior, and policy loading. Data plane (inference-time model access) and additional resources/mechanisms are deferred to later slices. casbin governs everything eventually via ABAC matchers over cached attributes; this slice lays the control-plane foundation. |
||
|---|---|---|
| .. | ||
| dist | ||
| litellm_proxy_extras | ||
| tests | ||
| build_and_publish.md | ||
| LICENSE | ||
| migration_runbook.md | ||
| pyproject.toml | ||
| README.md | ||
Additional files for the proxy. Reduces the size of the main litellm package.
Currently, only stores the migration.sql files for litellm-proxy.
To install, run:
uv add litellm-proxy-extras
OR
uv tool install 'litellm[proxy]' # installs litellm-proxy-extras and other proxy dependencies
To use the migrations, run:
litellm --use_prisma_migrate