Add configurable credential providers to the network proxy (#44056)

## What changed

- Add `credential_providers` configuration for environment variables, credential patterns, static or environment-derived URL prefixes, and bearer, token, Basic, or custom header authentication.
- Generate matching dummy credentials and restrict replacement to authorized schemes, hosts, ports, and path prefixes. Scope credentials and destination history to each environment.
- Preserve real credentials for destinations that bypass the proxy with `allow_local_binding`, while providing snapshot redaction and alias matching.
- Validate provider definitions and preserve unchanged providers across configuration reloads.

## Testing

Add coverage for dummy generation, authentication translation, URL restrictions, environment isolation, configuration reloads, and credential restoration for local proxy bypass.

GitOrigin-RevId: 5d60ecc684cf4e9aa7637af33af12179aa0c672a
This commit is contained in:
Winston Howes authored and copyberry committed 2026-09-09 04:59:01 +00:00
1 parent 96c2b4377f
commit 1bfd383890
25 files changed
+3540 -299

No files matched your search

+4
View File
@@ -23,6 +23,10 @@ codex-utils-rustls-provider = { workspace = true }
globset = { workspace = true }
opentelemetry = { workspace = true }
rand = { workspace = true }
rand_regex = { workspace = true }
regex = { workspace = true }
regex-syntax = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }