Skip to content

feat: add auth-specific encrypted secret namespaces - #27535

Merged
celia-oai merged 4 commits into
mainfrom
codex/secret-auth-storage-namespaces
Jun 12, 2026
Merged

feat: add auth-specific encrypted secret namespaces#27535
celia-oai merged 4 commits into
mainfrom
codex/secret-auth-storage-namespaces

Conversation

@celia-oai

Copy link
Copy Markdown
Contributor

Why

CLI auth and MCP OAuth credentials should use separate encrypted files while sharing the existing local-secrets implementation and OS-keyring-backed encryption key mechanism.

This is the second PR in the encrypted-auth stack:

  1. feat: add secret auth storage configuration #27504 — feature and config selection
  2. This PR — auth-specific local-secrets namespaces
  3. CLI auth implementation and activation
  4. MCP OAuth implementation and activation

What Changed

  • Added LocalSecretsNamespace variants for shared secrets, CLI auth, and MCP OAuth.
  • Selected local.age, cli_auth.age, or mcp_oauth.age from the namespace.
  • Made atomic temporary filenames derive from the selected secrets filename.
  • Added namespaced SecretsManager construction and coverage proving the auth namespaces write separate encrypted files.
  • Made the default keyring store clonable for downstream namespaced auth backends.

This PR does not activate either auth backend or change existing credential behavior.

Validation

  • just test -p codex-secrets — 7 passed
  • just test -p codex-keyring-store — package has no test binaries
  • just fmt

@celia-oai
celia-oai marked this pull request as ready for review June 11, 2026 04:38
@celia-oai celia-oai changed the title Add auth-specific encrypted secret namespaces feat: add auth-specific encrypted secret namespaces Jun 11, 2026
@celia-oai
celia-oai requested a review from aibrahim-oai June 11, 2026 04:58
Comment thread codex-rs/secrets/src/local.rs

@aibrahim-oai aibrahim-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approved with nits on naming

@celia-oai
celia-oai force-pushed the codex/secret-auth-storage-config branch from 683a9f4 to 3e3379b Compare June 12, 2026 18:53
@celia-oai
celia-oai requested a review from a team as a code owner June 12, 2026 18:53
@celia-oai
celia-oai force-pushed the codex/secret-auth-storage-namespaces branch from 53c24ac to e026ff2 Compare June 12, 2026 18:58
Base automatically changed from codex/secret-auth-storage-config to main June 12, 2026 19:15
@celia-oai
celia-oai enabled auto-merge (squash) June 12, 2026 19:42
@celia-oai
celia-oai merged commit 7cc80b3 into main Jun 12, 2026
31 checks passed
@celia-oai
celia-oai deleted the codex/secret-auth-storage-namespaces branch June 12, 2026 19:52
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 2026
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.

2 participants