diff --git a/litellm/proxy/auth/v2/README.md b/litellm/proxy/auth/v2/README.md index 4c450a7537a..73d387e1e84 100644 --- a/litellm/proxy/auth/v2/README.md +++ b/litellm/proxy/auth/v2/README.md @@ -1,7 +1,8 @@ # auth_v2 A clean-slate authentication and authorization path for the proxy, built on -industry-standard libraries (authlib for JWT/OAuth2, casbin for RBAC/ABAC). It +industry-standard libraries (authlib for JWT/OAuth2, casbin for control-plane +RBAC). It runs in parallel with the existing auth behind a flag; when on, the existing auth is bypassed entirely. @@ -26,21 +27,24 @@ Authentication is a chain dispatched by credential shape: - JWT (3-part bearer) -> authlib: JWKS fetch/cache, signature + exp/iss/aud - opaque token -> authlib RFC 7662 introspection (when configured) -Authorization is a single casbin engine governing both planes: +Authorization splits by plane: -- control plane (management routes): RBAC policy rows over resources - `model`, `team`, `key`, `user`, `organization`, `policy`, with actions - `read` / `write` / `delete` / `manage`. Supports per-resource ids, resource - groups (casbin `g2`, mapping to access groups), and roles that are either - global or scoped to a domain (casbin `g3`, e.g. "admin within team:eng"). +- control plane (management routes): a casbin engine with RBAC policy rows over + resources `model`, `team`, `key`, `user`, `organization`, `policy`, with + actions `read` / `write` / `delete` / `manage`. Supports per-resource ids, + resource groups (casbin `g2`, mapping to access groups), and roles that are + either global or scoped to a domain (casbin `g3`, e.g. "admin within + team:eng"). - data plane (inference: chat/completions, completions, embeddings, responses): - casbin ABAC over the principal's allowed-model attribute, read from the - already-loaded key. Empty list / `*` / `all-proxy-models` are unrestricted, - matching existing key semantics. + a plain membership/pattern predicate over the principal's allowed-model list, + read from the already-loaded key. It is not a policy engine: on the hot path a + casbin evaluation of a list check is pure overhead. Exact names and wildcard + patterns (`bedrock/*`, `openai/*`, v1 semantics) match; empty list / `*` / + `all-proxy-models` are unrestricted, matching existing key semantics. -Policies live in `LiteLLM_CasbinRule`, loaded on cold routes with a short TTL -cache; the inference path reads no policy store. A bootstrap policy keeps -`proxy_admin` fully authorized. +Control-plane policies live in `LiteLLM_CasbinRule`, loaded on cold routes with a +short TTL cache; the inference path reads no policy store. A bootstrap policy +keeps `proxy_admin` fully authorized. ## Configuration