Repository navigation
Conversation
Enumerating a collection and matching the label exactly missed keys: a GNOME keyring listing stale item paths aborted the whole read, and KWallet labels entries "<X> Keys/<X> Safe Storage". Use SearchItems (live items only) and match the label by suffix.
A locked wallet now reports "locked" instead of "not found", every D-Bus call (label read, session close) is bounded by the timeout, and the lookup also searches by KWallet's user attribute so it no longer depends on the xdg:schema label. The label match is a tested pure func.
moonD4rk
force-pushed
the
fix/linux-secret-service-lookup
branch
from
November 18, 2026 09:23
f683048 to
fd9f3b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Linux v11 master-key retrieval on GNOME and KDE. Refs #572, #161 (not fully resolved here — see note).
Stacked on #704 (base
feat/firefox-primary-password); GitHub retargets tomainas the stack merges.Problem
The Secret Service lookup enumerated a collection's items and matched the label exactly:
<X> Keys/<X> Safe Storage, so an exact match misses them.Fix
Rewrite
dbusRetrieveron godbus directly and drop thego-dbus-keyringdependency:SearchItemsby libsecret's schema (GNOME), KWallet's schema, and KWallet'suserattribute (the entry name), so the lookup does not depend on the schema label KWallet sets./-suffix, reading items one by one so a stale path is skipped.keyring or wallet is lockedinstead ofnot found.Validated on real desktops (seeded fake data, author's VM, wallet open)
ok.ok.The follow-up commit (locked error,
userquery, bounded calls) is unit-tested and checked against KWallet's ksecretd source, but not yet re-run on the VM.Follow-ups
#161's environment (Ubuntu 22.04 + kdewallet5) has no Secret Service at all, so it needs native KWallet over D-Bus (3b). Refs #572, #161 — kept open for that.
Test
go test ./...+ linuxmasterkeytests (incl. the label-match table) +golangci-lintclean;go mod tidykeptgo 1.20.