v2.12.0
[2.12.0] - 2026-06-14
Added
- Unified authentication across every surface. A single
AUTH_MODEselector (none/api_key/oidc) governs REST, Arrow Flight SQL, the Postgres wire protocol, the Gradio UI, and the MCP server. Off by default (AUTH_MODE=none), so the public demo and local dev are unchanged; production turns it on withAUTH_MODE=api_key+API_KEYS(comma-separated keys, rotated by overlap). Startup fails fast on an empty key list or a weak key (under 32 characters or low-entropy).oidcis reserved for a later release and is rejected loudly until then. See the newdocs/guide/authentication.md. - REST API-key auth. Every
/v1endpoint requires a valid key when auth is on;X-API-Key(configurable viaAPI_KEY_HEADER) andAuthorization: Bearerare both accepted. Missing credentials return401withWWW-Authenticate, invalid ones403./health,/robots.txt,/docs,/redoc,/openapi.json, and/uistay open, and/healthnow reportsauth_modeso clients can detect the requirement without a key. - Flight + pgwire auth on the shared key store. Arrow Flight validates the handshake credential (the API key) against the same store. The Postgres wire surface requires the key as a password, defaulting to SCRAM-SHA-256 (which never sends the key on the wire); operators can opt into cleartext with
PGWIRE_AUTH_MODE=password. The legacyFLIGHT_AUTH_MODE=token/FLIGHT_API_TOKENpath keeps working for one release with a deprecation warning. - UI credential forwarding. The Gradio UI reads
OBSL_API_KEYand forwards it on every REST call; browser users never see it. It logs a clear startup error when the API requires auth but no key is set. The co-hosted (embedded) UI also requiresOBSL_API_KEYto be set explicitly (see Security).
Changed
AUTH_ENABLEDis deprecated. It now acts as an alias forAUTH_MODE=api_keyand logs a startup warning. Migrate toAUTH_MODE.- FastAPI 0.137 compatibility. FastAPI 0.137 rejects empty-string route paths supplied via
include_router(prefix=...)("Prefix and path cannot be both empty"). The five affected routers (sessions, models, settings, dialects, reference) now declare their prefix on theAPIRouter()constructor instead, which keeps their root routes at the same URLs with no trailing slash. No version cap needed.
Security
- Embedded UI no longer auto-loads the server's API key.
/uiis a server-side proxy that can act on/v1, and it is not itself behind API-key auth. Previously, withAUTH_MODE=api_keythe embedded UI silently adopted the first configured key, turning/uiinto an open privileged proxy. It now injects a key only whenOBSL_API_KEYis set explicitly, and logs a warning that/uimust be network-protected when it is. - pgwire pre-auth DoS hardening. The startup + password/SCRAM handshake now runs under a hard deadline (
PGWIRE_AUTH_TIMEOUT_SECONDS, default 10s) so a stalled unauthenticated client cannot pin a connection slot. Post-startup frames are capped at 16 MB, and auth (password/SASL) frames at 64 KB, so a client cannot advertise a huge frame to exhaust memory before authenticating. - Heartbeat is exempt from global API-key auth.
POST /v1/heartbeatkeeps its ownAuthorization: Bearer <HEARTBEAT_AUTH_TOKEN>auth and is included outside the auth-bearing router, so its token is no longer rejected by the global auth's Bearer-as-API-key fallback. - Weak API keys are rejected at startup. Keys shorter than 32 characters or with low character diversity are refused (the server will not start), since short / low-entropy keys are vulnerable to offline attack on captured SCRAM transcripts. Generate a strong key with
python3 -c "import secrets; print(f'obsl_pat_{secrets.token_hex(20)}')". - Flight requires explicit
FLIGHT_ENABLED. The Arrow Flight SQL server no longer auto-starts merely becauseob-flight-extensionis installed; it starts only whenFLIGHT_ENABLED=true. This prevents silently exposing a SQL surface on0.0.0.0by package presence alone. When the package is present but the flag is off, startup logs a hint. (Deployments that relied on auto-start must now setFLIGHT_ENABLED=true.) - Unauthenticated Flight startup warns loudly. When Flight is enabled but starts without auth (no
AUTH_MODE=api_key, noFLIGHT_API_TOKEN) it now logs a prominent warning that it is exposing an unauthenticated SQL surface on0.0.0.0.
Full Changelog: v2.11.0...v2.12.0