mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Use runtime authentication for OpenAI MCP and app requests (#59749)
## What changed - Select fresh authentication for each HTTP operation on eligible OpenAI MCP connections while preserving the connection's credential source and account network policy. Stop redirects when requests carry runtime assertions. - Pass the owning thread's authentication and runtime context through app discovery, connector metadata, and trusted-access requests. Include the runtime authentication mode in MCP connection and tool-cache identities. - Give resumed actors analytics clients bound to their own authentication context, and serialize stored-credential reloads with token refresh while preserving host-provided credentials. ## Testing Add coverage for fresh request assertions, revoked account policies, redirect handling, resumed-actor isolation, and MCP uploads in dual-header and assertion-only modes. GitOrigin-RevId: f06900a6db61cd6cf53c3aa8075afeec4d5706d9
This commit is contained in:
@@ -61,7 +61,7 @@ pub use request_preparation::prepare_provider_request;
|
||||
pub use request_setup::ResolvedProviderRequest;
|
||||
pub use request_setup::resolve_request;
|
||||
pub use runtime_auth::runtime_auth_for_url;
|
||||
pub use runtime_auth::select_runtime_auth_for_source;
|
||||
pub(crate) use runtime_auth::select_runtime_auth_for_source;
|
||||
pub use runtime_auth::validate_runtime_destination;
|
||||
pub use runtime_auth::validate_runtime_provider;
|
||||
pub use runtime_auth::validate_runtime_selectors;
|
||||
|
||||
@@ -31,7 +31,7 @@ pub(crate) async fn select_runtime_auth(
|
||||
}
|
||||
|
||||
/// Select fresh request auth without allowing a reusable client's source to change.
|
||||
pub async fn select_runtime_auth_for_source(
|
||||
pub(crate) async fn select_runtime_auth_for_source(
|
||||
manager: &Arc<RuntimeAuthManager>,
|
||||
source_generation: u64,
|
||||
headers: &HeaderMap,
|
||||
|
||||
Reference in New Issue
Block a user