-
Notifications
You must be signed in to change notification settings - Fork 294
feat(oauth): store OAuth credentials in the OS keychain by default #748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Brooooooklyn
wants to merge
22
commits into
MoonshotAI:main
Choose a base branch
from
Brooooooklyn:feat/keyring-credential-storage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2563c1b
feat(oauth): add keychain-backed token storage with file fallback
Brooooooklyn 789ed25
fix(oauth): harden keyring migration, remove, and probe against races
Brooooooklyn 2149175
feat(oauth): use keychain storage by default in the OAuth toolkit
Brooooooklyn 4848f3f
build(kimi-code): collect @napi-rs/keyring in the native SEA build
Brooooooklyn 1d8335a
fix(kimi-code): route @napi-rs/keyring through the native-asset modul…
Brooooooklyn 5e2901e
build(nix): update fetchPnpmDeps hash for @napi-rs/keyring
Brooooooklyn 7caa1a5
fix(oauth): align keychain storage with file backend (per-profile nam…
Brooooooklyn 5d589d9
fix(oauth): reconcile newer plaintext token on keychain hit (sequenti…
Brooooooklyn dc70216
docs(oauth): clarify keychain reconcile comments + pin strict-newer t…
Brooooooklyn b617256
fix(oauth): compare token issuance time, not expiry, in keychain reco…
Brooooooklyn 4ce649a
docs(oauth): note issuedAt graceful-degradation on rehydrated tokens
Brooooooklyn 11bf327
docs(oauth): document keychain-by-default storage and KIMI_DISABLE_KE…
Brooooooklyn fcc1148
test(oauth): use \x00 escape instead of literal NUL in fake keyring keys
Brooooooklyn 81a14bc
fix(oauth): surface failed keychain deletes on logout (@napi-rs/keyri…
Brooooooklyn 725f64b
fix(oauth): prune stale plaintext copy after keychain save (prevent f…
Brooooooklyn 843abd7
docs(oauth): clarify save() prune is a deliberate fail-closed choice …
Brooooooklyn 7aa600f
fix(oauth): reject keyrings that cannot delete during capability probe
Brooooooklyn 4fae69a
docs(oauth): document+test that a file tombstone never force-revokes …
Brooooooklyn c9c6196
fix(oauth): validate token name before keychain writes (file-backend …
Brooooooklyn 7118757
fix(oauth): prove keychain credential absence via service listing on …
Brooooooklyn 8d5d6ca
fix(oauth): confirm probe sentinel deletion via service listing (cons…
Brooooooklyn 9a46a99
chore: add changeset for keychain credential storage
Brooooooklyn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@moonshot-ai/kimi-code": minor | ||
| "@moonshot-ai/kimi-code-oauth": minor | ||
| --- | ||
|
|
||
| Store OAuth credentials in the OS keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service) by default, falling back to the plaintext file store when the keychain is unavailable — unsupported platform, missing/locked backend, native binary not loadable, or `KIMI_DISABLE_KEYRING=1`. Existing plaintext credentials are migrated into the keychain on first read and then deleted, so users stay logged in and the on-disk secret is removed. Set `KIMI_DISABLE_KEYRING=1` to opt out and keep using the plaintext file store. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.