[PR #2] [MERGED] feat(password): switch to 99designs/keyring with fallback support #3

Closed
opened 2026-03-02 15:50:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pgplex/pgtui/pull/2
Author: @rebelice
Created: 12/19/2025
Status: Merged
Merged: 12/19/2025
Merged by: @rebelice

Base: mainHead: feat/improve-password-storage


📝 Commits (2)

  • ae02dd0 feat(password): switch to 99designs/keyring with fallback support
  • af4d6ea fix: address code review feedback

📊 Changes

8 files changed (+684 additions, -54 deletions)

View changed files

📝 go.mod (+8 -4)
📝 go.sum (+24 -8)
📝 internal/app/app.go (+112 -5)
internal/connection_history/errors.go (+36 -0)
internal/connection_history/machine_id.go (+115 -0)
📝 internal/connection_history/manager.go (+87 -16)
📝 internal/connection_history/password_store.go (+105 -21)
internal/ui/components/password_dialog.go (+197 -0)

📄 Description

  • Replace zalando/go-keyring with 99designs/keyring for better backend support
  • Add platform-specific backend priority:
    • macOS: Keychain → encrypted file
    • Linux: SecretService → KWallet(for KDE) → encrypted file
    • Windows: WinCred → encrypted file
  • Add password dialog for missing passwords (fixes #1)
  • Derive encrypted file password from machine ID + username
  • Improve error handling: show password prompt on read failure

Closes #1

Summary by CodeRabbit

  • New Features

    • Password dialog prompts users to enter missing credentials when connecting to databases.
    • Encrypted file-based fallback for password storage when the system keyring is unavailable.
    • Passwords entered are saved and reused for subsequent connections.
  • Bug Fixes / Reliability

    • Password storage errors are logged as warnings and do not block connection attempts.
  • Enhancements

    • Updated syntax highlighting and related tooling.

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pgplex/pgtui/pull/2 **Author:** [@rebelice](https://github.com/rebelice) **Created:** 12/19/2025 **Status:** ✅ Merged **Merged:** 12/19/2025 **Merged by:** [@rebelice](https://github.com/rebelice) **Base:** `main` ← **Head:** `feat/improve-password-storage` --- ### 📝 Commits (2) - [`ae02dd0`](https://github.com/pgplex/pgtui/commit/ae02dd0d0fe0b06e3a23c5848eb87435bc9d0dc8) feat(password): switch to 99designs/keyring with fallback support - [`af4d6ea`](https://github.com/pgplex/pgtui/commit/af4d6ea1d6a218e783d5dd1e45346738686083a0) fix: address code review feedback ### 📊 Changes **8 files changed** (+684 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+8 -4) 📝 `go.sum` (+24 -8) 📝 `internal/app/app.go` (+112 -5) ➕ `internal/connection_history/errors.go` (+36 -0) ➕ `internal/connection_history/machine_id.go` (+115 -0) 📝 `internal/connection_history/manager.go` (+87 -16) 📝 `internal/connection_history/password_store.go` (+105 -21) ➕ `internal/ui/components/password_dialog.go` (+197 -0) </details> ### 📄 Description - Replace zalando/go-keyring with 99designs/keyring for better backend support - Add platform-specific backend priority: - macOS: Keychain → encrypted file - Linux: SecretService → KWallet(for KDE) → encrypted file - Windows: WinCred → encrypted file - Add password dialog for missing passwords (fixes #1) - Derive encrypted file password from machine ID + username - Improve error handling: show password prompt on read failure Closes #1 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Password dialog prompts users to enter missing credentials when connecting to databases. * Encrypted file-based fallback for password storage when the system keyring is unavailable. * Passwords entered are saved and reused for subsequent connections. * **Bug Fixes / Reliability** * Password storage errors are logged as warnings and do not block connection attempts. * **Enhancements** * Updated syntax highlighting and related tooling. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 15:50:22 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pgtui#3
No description provided.