Skip to content

Add system-keychain secrets API - #98

Draft
1bye wants to merge 6 commits into
mainfrom
codex/secrets-17
Draft

1bye wants to merge 6 commits into
mainfrom
codex/secrets-17

Conversation

@1bye

@1bye 1bye commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Apps can keep small tokens in the system credential store through Platform::secrets(app_id), with asynchronous read/write/delete requests. App ids and names map injectively onto separate URL keys; values have redacted Debug and zeroized owned buffers, and never register with inspection or storage tooling. Web explicitly fails without a storage fallback.

Adds desktop demo controls, a restart/cleanup probe, redaction regressions and platform/error documentation. Missing reads return None and missing deletes succeed. Backend messages are withheld; typed errors are mapped where GPUI preserves them, with documented limits. Store encryption and biometric prompts remain out of scope.

The devtools → dep:windows addition was incidental to the dependency edit; typed secrets errors require windows through gpui, which already enables it, so the extra devtools edge is redundant.

Closes #17

Verified on this Mac:

  • cargo build -p rake-app --example secrets-probe and cargo build -p rake-desktop-example passed.
  • cargo test -p rake-app --lib platform::secrets: 4 passed, including backend-message redaction and typed macOS error mappings.
  • cargo test -p rake-app --lib platform::secrets --no-default-features --features devtools: 2 passed, checking diagnostics, the formatted log tail used by file output, inspection output and the storage catalog.
  • Real Keychain probe wrote the clearly namespaced dev.rake.secrets-17-test / restart-probe entry, read it in a new process, checked missing reads and repeated deletion, and confirmed absence. Final cleanup succeeded; no test entry remains.
  • rake format, rake lint and the dependency-pin/default-Web-graph check passed.

Not verified: real Windows/Linux desktop keychains, Web runtime, interactive locked/denied prompts, or desktop button interactions. Typed error mappings use source contracts and synthetic tests; they do not establish real OS behavior. CI runs the wider platform matrix. The isolated target directory has been removed; the worktree and logs remain for review.

🤖 Generated with Claude Code

1bye and others added 6 commits November 18, 2026 19:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Secrets API backed by the system keychain

1 participant