Skip to content

Navigation Menu

Sign in
Sign up

fix(desktop): store Windows secrets per credential - #7416

Open
KKandFRIENDS wants to merge 1 commit into
block:main from
KKandFRIENDS:codex/windows-per-key-secret-store
Open

fix(desktop): store Windows secrets per credential #7416
KKandFRIENDS wants to merge 1 commit into
block:main from
KKandFRIENDS:codex/windows-per-key-secret-store

Conversation

@KKandFRIENDS

@KKandFRIENDS KKandFRIENDS commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • store each Windows secret in its own Credential Manager entry instead of one aggregate JSON blob
  • verify every direct write with a fresh OS read before callers can remove inline fallback
  • migrate legacy aggregate entries safely, make direct entries authoritative, and remove stale aggregate copies only after verified persistence
  • extend reset/sign-out to discover, delete, and verify all known managed-agent credentials
  • serialize Windows Credential Manager access to avoid concurrent read/write verification failures

Problem

Windows Credential Manager limits a credential blob to 2,560 bytes. Aggregating many managed-agent nsec values into one JSON credential exceeds that limit and forces secrets to remain inline.

Safety properties

  • backend, write, read-back, or legacy-cleanup failure keeps the managed-agent inline fallback
  • new Windows values are never added to the aggregate blob
  • direct entries override legacy values
  • deleting one direct credential preserves the others
  • reset captures known agent credential names before app data is renamed and verifies their absence before completion
  • macOS and Linux retain the aggregate-blob implementation

Test plan

  • cargo fmt --manifest-path desktop/src-tauri/Cargo.toml -- --check
  • cargo check --manifest-path desktop/src-tauri/Cargo.toml
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml --lib — 3,010 passed, 0 failed, 19 ignored
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml windows_ -- --ignored — 4 Windows Credential Manager tests passed
  • repeated the parallel Windows group 10 consecutive times after reproducing a pre-fix concurrent read-back failure

The Windows integration coverage includes 40 independently stored nsec-shaped values, legacy migration, stale-legacy cleanup, delete-one isolation, and full-reset deletion.

Signed-off-by: Kiseok Kim <kim.kiseok.1969@gmail.com>
KKandFRIENDS requested a review from a team as a code owner September 6, 2026 11:18

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 3c7f288c60d67df78577b237e27c3dfc8831aaa1...5d43ee6ae177f1c77a6db1ac592847f74ba2a420.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 5d43ee6ae177f1c77a6db1ac592847f74ba2a420 to authorize a new review.
Any previous review applies only to its recorded range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /