mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Accept inbound Noise connections in remote exec-server (#62325)
## Why Remote Noise executors previously connected outbound to a rendezvous relay. An inbound listener lets harnesses that can reach the executor connect directly while retaining registry-backed authorization. ## What changed Use `--listen ws://IP:PORT` with `--remote` in Noise mode to accept inbound WebSockets. The listener serves RPCs over encrypted Noise streams after the registry authorizes the harness. It limits concurrent connections and handshake attempts, closes sockets that miss the first authorization deadline, and drains connections on shutdown. Noise clients can attach optional admission headers from the connection bundle to `wss://` requests. ## Testing The inbound integration test exercises a registry-authorized file read, rejection of a registry-denied harness, the absence of a plaintext RPC response, and connection closure on shutdown. Unit tests cover handshake limits and rejection of admission headers before dialing a plaintext WebSocket. GitOrigin-RevId: b388672e49a3fe806e38f6db38825435ba25d27a
This commit is contained in:
@@ -580,6 +580,7 @@ metrics_exporter = {{ otlp-http = {{ endpoint = "{collector_url}/v1/metrics", pr
|
||||
let executor_public_key = registered_parent_lifetime_executor_public_key(®istry).await?;
|
||||
let harness_args = NoiseRendezvousConnectArgs {
|
||||
bundle: NoiseRendezvousConnectBundle {
|
||||
http_headers: Default::default(),
|
||||
websocket_url: format!("{rendezvous_url}/relay?role=harness"),
|
||||
environment_id: ENVIRONMENT_ID.to_string(),
|
||||
executor_registration_id: EXECUTOR_REGISTRATION_ID.to_string(),
|
||||
@@ -870,6 +871,7 @@ metrics_exporter = {{ otlp-http = {{ endpoint = "{}/v1/metrics", protocol = "jso
|
||||
let executor_public_key = registered_parent_lifetime_executor_public_key(®istry).await?;
|
||||
let args = NoiseRendezvousConnectArgs {
|
||||
bundle: NoiseRendezvousConnectBundle {
|
||||
http_headers: Default::default(),
|
||||
websocket_url: format!("{rendezvous}/relay?role=harness"),
|
||||
environment_id: ENVIRONMENT.to_string(),
|
||||
executor_registration_id: "registration-scoped".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user