fix(secrets): stop account sessions from popping Keychain - #5662
Conversation
`secure_account_session_secrets` always used the OS keyring. On macOS every unsigned rebuild is a new ACL principal, so reading the leftover `deepseek` / `codewhale-cloud-auth-v1-*` item prompted on every `codewhale web` and TUI start. Account sessions now use the private 0600 file store. Provider keys were already file-backed. Extracted from the Keychain-retirement half of #5632. That PR stays unmerged (tests red; it also changes the worker model). Signed-off-by: CodeWhale Bot <bot@codewhale.net>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Claude finished @Hmbown's task in 2m 3s —— View job Code Review
Summary: Small, well-scoped fix. Finding — stale comment now contradicts the new behavior: fn cloud_session_secrets() -> Result<Secrets> {
// Codex-style storage contract: the OS credential manager is preferred
// but never required; without one, sessions live in the private 0600
// Codewhale secrets file. Only an unresolvable store path fails here.
secure_account_session_secrets().map_err(|err| anyhow!(err.to_string()))
}This comment still describes the old "prefer the OS keyring, fall back to file" contract that Minor, non-blocking note: Good choices:
Not run: Branch: |
Signed-off-by: CodeWhale Bot <bot@codewhale.net>
|
Claude finished @Hmbown's task in 1m 6s —— View job Code Review (re-run after new commit)
Summary: New commit Still open — stale comment not updated:
Both should be updated to reflect that account sessions always use the private No new issues found in this update. Provider/model route-safety: unaffected (docs-only change). Not run: Branch: |
Summary
codewhale weband the TUI were hitting macOS Keychain on every start because account sessions always calledSecrets::system_keyring(). Unsigned or rebuilt binaries are a new Keychain ACL principal, so the leftoverdeepseek/codewhale-cloud-auth-v1-*item popped a password dialog every time.Account sessions now use
~/.codewhale/secrets/secrets.json(0600), the same store as provider keys.codewhale doctoralready reportsbackend: file.This is the Keychain-retirement half of #5632, without the worker-model changes. Do not merge #5632 while its tests are red.
No-Issue: Keychain ACL prompt on unsigned rebuilds; extracted from #5632 without closing that PR
Testing
cargo test -p codewhale-secrets --locked session_secrets_use_the_file_store_not_keychain./scripts/release/check-versions.shChecklist