litellm/tests/e2e/management
mubashir1osmani 6c003562f3 test(e2e): add JWT auth journey suite against a real Keycloak IdP
Authenticate to the gateway with real RS256 JWTs from Keycloak (the IdP in the
e2e stack), the way an enterprise fronts the proxy with its identity provider.
The suite idempotently provisions a realm with an admin client (token carries the
litellm_proxy_admin scope), a team client (token carries a hardcoded team_id
claim), and a short-lived client, then asserts: an admin token is allowed on a
management route; a team token can call its team's model and is denied a model
outside the team's allow-list; a token signed by a key outside the IdP's JWKS is
rejected; and a short-lived token flips from accepted to 401 once it expires.

Adds a urllib-based Keycloak driver (pydantic-validated boundaries, no requests),
a JWTAuthClient, keycloak_env/jwt_client fixtures, KEYCLOAK_* config, and two new
other.auth.jwt team-model cells (the three jwt reject/allow cells already existed).

Requires a licensed proxy started with enable_jwt_auth + litellm_jwtauth.issuers
trusting the Keycloak realm (config block documented in the suite module docstring).

Part of LIT-4639.
2026-07-20 21:11:48 -07:00
..
conftest.py test(e2e): add JWT auth journey suite against a real Keycloak IdP 2026-07-20 21:11:48 -07:00
jwt_auth_client.py test(e2e): add JWT auth journey suite against a real Keycloak IdP 2026-07-20 21:11:48 -07:00
keycloak.py test(e2e): add JWT auth journey suite against a real Keycloak IdP 2026-07-20 21:11:48 -07:00
management_client.py test(e2e): cover user deletion removing it from user inventory (#34007) 2026-07-20 22:38:32 +00:00
scim_provisioning_client.py test(e2e): add SCIM v2 provisioning journey suite 2026-07-20 20:00:03 -07:00
sso_management_client.py test(e2e): add SSO management journey suite (Entra + Okta) 2026-07-20 19:39:22 -07:00
test_jwt_auth_e2e.py test(e2e): add JWT auth journey suite against a real Keycloak IdP 2026-07-20 21:11:48 -07:00
test_management_e2e.py test(e2e): cover created key appearing in /key/list inventory (#34008) 2026-07-20 22:40:39 +00:00
test_scim_provisioning_e2e.py test(e2e): add SCIM v2 provisioning journey suite 2026-07-20 20:00:03 -07:00
test_sso_management_e2e.py test(e2e): add SSO management journey suite (Entra + Okta) 2026-07-20 19:39:22 -07:00