feat(auth): add D-Bus Secret Service support for Linux keyring#627
Merged
platinummonkey merged 2 commits intoJul 1, 2026
Merged
Conversation
Enable the `sync-secret-service` feature on the `keyring` crate so that on Linux, pup stores OAuth tokens via the org.freedesktop.secrets D-Bus API (e.g. GNOME Keyring, KeePassXC, or any Secret Service provider) instead of the kernel keyutils backend (`linux-native`). Both backends are now enabled: the keyring crate prefers Secret Service when a provider is available and falls back to kernel keyutils otherwise.
This comment has been minimized.
This comment has been minimized.
platinummonkey
approved these changes
Jul 1, 2026
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.
What does this PR do?
Enables the
async-secret-servicefeature on thekeyringcrate so that on Linux, pup stores OAuth tokens via theorg.freedesktop.secretsD-Bus API instead of relying solely on the kernel keyutils backend.Motivation
The D-Bus Secret Service API (
org.freedesktop.secrets) provides persistent, encrypted credential storage backed by providers like GNOME Keyring, KeePassXC, or any compliant daemon. Tokens stored this way survive reboots and system updates.With both backends enabled, the
keyringcrate automatically prefers Secret Service when a provider is available and falls back to kernel keyutils otherwise — no behavior change on systems without a Secret Service daemon.Additional Notes
Three features were added to the
keyringdependency:async-secret-servicecrypto-rustvendoredlibdbus-1-devinstalledBinary size impact: ~2-3 MB increase from statically linked libdbus + zbus dependencies.
Tested on: Ubuntu 24.04 with a
org.freedesktop.secretsdaemon. Confirmed via strace that pup connects to the D-Bus session bus (/run/user/$UID/bus) and performsOpenSession+SearchItemscalls. Falls back cleanly on systems without a Secret Service provider.Checklist
Related Issues
N/A — no existing issue for this. Happy to open one if preferred.