mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
Every authorization decision now flows through one audit record - the compliance trail enterprise auth needs and the biggest gap called out in the design review. - audit.py: a frozen AuthzDecision (decision, subject, domain, obj, action, route, reason, auth_method) and record(), which logs the decision and fans out to any registered sinks (DB / SIEM). Sinks are isolated: a failing sink is logged but never affects the request outcome. - The authorizer records allow, deny, and loud-open for every governed and ungoverned control-plane route; the entry point records the model-call (call) decision on the inference path. auth_method is threaded through so the record shows how the principal authenticated. - register_sink / reset_sinks exported for wiring a durable sink. Fully typed (no new Any), mypy clean on 22 files, 134 tests green, still imports with casbin/authlib absent. |
||
|---|---|---|
| .. | ||
| v2 | ||
| test_admin_viewer_handler_access.py | ||
| test_auth_checks.py | ||
| test_auth_exception_handler.py | ||
| test_auth_hot_path_network_requests.py | ||
| test_auth_utils.py | ||
| test_banned_params_extra_body.py | ||
| test_cli_auth.py | ||
| test_custom_auth_end_user_budget.py | ||
| test_handle_jwt.py | ||
| test_info_routes.py | ||
| test_litellm_license.py | ||
| test_login_utils.py | ||
| test_mcp_ip_filtering.py | ||
| test_model_checks.py | ||
| test_model_checks_fallbacks.py | ||
| test_multi_budget_windows.py | ||
| test_oauth2_proxy_hook.py | ||
| test_object_permission_loading.py | ||
| test_onboarding.py | ||
| test_organization_budget_enforcement.py | ||
| test_password_hashing.py | ||
| test_route_checks.py | ||
| test_router_override_fallback_auth.py | ||
| test_team_member_budget.py | ||
| test_unmapped_model_budget_enforcement.py | ||
| test_user_api_key_auth.py | ||