mirror of
https://github.com/openai/codex.git
synced 2026-11-27 15:30:27 +00:00
feat(exec-server): add Noise rendezvous environment (#28774)
## Why
Codex can run a remote exec server through the Noise relay, but the
normal
environment-manager path could not establish an
environment-registry-backed
harness connection. Signed rendezvous URLs and harness authorizations
are
short-lived, so reconnects must fetch a fresh bundle instead of
retaining
stale connection credentials. A stalled registry request must also fail
within
the regular remote connection deadline, without exposing these
credentials in
debug logs.
Issue: N/A (internal environment-service integration).
## What Changed
- Add environment-manager configuration for a registry-backed Noise
rendezvous
environment.
- Request a fresh bundle from
`/cloud/environment/{environment_id}/connect` for every physical harness
connection, using the existing 10-second remote connection timeout.
- Share the Environment Registry register, connect, and validate wire
payloads
through `codex-exec-server` and `codex-core-api`.
- Redact the signed rendezvous URL and harness authorization from the
public
connect response's `Debug` output.
- Add focused coverage for registry bundle retrieval, stalled requests,
and
credential redaction.
This commit is contained in:
1 parent
e7b6e0d859
commit
c274a83f8b
7 files changed
+433
No files matched your search
@@ -19,6 +19,36 @@ pub struct EnvironmentRegistryRegistrationResponse {
|
||||
pub executor_registration_id: String,
|
||||
}
|
||||
|
||||
/// Request body for connecting a harness key with the environment registry.
|
||||
#[derive(Clone, Deserialize, Eq, PartialEq, Serialize)]
|
||||
pub struct EnvironmentRegistryConnectRequest {
|
||||
pub harness_public_key: NoiseChannelPublicKey,
|
||||
}
|
||||
|
||||
/// Environment registry response returned after connecting a harness key.
|
||||
#[derive(Clone, Deserialize, Eq, PartialEq, Serialize)]
|
||||
pub struct EnvironmentRegistryConnectResponse {
|
||||
pub environment_id: String,
|
||||
pub url: String,
|
||||
pub security_profile: String,
|
||||
pub executor_registration_id: String,
|
||||
pub executor_public_key: NoiseChannelPublicKey,
|
||||
pub harness_key_authorization: String,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for EnvironmentRegistryConnectResponse {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("EnvironmentRegistryConnectResponse")
|
||||
.field("environment_id", &self.environment_id)
|
||||
.field("url", &"<redacted>")
|
||||
.field("security_profile", &self.security_profile)
|
||||
.field("executor_registration_id", &self.executor_registration_id)
|
||||
.field("executor_public_key", &self.executor_public_key)
|
||||
.field("harness_key_authorization", &"<redacted>")
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
/// Request body for authorizing a harness key with the environment registry.
|
||||
#[derive(Clone, Deserialize, Eq, PartialEq, Serialize)]
|
||||
pub struct EnvironmentRegistryHarnessKeyValidationRequest {
|
||||
@@ -32,3 +62,7 @@ pub struct EnvironmentRegistryHarnessKeyValidationRequest {
|
||||
pub struct EnvironmentRegistryHarnessKeyValidationResponse {
|
||||
pub valid: bool,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "environment_registry_tests.rs"]
|
||||
mod tests;
|
||||
Reference in new issue
Block a user