Add LiteLLM RBAC: akP-litellm groups + role claim mapping
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful

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:
2026-07-19 18:42:36 +10:00
parent a7ef454fba
commit 7610627168
7 changed files with 69 additions and 0 deletions
@@ -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
+3
View File
@@ -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
+11
View File
@@ -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
+1
View File
@@ -3,3 +3,4 @@ permissions:
- akP-grafana-admin
- akP-argocd-admin
- akP-rancher-admin
- akP-litellm-admin
+1
View File
@@ -3,3 +3,4 @@ permissions:
- akP-grafana-user
- akP-argocd-user
- akP-rancher-user
- akP-litellm-user