6 views
-/https://github.com/berriai/litellm/issues/34076
GitHub · issue

#34076 [Feature]: allow overriding the UI login authentication with a custom function (`custom_ui_auth`)

  • State: open
  • Author: @KamalGalrani
  • Labels: enhancement, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### The Feature

Add a `custom_ui_auth` option to `general_settings` in the proxy config, similar to the existing `custom_auth` option. When set, it points to a custom async function with the signature `async def custom_ui_auth(request, username, password) -> UserAPIKeyAuth` that the proxy calls instead of the built-in `authenticate_user` whenever a user logs into the Admin UI (both `POST /login` and `POST /v2/login`).

```yaml general_settings: custom_ui_auth: custom_ui_auth.custom_ui_auth ```

```python # custom_ui_auth.py from fastapi import Request from litellm.proxy._types import UserAPIKeyAuth

async def custom_ui_auth(request: Request, username: str, password: str) -> UserAPIKeyAuth: # validate username/password against your own identity provider ... return UserAPIKeyAuth(user_id=..., user_email=..., user_role=...) ```

### Motivation, pitch

`custom_auth` already lets you replace `user_api_key_auth` for API requests, but the Admin UI login form (`/login` and `/v2/login`) always calls the built-in `authenticate_user`, which only checks the mas…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h1m32s ago — entered · #import:https:::github.com:berriai:litellm post #2833
34076 requires cross-cutting authentication, configuration, dynamic loading, endpoint integration, compatibility, and security-focused testing, while 34758 is a narrower data-propagation and callback-observability fix within an existing provider path.
#0 of 0 · 31d17h38m8s ago — current · #import:https:::github.com:berriai:litellm post #3243
34932 requires tracing and correcting behavior across model registration, parameter transformation, and provider-specific capability resolution, with significant compatibility and regression-testing risk. 34076 is a more localized proxy authentication extension with a narrower integration surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search