OL Hub Sign-In
OL Hub sign-in is an optional top-level login. When it is on, every user signs in with an OL Hub account before any page is shown, including external emulation launch links. It is layered on top of everything else: Keycloak SSO, the admin login (OL_ADMIN / OL_PASSWORD), Managed Users and the emulation JWT, trusted headers, API keys and MCP keep working exactly as before. A user who is signed in to OL Hub still logs in to the admin panel as today.
Turning it on
Set the OL_HUB_IAM_* variables, for example in JAR mode:
java -DOL_TOOL_LICENSE=your_license_token_here \
-DOL_HUB_IAM_URL=https://login.example.com \
-DOL_HUB_IAM_CLIENT_ID=your_spa_client_id \
-jar ol-terminal.jar
Set OL_HUB_IAM_TENANT_IDS in production. Empty means any OL Hub tenant can sign in.
Never set HUB_IAM_URL. It would replace the Keycloak gate and override the signing-key settings; startup logs a warning when it is set. Use the OL_HUB_IAM_* variables instead.
Layering with other sign-ins
- Keycloak:
KEYCLOAK_*and OL Hub sign-in can be configured together; they layer. - Admin panel: the OL Hub token does not replace the admin login.
- Managed Users, trusted header, API keys, MCP: unchanged. API-key requests and MCP are not asked for an OL Hub token.
What needs a Hub token
With OL Hub sign-in on, every /api route needs a valid OL Hub token except:
OPTIONSrequestsGET /api/v1/config/public,GET /api/v1/version,GET /api/v1/auth/status/api/v1/mcp/**,/api/v1/mcp-embed/**and/api/oauth/**/api/v1/sessions/ws/**(the session itself is created over a gated REST call)- requests that carry an API key
The web app sends the token in X-OL-Hub-Authorization: Bearer <token> and leaves Authorization to the existing sign-ins. The server reads X-OL-Hub-Authorization first, otherwise Authorization, so an API client that sends only the OL Hub token may use either header.
A refused request returns 401 with hostAuthRequired: true and an optional reason (no-tenant or tenant-not-allowed). If the Hub signing keys cannot be loaded the server returns 503 with a Retry-After header.
GET /api/v1/auth/status reports whether sign-in is enabled and the current user; GET /api/v1/config/public also carries the Hub sign-in settings when the feature is on.
Before you turn it on
Add every origin users open OL Terminal from to the OL Hub sign-in client's allowed callback URLs, logout URLs and web origins, and to the OL Hub API CORS allowlist.
Require an OL Hub account before any OL Terminal page opens, layered on top of existing sign-ins.