Authentication is handled by the LiteMaaS backend using OpenShift OAuth (OAuthClient). Users log in with their OpenShift credentials through the frontend UI.
ansible-playbook playbooks/deploy_litemaas_ha.yml \
-e ocp4_workload_litemaas_oauth_enabled=trueOr with the deploy script:
./deploy-litemaas.sh litellm-rhpds --oauth| Variable | Default | Description |
|---|---|---|
ocp4_workload_litemaas_oauth_enabled |
false |
Enable OAuth login |
ocp4_workload_litemaas_oauth_provider |
openshift |
OAuth provider |
ocp4_workload_litemaas_oauth_client_id |
{{ namespace }} |
OAuthClient name |
ocp4_workload_litemaas_oauth_client_secret |
auto-generated | OAuthClient secret |
User → Frontend UI → Backend /api/auth/callback → OpenShift OAuth → JWT session
- The Ansible role creates an OpenShift
OAuthClientresource with redirect URIs pointing to the backend callback endpoint - User clicks "Login" on the frontend
- Backend redirects to OpenShift OAuth login page
- After login, OpenShift redirects back to the backend callback
- Backend creates/updates the user in the database and issues a JWT session
The OAuthClient and redirect URIs are configured automatically during pre_workload.yml.
- OAuthClient named after the namespace (e.g.,
litemaas) - Redirect URIs:
https://litellm.<cluster>/api/auth/callbackandhttps://litellm-frontend.<cluster>/api/auth/callback - Backend secret with
OAUTH_CLIENT_SECRET
# Check OAuthClient
oc get oauthclient <namespace> -o yaml
# Redirect URIs should include both API and frontend callbacks
# Check backend logs for OAuth flow
oc logs deployment/litellm-backend -n <namespace> --tail=50# In common.yaml
workloads:
- rhpds.litemaas.ocp4_workload_litemaas
ocp4_workload_litemaas_oauth_enabled: trueCheck redirect URIs match the actual route hostnames:
oc get oauthclient <namespace> -o jsonpath='{.redirectURIs}'
oc get route -n <namespace>If users were migrated from an older version, their oauth_id in the database may not match the OpenShift user UID. The v0.2.1+ backend has an email fallback — it looks up by email if oauth_id doesn't match and updates the oauth_id automatically.
OAuth cleanup happens automatically when removing the deployment:
ansible-playbook playbooks/deploy_litemaas_ha.yml \
-e ocp4_workload_litemaas_remove=trueThis removes the OAuthClient along with the namespace.