mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
Add generated token auth to app-server WebSockets
This commit is contained in:
@@ -34,6 +34,20 @@ When running with `--listen ws://IP:PORT`, the same listener also serves basic H
|
||||
- `GET /healthz` returns `200 OK` when no `Origin` header is present.
|
||||
- Any request carrying an `Origin` header is rejected with `403 Forbidden`.
|
||||
|
||||
By default, app-server uses query-token authentication: it generates a 256-bit connection token
|
||||
and prints the complete connection URL to stderr, for example:
|
||||
|
||||
```text
|
||||
ws://127.0.0.1:4500/?token=<generated-token>
|
||||
```
|
||||
|
||||
By default, clients must provide that exact `token` query parameter during the websocket upgrade.
|
||||
Treat the printed URL as a secret. Pass `--no-token-check` to accept clients that omit the token or
|
||||
provide an incorrect token; app-server still prints the tokenized URL.
|
||||
|
||||
When `--ws-auth capability-token` or `--ws-auth signed-bearer-token` is configured, app-server
|
||||
prints the token-free listen URL and requires `Authorization: Bearer <token>` during upgrade.
|
||||
|
||||
Websocket transport is currently experimental and unsupported. Do not rely on it for production workloads.
|
||||
|
||||
The unix socket transport is intended for local app-server control-plane clients. `codex app-server proxy`
|
||||
|
||||
Reference in New Issue
Block a user