Skip to content
Fuse
Esc
navigateopen⌘Jpreview

Log in

Exchanges the shared operator token (ORCH_AUTH_TOKEN) for an HttpOnly fuse_session cookie (SameSite=Lax, Secure when the server serves TLS or ORCH_SECURE_COOKIES=true, 7-day Max-Age) so browser callers never store the token in JavaScript-readable storage. Only the master token is accepted here — not revocable API keys. Mounted outside bearer auth (but behind the CIDR allowlist). When the orchestrator runs with no auth token configured, login returns a no-op 204 regardless of body and sets no cookie. That keeps the SPA flow working only when the API key store is also absent (no DATABASE_URL), because bearer auth is a pass-through only when both are unset. With ORCH_AUTH_TOKEN empty but DATABASE_URL set — a supported configuration — the 204 is a false success: no fuse_session cookie is issued and every subsequent /v1 call fails 401 unauthorized with “missing or malformed credentials”.

POST/login
Request body
requiredapplication/json
tokenstringrequired
Responses
204Session cookie set (no body).
400Malformed request.
errorobjectrequired
Show properties
codestringrequired
Stable machine-readable code. `route_not_found` (404) means the URL matches no route this server exposes — usually a wrong host, port, or path prefix — as opposed to `not_found`, where the route exists but the resource does not. `forbidden` is emitted only by CIDR-allowlist rejections; master-only refusals (exec, attach, API key management) return 403 with code `unauthorized`.
Allowed:not_foundroute_not_foundconflictinvalid_argumentunauthorizedforbiddenunavailableinternalunimplemented
messagestringrequired
Human-readable description.
detailsobject
Optional stable, non-sensitive metadata (e.g. ids, counts). Omitted when empty.
401Token does not match. Fires the auth-failure audit hook.
errorobjectrequired
Show properties
codestringrequired
Stable machine-readable code. `route_not_found` (404) means the URL matches no route this server exposes — usually a wrong host, port, or path prefix — as opposed to `not_found`, where the route exists but the resource does not. `forbidden` is emitted only by CIDR-allowlist rejections; master-only refusals (exec, attach, API key management) return 403 with code `unauthorized`.
Allowed:not_foundroute_not_foundconflictinvalid_argumentunauthorizedforbiddenunavailableinternalunimplemented
messagestringrequired
Human-readable description.
detailsobject
Optional stable, non-sensitive metadata (e.g. ids, counts). Omitted when empty.
Request
curl -X POST "http://localhost:8080/login" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "string"
}'
Response
Session cookie set (no body).