Files
codex/codex-rs/model-provider
cooper-oai 19e95b9be8 Fix API workload identity authentication at startup and refresh (#63808)
## Why

Installing workload identity credentials at startup can revoke the network
policy already configured for them. The managed model provider also expects
a ChatGPT account identity, which API workload identity credentials lack.

## What changed

- Preserve the configured network policy while installing the initial
  credentials. Later changes in credential ownership still revoke the policy.
- Bind managed API authentication to its initial credential owner so requests
  can use renewed workload identity tokens for the same service account,
  organization, and project.

## Testing

Add regression tests for preserving network restrictions and existing permits
at startup, revoking permits when the owner changes, and rejecting header
generation and unauthorized recovery after an API key owner change, even if
the original key is selected again.

GitOrigin-RevId: 25b748863064334e622097c04d74e1fbee4b8a0b
2026-11-25 02:30:37 +00:00
..