litellm-mirror/litellm/proxy/auth
Krish Dholakia 2eaa0079f2
feat(handle_jwt.py): initial commit adding custom RBAC support on jwt… (#8037)
* feat(handle_jwt.py): initial commit adding custom RBAC support on jwt auth

allows admin to define user role field and allowed roles which map to 'internal_user' on litellm

* fix(auth_checks.py): ensure user allowed to access model, when calling via personal keys

Fixes https://github.com/BerriAI/litellm/issues/8029

* feat(handle_jwt.py): support role based access with model permission control on proxy

Allows admin to just grant users roles on IDP (e.g. Azure AD/Keycloak) and user can immediately start calling models

* docs(rbac): add docs on rbac for model access control

make it clear how admin can use roles to control model access on proxy

* fix: fix linting errors

* test(test_user_api_key_auth.py): add unit testing to ensure rbac role is correctly enforced

* test(test_user_api_key_auth.py): add more testing

* test(test_users.py): add unit testing to ensure user model access is always checked for new keys

Resolves https://github.com/BerriAI/litellm/issues/8029

* test: fix unit test

* fix(dot_notation_indexing.py): fix typing to work with python 3.8
2025-01-28 16:27:06 -08:00
..
auth_checks.py feat(handle_jwt.py): initial commit adding custom RBAC support on jwt… (#8037) 2025-01-28 16:27:06 -08:00
auth_checks_organization.py (feat proxy) [beta] add support for organization role based access controls (#6112) 2024-10-09 15:18:18 +05:30
auth_utils.py Ollama ssl verify = False + Spend Logs reliability fixes (#7931) 2025-01-23 23:05:41 -08:00
handle_jwt.py feat(handle_jwt.py): initial commit adding custom RBAC support on jwt… (#8037) 2025-01-28 16:27:06 -08:00
litellm_license.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
model_checks.py (UI) - allow assigning wildcard models to a team / key (#8041) 2025-01-27 18:06:22 -08:00
oauth2_check.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
oauth2_proxy_hook.py add hook for oauth2 proxy 2024-08-28 15:51:20 -07:00
public_key.pem fix update public key 2024-07-27 09:45:58 -07:00
rds_iam_token.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
route_checks.py fix is llm api route check (#7631) 2025-01-08 18:45:59 -08:00
service_account_checks.py [Feat-Proxy] add service accounts backend (#5852) 2024-09-23 16:37:02 -07:00
user_api_key_auth.py feat(handle_jwt.py): initial commit adding custom RBAC support on jwt… (#8037) 2025-01-28 16:27:06 -08:00