mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
Broker credential aliases in child environments (#40484)
## What changed - Discover supported credentials inherited from the parent even when their canonical provider variable is filtered from the child environment. - Replace matching values and credentials embedded in longer child environment values with broker dummies, then restore only aliases that the broker virtualized. - Preserve provider and host bindings when selecting credentials for outbound requests, including GitHub Enterprise and custom OpenAI hosts. - Expose helpers for identifying provider and binding variables, plus an API for virtualizing credential-bearing text before it is persisted. ## Testing - Extend credential broker tests for filtered parent variables, exact and embedded aliases, text virtualization, user overrides, and host-bound GitHub and OpenAI credentials. GitOrigin-RevId: 55d673911900470aab4e206d0f4f5e62ed3611ae
This commit is contained in:
@@ -1109,6 +1109,15 @@ impl NetworkProxy {
|
||||
self.state.restore_child_credentials(env, command);
|
||||
}
|
||||
|
||||
/// Replaces allowed credentials and removes credentials excluded from the environment.
|
||||
pub fn virtualize_brokered_text(
|
||||
&self,
|
||||
text: &mut String,
|
||||
env: &HashMap<String, String>,
|
||||
) -> bool {
|
||||
self.state.virtualize_brokered_text(text, env)
|
||||
}
|
||||
|
||||
pub fn apply_to_env_for_environment(
|
||||
&self,
|
||||
env: &mut HashMap<String, String>,
|
||||
|
||||
Reference in New Issue
Block a user