mirror of
https://github.com/openai/codex.git
synced 2026-04-30 01:16:54 +00:00
## Why The device-key protocol needs an app-server implementation that keeps local key operations behind the same request-processing boundary as other v2 APIs. app-server owns request dispatch, transport policy, documentation, and JSON-RPC error shaping. `codex-device-key` owns key binding, validation, platform provider selection, and signing mechanics. Keeping the adapter thin makes the boundary easier to review and avoids moving local key-management details into thread orchestration code. ## What changed - Added `DeviceKeyApi` as the app-server adapter around `DeviceKeyStore`. - Converted protocol protection policies, payload variants, algorithms, and protection classes to and from the device-key crate types. - Encoded SPKI public keys and DER signatures as base64 protocol fields. - Routed `device/key/create`, `device/key/public`, and `device/key/sign` through `MessageProcessor`. - Rejected remote transports before provider access while allowing local `stdio` and in-process callers to reach the device-key API. - Added stdio, in-process, and websocket tests for device-key validation and transport policy. - Documented the device-key methods in the app-server v2 method list. ## Test coverage - `device_key_create_rejects_empty_account_user_id` - `in_process_allows_device_key_requests_to_reach_device_key_api` - `device_key_methods_are_rejected_over_websocket` ## Stack This is PR 3 of 4 in the device-key app-server stack. It is stacked on #18429. ## Validation - `cargo test -p codex-app-server device_key` - `just fix -p codex-app-server`
62 lines
1.2 KiB
Rust
62 lines
1.2 KiB
Rust
mod account;
|
|
mod analytics;
|
|
mod app_list;
|
|
mod client_metadata;
|
|
mod collaboration_mode_list;
|
|
#[cfg(unix)]
|
|
mod command_exec;
|
|
mod compaction;
|
|
mod config_rpc;
|
|
mod connection_handling_websocket;
|
|
#[cfg(unix)]
|
|
mod connection_handling_websocket_unix;
|
|
mod device_key;
|
|
mod dynamic_tools;
|
|
mod experimental_api;
|
|
mod experimental_feature_list;
|
|
mod external_agent_config;
|
|
mod fs;
|
|
mod initialize;
|
|
mod marketplace_add;
|
|
mod marketplace_remove;
|
|
mod mcp_resource;
|
|
mod mcp_server_elicitation;
|
|
mod mcp_server_status;
|
|
mod mcp_tool;
|
|
mod memory_reset;
|
|
mod model_list;
|
|
mod output_schema;
|
|
mod plan_item;
|
|
mod plugin_install;
|
|
mod plugin_list;
|
|
mod plugin_read;
|
|
mod plugin_uninstall;
|
|
mod rate_limits;
|
|
mod realtime_conversation;
|
|
mod request_permissions;
|
|
mod request_user_input;
|
|
mod review;
|
|
mod safety_check_downgrade;
|
|
mod skills_list;
|
|
mod thread_archive;
|
|
mod thread_fork;
|
|
mod thread_inject_items;
|
|
mod thread_list;
|
|
mod thread_loaded_list;
|
|
mod thread_memory_mode_set;
|
|
mod thread_metadata_update;
|
|
mod thread_name_websocket;
|
|
mod thread_read;
|
|
mod thread_resume;
|
|
mod thread_rollback;
|
|
mod thread_shell_command;
|
|
mod thread_start;
|
|
mod thread_status;
|
|
mod thread_unarchive;
|
|
mod thread_unsubscribe;
|
|
mod turn_interrupt;
|
|
mod turn_start;
|
|
mod turn_start_zsh_fork;
|
|
mod turn_steer;
|
|
mod windows_sandbox_setup;
|