Skip to content

Conversation

@celia-oai
Copy link
Contributor

@celia-oai celia-oai commented Oct 24, 2025

Follow-up PR to #5569. Add Keyring Support for Auth Storage in Codex CLI as well as a hybrid mode (default to persisting in keychain but fall back to file when unavailable.)

It also refactors out the keyringstore implementation from rmcp-client here to a new keyring-store crate.

There will be a follow-up that picks the right credential mode depending on the config, instead of hardcoding AuthCredentialsStoreMode::File.

@celia-oai celia-oai changed the base branch from main to dev/cc/auth-new-abstraction October 24, 2025 02:53
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch 6 times, most recently from 02000ee to 1294543 Compare October 24, 2025 06:57
@celia-oai celia-oai force-pushed the dev/cc/auth-new-abstraction branch from 9561e19 to 36935e7 Compare October 24, 2025 22:05
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch 7 times, most recently from 60fe5bf to 36bc480 Compare October 24, 2025 23:45
@celia-oai celia-oai requested review from gpeal, owenlin0, pakrym-oai and pkomlev and removed request for pkomlev October 24, 2025 23:47
@celia-oai celia-oai changed the title [Draft][Auth] Add keyring support for Codex CLI [Auth] Add keyring support for Codex CLI Oct 24, 2025
@celia-oai celia-oai marked this pull request as ready for review October 24, 2025 23:48
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/openai/codex/blob/36bc4807cb14bbfddd71f4e23077f1e999b1cd5d/codex-rs/core/src/auth.rs#L475-L477
P1 Badge Honor keyring storage modes when accessing CLI auth

The new AuthCredentialsStoreMode adds Keyring/Auto backends, but the top‑level helpers still instantiate storage with AuthCredentialsStoreMode::File (see logout, and similarly save_auth/load_auth_dot_json). As a result the CLI never reads or writes via the keyring and logout cannot remove keyring entries, so the feature introduced in this commit is effectively dead code. This should default to the keyring‑backed mode (or accept a user preference) so credentials are stored and deleted consistently.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@celia-oai
Copy link
Contributor Author

💡 Codex Review

https://github.com/openai/codex/blob/36bc4807cb14bbfddd71f4e23077f1e999b1cd5d/codex-rs/core/src/auth.rs#L475-L477

P1 Badge Honor keyring storage modes when accessing CLI auth
The new AuthCredentialsStoreMode adds Keyring/Auto backends, but the top‑level helpers still instantiate storage with AuthCredentialsStoreMode::File (see logout, and similarly save_auth/load_auth_dot_json). As a result the CLI never reads or writes via the keyring and logout cannot remove keyring entries, so the feature introduced in this commit is effectively dead code. This should default to the keyring‑backed mode (or accept a user preference) so credentials are stored and deleted consistently.

ℹ️ About Codex in GitHub

thanks codex, this will be a followup. added to the pr description.

@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch from 36bc480 to 739c021 Compare October 24, 2025 23:54
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch 3 times, most recently from d4def96 to 1af9588 Compare October 25, 2025 00:01
@celia-oai celia-oai force-pushed the dev/cc/auth-new-abstraction branch 7 times, most recently from 3a3c1d3 to 068a3b7 Compare October 25, 2025 05:10
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch 6 times, most recently from 0c5716f to afd91c9 Compare October 26, 2025 21:57
@celia-oai celia-oai force-pushed the dev/cc/auth-new-abstraction branch from 07d197a to 8b9e633 Compare October 27, 2025 17:29
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch 2 times, most recently from adc6753 to becb331 Compare October 27, 2025 17:55
Base automatically changed from dev/cc/auth-new-abstraction to main October 27, 2025 18:01
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch 2 times, most recently from 09513fc to 2b06a08 Compare October 27, 2025 18:07
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch from 2b06a08 to 72ccf34 Compare October 27, 2025 18:10
@celia-oai celia-oai force-pushed the dev/cc/auth-keyring-support branch from dd5ecac to ac0c0ec Compare October 27, 2025 18:34
@celia-oai celia-oai merged commit 0fc295d into main Oct 27, 2025
34 of 36 checks passed
@celia-oai celia-oai deleted the dev/cc/auth-keyring-support branch October 27, 2025 19:10
@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants