Skip to content

Keychain password storage and selectable window frame styles - #37

Merged
jhd3197 merged 5 commits into
jhd3197:devfrom
EdiBianco:keychain-window-frames
Oct 13, 2026
Merged

jhd3197 merged 5 commits into
jhd3197:devfrom
EdiBianco:keychain-window-frames

Conversation

@EdiBianco

Copy link
Copy Markdown

Keychain storage for saved passwords and key passphrases (security)

  • New setting in Settings → Connections: "Store passwords and key passphrases in the OS keychain".
  • Saved connection passwords (SSH, FTP/FTPS, S3, Azure) and SSH key passphrases move out of profiles.json into the OS keychain (macOS Keychain, Windows Credential Manager, Linux keyutils). The file keeps no secret.
  • Turning the setting on or off moves the existing secrets in both directions. Writes are ordered so a secret is never dropped: the keychain is written before the file on, and the file is written before the keychain is cleared on off.
  • Keychain entries are recorded in the faro.db manifest, so encrypted backups still include them.
  • Fresh installs (no profiles.json yet) start with the keychain on. Existing installs keep their current plain-text file until the toggle is changed.
  • If the keychain refuses a read at launch, the app still starts. A warning names the affected profiles, and their keychain entries are never overwritten or deleted until restart. Turning the setting off is refused while any secret is unreadable.
  • faro-cli honours the same setting.

Window frame styles (UI)

  • New Settings → Appearance → Window frame switch: Windows (default, unchanged), macOS (traffic lights on the left, glyphs shown on hover), Linux (small rounded headerbar buttons on the right).
  • Look only. Window behaviour is identical in all three.
  • Pop-out terminal windows keep their existing title bar.

Testing

  • cargo test -p faro --lib: 270 passed, 27 ignored. The ignored keychain round-trip test touches the real OS keychain, so it stays opt-in.
  • New unit tests cover: password and passphrase stripped from profiles.json in keychain mode, purpose mapping for each auth kind, and the install-age default.
  • npx tsc --noEmit: clean.
  • Frame styles and the keychain toggle were checked in the browser mock build.

Not yet verified

  • Keychain path on Windows and Linux. Only macOS was exercised end to end.
  • Behaviour on a real Tauri window for the frame styles (checked in the mock build only).

Review notes

  • Existing plain-text passwords are not moved automatically on upgrade. Toggling the setting migrates them.
  • Passphrases were already plain text in profiles.json and are now covered by the same setting.

Edi Bianco added 5 commits October 13, 2026 19:03
Saved SSH/FTP/S3 passwords sat in plaintext in profiles.json. A new
"Store passwords in the OS keychain" toggle (Settings → Connections)
moves them into Keychain / Credential Manager under
`profile-password:<id>`; the file keeps only the rest of the profile.

- Toggling moves existing passwords both ways, writing the file before
  deleting keychain entries (or after writing entries) so a failure
  never drops a password.
- Keychain writes are recorded in the faro.db manifest so the encrypted
  backup still carries them.
- Setting persists in faro.db; the profile store reads it at launch and
  the CLI honours it too.
The custom title bar always drew Windows-style controls on the right.
Settings → Appearance → Window frame now picks the layout:

- Windows (default, unchanged): flush full-height buttons on the right.
- macOS: close / minimize / zoom traffic lights on the left, glyphs
  appear on hover.
- Linux: small rounded headerbar buttons on the right.

Look-only; the window behaves the same in all three. Pop-out terminal
windows keep their own title bar.
- SSH key passphrases join saved passwords in the keychain (purpose
  `profile-passphrase:<id>`); the setting now covers both.
- A keychain read failure at launch no longer aborts startup. The
  affected profiles load without their secret, the app shows a warning
  naming them, and their keychain entry is never written or deleted
  until restart.
- Turning the setting off is refused while any secret is unreadable, so
  a failed read can't be written back to the file empty and then lost.
With no saved setting, a fresh install (no profiles.json yet) starts with
saved passwords in the keychain. Existing installs keep plain text, so
nothing moves out of profiles.json without an explicit toggle. The
resolved value is written back to faro.db so the UI and backend agree.
@jhd3197
jhd3197 merged commit 9b9f3ae into jhd3197:dev Oct 13, 2026
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.

2 participants