Files
codex/codex-rs/network-proxy/Cargo.toml
T
viyatb-oai 9a8a85bc53 Add AWS SigV4 signing to network proxy MITM hooks (#56182)
## Why

Allow workloads to make AWS requests with placeholder credentials while keeping real AWS credentials in the trusted proxy process.

## What changed

- Add an `aws_sigv4` hook action with a placeholder access key ID, region, service, HTTPS port, and credential sources from proxy environment variables or files.
- Re-sign matching requests after network and hook authorization and header transformations, using the configured credentials and optional session token.
- Support empty payloads and explicitly unsigned payloads, including streaming unsigned S3 uploads. Reject selected requests with incompatible credential scopes, presigned URLs, unsupported streaming signatures, or ambiguous framing through the hook denial path.
- Mark generated credential headers as sensitive and suppress signing SDK trace events that could expose credentials.

## Testing

Add tests for the published AWS IAM signature vector, unsigned S3 uploads with a session token, and rejection of invalid transport, credential scopes, signing inputs, and unsupported bodies.

GitOrigin-RevId: ab4fbbc00ba40a5bb309add521fea6ee2ff6e79e
2026-10-22 14:01:19 +00:00

82 lines
2.5 KiB
TOML

[package]
name = "codex-network-proxy"
edition.workspace = true
version.workspace = true
license.workspace = true
[lib]
name = "codex_network_proxy"
path = "src/lib.rs"
doctest = false
[[bin]]
name = "codex-network-proxy"
path = "src/main.rs"
[lints]
workspace = true
[dependencies]
anyhow = { workspace = true }
aws-credential-types = { workspace = true }
aws-sigv4 = { workspace = true }
base64 = { workspace = true }
clap = { workspace = true, features = ["derive"] }
chrono = { workspace = true }
codex-utils-absolute-path = { workspace = true }
codex-utils-home-dir = { workspace = true }
codex-utils-path-uri = { workspace = true }
codex-utils-rustls-provider = { workspace = true }
globset = { workspace = true }
opentelemetry = { workspace = true }
rand = { workspace = true }
rand_regex = { workspace = true }
regex = { workspace = true }
regex-automata = { workspace = true }
regex-syntax = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_ignored = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
time = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
url = { workspace = true }
rama-core = { version = "=0.3.0-alpha.4" }
rama-http = { version = "=0.3.0-alpha.4" }
rama-http-backend = { version = "=0.3.0-alpha.4", features = ["tls"] }
rama-net = { version = "=0.3.0-alpha.4", features = ["http", "tls"] }
rama-socks5 = { version = "=0.3.0-alpha.4" }
rama-tcp = { version = "=0.3.0-alpha.4", features = ["http"] }
rama-tls-rustls = { version = "=0.3.0-alpha.4", features = ["http"] }
rustls-native-certs = { workspace = true }
sha2 = { workspace = true }
[dev-dependencies]
pretty_assertions = { workspace = true }
tempfile = { workspace = true }
[target.'cfg(target_family = "unix")'.dependencies]
libc = { workspace = true }
rama-unix = { version = "=0.3.0-alpha.4" }
[target.'cfg(target_os = "macos")'.dependencies]
rama-dns = { version = "=0.3.0-alpha.4" }
security-framework = "3"
[target.'cfg(windows)'.dependencies]
schannel = "0.1"
windows-sys = { workspace = true, features = [
"Win32_Foundation",
"Win32_NetworkManagement_IpHelper",
"Win32_Networking_WinSock",
"Win32_Security",
"Win32_Security_Authorization",
"Win32_System_Threading",
] }
[target.'cfg(windows)'.dev-dependencies]
codex-windows-sandbox = { path = "../windows-sandbox-rs" }