mirror of
https://github.com/openai/codex.git
synced 2026-11-19 23:05:23 +00:00
Enforce managed authentication backend settings (#39043)
## What changed - Add `cli_auth_credentials_store` and `chatgpt_base_url` as exact managed requirements loaded from local requirements configuration. - Apply these requirements to runtime and bootstrap authentication configuration, overriding user-configured values. - Expose the managed values through `configRequirements/read` and reject attempts to change them through config write APIs. - Ignore these local-only authentication requirements in cloud-managed requirement layers. ## Testing - Cover requirement loading and composition, runtime and bootstrap overrides, app-server responses, and read-only config writes. GitOrigin-RevId: 8ea9c096386072036ca5441f3d48af8707988a65
This commit is contained in:
1 parent
d0fd4e830a
commit
0f21cb3413
24 files changed
+458
-22
No files matched your search
@@ -9,6 +9,7 @@ use crate::outgoing_message::OutgoingMessageSender;
|
||||
use codex_analytics::AnalyticsEventsClient;
|
||||
use codex_app_server_protocol::AutoReviewRequirements;
|
||||
use codex_app_server_protocol::BrowserUseRequirements;
|
||||
use codex_app_server_protocol::CliAuthCredentialsStoreMode;
|
||||
use codex_app_server_protocol::ClientResponsePayload;
|
||||
use codex_app_server_protocol::ComputerUseRequirements;
|
||||
use codex_app_server_protocol::ConfigBatchWriteParams;
|
||||
@@ -352,6 +353,23 @@ fn map_requirements_toml_to_api(requirements: ConfigRequirementsToml) -> ConfigR
|
||||
.and_then(|windows| windows.sandbox_private_desktop);
|
||||
|
||||
ConfigRequirements {
|
||||
cli_auth_credentials_store: requirements.cli_auth_credentials_store.map(
|
||||
|mode| match mode {
|
||||
codex_config::types::AuthCredentialsStoreMode::File => {
|
||||
CliAuthCredentialsStoreMode::File
|
||||
}
|
||||
codex_config::types::AuthCredentialsStoreMode::Keyring => {
|
||||
CliAuthCredentialsStoreMode::Keyring
|
||||
}
|
||||
codex_config::types::AuthCredentialsStoreMode::Auto => {
|
||||
CliAuthCredentialsStoreMode::Auto
|
||||
}
|
||||
codex_config::types::AuthCredentialsStoreMode::Ephemeral => {
|
||||
CliAuthCredentialsStoreMode::Ephemeral
|
||||
}
|
||||
},
|
||||
),
|
||||
chatgpt_base_url: requirements.chatgpt_base_url,
|
||||
allowed_approval_policies: requirements.allowed_approval_policies.map(|policies| {
|
||||
policies
|
||||
.into_iter()
|
||||
|
||||
Reference in new issue
Block a user