Wire remote app-server auth through the client (#14853)

For app-server websocket auth, support the two server-side mechanisms
from
PR #14847:

- `--ws-auth capability-token --ws-token-file /abs/path`
- `--ws-auth signed-bearer-token --ws-shared-secret-file /abs/path`
  with optional `--ws-issuer`, `--ws-audience`, and
  `--ws-max-clock-skew-seconds`

On the client side, add interactive remote support via:

- `--remote ws://host:port` or `--remote wss://host:port`
- `--remote-auth-token-env <ENV_VAR>`

Codex reads the bearer token from the named environment variable and
sends it
as `Authorization: Bearer <token>` during the websocket handshake.
Remote auth
tokens are only allowed for `wss://` URLs or loopback `ws://` URLs.

Testing:
- tested both auth methods manually to confirm connection success and
rejection for both auth types
This commit is contained in:
Eric Traut
2026-03-25 22:17:03 -06:00
committed by GitHub
parent b565f05d79
commit 1ff39b6fa8
7 changed files with 469 additions and 47 deletions
+1
View File
@@ -92,6 +92,7 @@ fn main() -> anyhow::Result<()> {
arg0_paths,
codex_core::config_loader::LoaderOverrides::default(),
/*remote*/ None,
/*remote_auth_token*/ None,
)
.await?,
)