Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BETA] Support OIDC role based access to proxy #8260

Merged
merged 11 commits into from
Feb 5, 2025

Conversation

krrishdholakia
Copy link
Contributor

@krrishdholakia krrishdholakia commented Feb 5, 2025

Title

Support OIDC role based access to proxy

general_settings:
  enable_jwt_auth: True
  litellm_jwtauth:
    object_id_jwt_field: "client_id" # can be either user / team, inferred from the role mapping
    roles_jwt_field: "resource_access.litellm-test-client-id.roles"
    role_mappings:
      - role: litellm.api.consumer
        internal_role: "team"
    enforce_rbac: true

  role_permissions: # default model + endpoint permissions for a role. 
    - role: team
      models: ["anthropic-claude"]
      routes: ["openai_routes"]

Relevant issues

Allows services and users call proxy via OIDC roles.

Let's proxy admin not need to add each user/service to DB for model access + cost tracking.

image

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

  • introduces new fields to jwt auth - object_id_jwt_field, roles_jwt_field, and role_mappings
  • updates role_permissions to allow proxy admin to control allowed routes
  • enforces id always available for cost tracking if enforce_rbac = true

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

If UI changes, send a screenshot/GIF of working UI fixes

Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 6:00am

@krrishdholakia krrishdholakia merged commit 4e34fc3 into main Feb 5, 2025
3 of 19 checks passed
@krrishdholakia krrishdholakia deleted the litellm_dev_02_04_2025_p2 branch February 5, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant