Files
ee 8cac68328a Add renewable federated auth primitives to the Responses API proxy (#55298)
## What changed

Add a federated `Auth` variant that exchanges JWT subject tokens for OpenAI access tokens using identity provider and service account IDs. Serialize concurrent exchanges, cache credentials, and renew proactively with a fresh subject token.

Validate token types, bearer credentials, payload sizes, and lifetimes. Bound caching by both relative and absolute expiry, discard cached credentials before renewal, and disable redirects for federated requests. Keep credential buffers zeroizing and diagnostics free of secrets.

## Testing

Add HTTP fixture tests for concurrent cache reuse, renewal with fresh subjects, expiry across host suspension, failed renewal, oversized payloads, invalid subjects, and unsupported or missing issued token types.

GitOrigin-RevId: e7e6dacd4a834fb73166caf146d4cdc50a895f56
2026-10-19 15:08:17 +00:00

40 lines
1.1 KiB
TOML

[package]
name = "codex-responses-api-proxy"
version.workspace = true
edition.workspace = true
license.workspace = true
[lib]
name = "codex_responses_api_proxy"
path = "src/lib.rs"
doctest = false
[[bin]]
name = "codex-responses-api-proxy"
path = "src/main.rs"
[lints]
workspace = true
[dependencies]
anyhow = { workspace = true }
bytes = { workspace = true }
clap = { workspace = true, features = ["derive"] }
codex-http-client = { workspace = true }
codex-process-hardening = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
libc = { workspace = true }
reqwest = { workspace = true, features = ["blocking", "json", "rustls-tls"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tiny_http = { workspace = true }
tokio = { workspace = true, features = ["rt", "time", "net"] }
url = { workspace = true }
zeroize = { workspace = true, features = ["serde"] }
[dev-dependencies]
pretty_assertions = { workspace = true }
tracing = { workspace = true }
tracing-test = { workspace = true, features = ["no-env-filter"] }