mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
`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. |
||
|---|---|---|
| .. | ||
| routes | ||
| Dockerfile | ||
| main.py | ||