mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
retain ui_routes enum alias for JWT config backwards compatibility
This commit is contained in:
parent
26e99f22b3
commit
3af7de4222
2 changed files with 27 additions and 1 deletions
|
|
@ -607,6 +607,32 @@ class LiteLLMRoutes(enum.Enum):
|
|||
]
|
||||
)
|
||||
|
||||
# Retained for backwards compatibility with JWT auth configs that reference
|
||||
# "ui_routes" in admin_allowed_routes. Not used by the proxy's own route
|
||||
# authorization — UI tokens now go through the same RBAC path as API tokens.
|
||||
ui_routes = [
|
||||
"/sso",
|
||||
"/sso/get/ui_settings",
|
||||
"/get/ui_settings",
|
||||
"/login",
|
||||
"/key/info",
|
||||
"/config",
|
||||
"/spend",
|
||||
"/model/info",
|
||||
"/v2/model/info",
|
||||
"/v2/key/info",
|
||||
"/models",
|
||||
"/v1/models",
|
||||
"/global/spend",
|
||||
"/global/spend/logs",
|
||||
"/global/spend/keys",
|
||||
"/global/spend/models",
|
||||
"/global/spend/tags",
|
||||
"/global/predict/spend/logs",
|
||||
"/global/activity",
|
||||
"/health/services",
|
||||
] + info_routes
|
||||
|
||||
internal_user_routes = (
|
||||
[
|
||||
"/global/activity",
|
||||
|
|
|
|||
|
|
@ -715,7 +715,7 @@ async def aaaatest_user_token_output(
|
|||
assert team_result.user_id == user_id
|
||||
|
||||
|
||||
@pytest.mark.parametrize("admin_allowed_routes", [None, ["info_routes"]])
|
||||
@pytest.mark.parametrize("admin_allowed_routes", [None, ["ui_routes"]])
|
||||
@pytest.mark.parametrize("audience", [None, "litellm-proxy"])
|
||||
@pytest.mark.asyncio
|
||||
async def test_allowed_routes_admin(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue