mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
Expose effective login methods in config requirements (#45495)
## Why Configuration requirements did not report which login methods the running app server permits after applying managed policy, forced login settings, and workspace restrictions. ## What changed - Add `allowedLoginMethods` to `configRequirements/read`, using the running authentication manager's effective policy rather than newly read authentication settings. - Return requirements when login methods are restricted even without managed requirements, while preserving `requirements: null` for the unrestricted default. - Update protocol schemas and generated TypeScript and Python types. An empty list permits no login method; older servers may omit the field. ## Testing Add coverage for managed and forced login restrictions, workspace intersections, policy reporting after requirements files change, invalid login methods, and API-only Amazon Bedrock without ChatGPT requests. Extend tests for conflicting authentication requirements and cloud policy precedence. GitOrigin-RevId: 56c0767a74143e793aac2ac165d0cbe98a09469b
This commit is contained in:
@@ -412,6 +412,9 @@ pub struct ConfigRequirements {
|
||||
pub model_provider: Option<String>,
|
||||
/// Complete required provider definitions, using config.toml field names.
|
||||
pub model_providers: Option<HashMap<String, JsonValue>>,
|
||||
/// Effective login methods after managed, forced-login, and workspace restrictions.
|
||||
/// An empty list permits no login method. Older servers may omit this field.
|
||||
pub allowed_login_methods: Option<Vec<ForcedLoginMethod>>,
|
||||
pub cli_auth_credentials_store: Option<CliAuthCredentialsStoreMode>,
|
||||
pub chatgpt_base_url: Option<String>,
|
||||
pub additional_developer_instructions: Option<String>,
|
||||
|
||||
@@ -2120,6 +2120,7 @@ fn config_requirements_granular_allowed_approval_policy_is_marked_experimental()
|
||||
crate::experimental_api::ExperimentalApi::experimental_reason(&ConfigRequirements {
|
||||
model_provider: None,
|
||||
model_providers: None,
|
||||
allowed_login_methods: None,
|
||||
application: None,
|
||||
cli_auth_credentials_store: None,
|
||||
chatgpt_base_url: None,
|
||||
|
||||
Reference in New Issue
Block a user