Add LiteLLM RBAC: akP-litellm groups + role claim mapping
Bring LiteLLM into the two-tier RBAC and map groups to LiteLLM roles. - akP-litellm-admin / akP-litellm-user permission groups (bound to the litellm app for access); added to akR-global-admin / akR-standard-user roles. - Generic per-provider role_mappings: emit an app role claim computed from effective (hierarchical) group membership. LiteLLM: emits `litellm_role` (proxy_admin for akP-litellm-admin, internal_user for akP-litellm-user, else internal_user_view_only); LiteLLM reads it via GENERIC_USER_ROLE_ATTRIBUTE. Validated: plan 5 to add, 3 to change; generated role expression renders correctly.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Permission group akP-litellm-admin (name = filename). Grants admin
|
||||
# access to litellm: bound to the litellm application and mapped to its role.
|
||||
application: litellm
|
||||
@@ -0,0 +1,3 @@
|
||||
# Permission group akP-litellm-user (name = filename). Grants user
|
||||
# access to litellm: bound to the litellm application and mapped to its role.
|
||||
application: litellm
|
||||
@@ -16,3 +16,14 @@ scope_mappings:
|
||||
redirect_uris:
|
||||
- matching_mode: strict
|
||||
url: https://litellm.k8s.syd1.au.unkin.net/sso/callback
|
||||
# Emit a `litellm_role` claim from group membership (rules in privilege order).
|
||||
# LiteLLM requests the `litellm_role` scope and reads it via
|
||||
# GENERIC_USER_ROLE_ATTRIBUTE. akP-litellm-admin is inherited by akR-global-admin.
|
||||
role_mappings:
|
||||
claim: litellm_role
|
||||
default: internal_user_view_only
|
||||
rules:
|
||||
- group: akP-litellm-admin
|
||||
role: proxy_admin
|
||||
- group: akP-litellm-user
|
||||
role: internal_user
|
||||
|
||||
@@ -3,3 +3,4 @@ permissions:
|
||||
- akP-grafana-admin
|
||||
- akP-argocd-admin
|
||||
- akP-rancher-admin
|
||||
- akP-litellm-admin
|
||||
|
||||
@@ -3,3 +3,4 @@ permissions:
|
||||
- akP-grafana-user
|
||||
- akP-argocd-user
|
||||
- akP-rancher-user
|
||||
- akP-litellm-user
|
||||
|
||||
Reference in New Issue
Block a user