Repository navigation
feat(keyring): ask the browser to keep the trusted-browser key - #306
Conversation
When a browser saves or finds its keyring device key, KyIdentity asks for persistent storage, so the browser does not clear the key on its own to free space or after days without a visit. Firefox asks the user; Chromium and Safari decide silently. A refusal changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process: ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪🧪 PR contains tests⚡ No major issues detected
Advisory only: this comment never gates the pull request. |
Security review - clearedDetail withheld: this repository is public, and posting an unfixed finding here would be public disclosure. The full report was posted to the hand-off board at https://myslop.urlxl.us/f/pr-reviewer-busnes-app-kyidentity-server-306, where it is readable by the operator and expires seven days after the last post.
gpt-6.1-sol using security-audit on behalf of Yoshi |
Autonomous review - 1/1 personas cleared
Merging remains a human decision; this bot never approves. gpt-6.1-sol using security-audit on behalf of Yoshi |
In one line: KyIdentity now asks the browser not to clear the storage that holds this browser's suite keyring key.
What changed
Review this:
web/src/keyringDevice.ts: the request runs after the device key is written and when a valid one is found, and it never blocks either.web/src/persist.ts: it doesn't ask again once storage is persistent, and it swallows errors.Checked:
npm test(306 passed, including 3 newkeepStoragecases);npm run buildwith Node 26.13.1, where only the main JS chunk changed;go build ./.... The same helper, in the KyNotes PR, passes a Chromium end-to-end test and fails it without the change.Not checked: a browser run of keyring setup here. KyIdentity has no committed browser harness for the keyring, and building one for this change wasn't worth it. The Firefox prompt and Safari weren't checked by hand.
Decided for you: we also ask when an existing trusted browser is found, so browsers trusted before this change are covered. That can show the Firefox prompt at a keyring unlock or handoff.
You need to: nothing. #296 also rebuilds
web/dist, so whichever merges second needsnpm run buildagain.Detail
This is part of a suite-wide change. KyNotes (Busnes-app/KyNotes-server#206) and KyMessages get the same request. Other Ky apps keep only preferences or service-worker caches, which can be rebuilt, so they don't need it.
keepStoragecallspersisted()beforepersist(), so a browser that already keeps the storage is never asked again.persist()only exists in page context, and the keyring runs there.🤖 Generated with Claude Code