litellm/backend
Yassin Kortam b78be07134 feat(auth): list and revoke lite login CLI sessions from the Admin UI
`lite login` mints a self-contained encrypted UserAPIKeyAuth blob rather than a
virtual key, so nothing about the session was stored server side and the auth
path authenticated it by decrypting it. An admin had no way to see who held a
live CLI credential and no way to cut one off before it expired.

Every login now registers a row in LiteLLM_CLISessionTable, keyed by the sha256
of the session token, and the auth path refuses a session whose row is revoked.
The lookup is cached in the shared auth DualCache for DEFAULT_IN_MEMORY_TTL, so
a session costs one read per cache interval per replica and a revoke converges
on every replica within that same interval. A CLI Sessions page in the dashboard
lists the sessions with their user, issue time and expiry, and revokes one.

Registration is fail-closed: a session that cannot be recorded is never handed
to the CLI, since it could never be revoked. Sessions minted before this change
have no row and keep working until they expire. A lookup that cannot reach the
database follows the proxy-wide allow_requests_on_db_unavailable posture rather
than inventing its own, so the credential's availability during an outage is
whatever the operator already chose for every other DB-backed auth read.
2026-08-25 20:13:13 +00:00
..
routes feat(auth): list and revoke lite login CLI sessions from the Admin UI 2026-08-25 20:13:13 +00:00
Dockerfile fix(docker): bump wolfi-base digest for busybox 1.38.0-r1 and openssl 3.6.3-r5 (#37950) 2026-08-22 11:45:39 -07:00
main.py chore(oss): litellm oss staging 120626 (#30292) 2026-06-12 09:49:25 -07:00