mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
## What changed - Treat workload identity environment markers as an explicit authentication selection, even when another process credential is present. - Return initialization errors from `AuthManager` and propagate them through commands and services instead of continuing with an unusable authentication state. - Make `codex login status` validate workload identity, keep the TUI on an embedded app server for local workload identity, and reject workload identity in `codex mcp-server`, where it is unsupported. ## Testing - Cover workload identity precedence and partial configuration errors. - Verify login status reports an unreadable identity assertion and app-server routing enforces the supported workload identity topology. GitOrigin-RevId: efc6b6b4cd4d61652617de82aaa3d7ffc75d6618
16 lines
536 B
Rust
16 lines
536 B
Rust
use super::reject_workload_identity;
|
|
use pretty_assertions::assert_eq;
|
|
|
|
#[test]
|
|
fn workload_identity_markers_are_rejected() {
|
|
let error = reject_workload_identity(/*workload_identity_selected*/ true)
|
|
.expect_err("mcp-server does not support workload identity");
|
|
|
|
assert_eq!(
|
|
error.to_string(),
|
|
"workload identity is not supported by `codex mcp-server`"
|
|
);
|
|
reject_workload_identity(/*workload_identity_selected*/ false)
|
|
.expect("mcp-server remains available without workload identity");
|
|
}
|