feat(client): support org.freedesktop.secrets for key unlock passphrases #182

Open
opened 2026-09-14 22:12:38 +00:00 by treadful · 2 comments
Owner

Would be nice to not have to enter in key decryption passphrases multiple times per session. Or at least not within N minutes of a successful unlock.

Here's some references to get started:

Things to consider:

  • If expiration makes sense (e.g. force user to use decrypt passphrase at least every 15 minutes)
  • How long do secrets stay stored? Is it only for the user session?
  • Can other programs access the secrets stored by jot-client? Does that actually matter?
  • If so, would encrypting the passphrase with a jot secret key before storing make sense?
  • Should this feature be opt-in or opt-out?
  • Are freedesktop protocols supported on MacOS?
  • Should Windows (currently unsupported) be considered in the design? Maybe look for multi-platform libraries that already exist.
Would be nice to not have to enter in key decryption passphrases multiple times per session. Or at least not within N minutes of a successful unlock. Here's some references to get started: - https://specifications.freedesktop.org/secret-service/latest/ch01.html - https://wiki.archlinux.org/title/Oo7 - https://github.com/linux-credentials/oo7/tree/main/client - https://wiki.archlinux.org/title/GNOME/Keyring - https://world.pages.gitlab.gnome.org/Rust/libsecret-rs/libsecret/ Things to consider: - If expiration makes sense (e.g. force user to use decrypt passphrase at least every 15 minutes) - How long do secrets stay stored? Is it only for the user session? - Can other programs access the secrets stored by jot-client? Does that actually matter? - If so, would encrypting the passphrase with a jot secret key before storing make sense? - Should this feature be opt-in or opt-out? - Are freedesktop protocols supported on MacOS? - Should Windows (currently unsupported) be considered in the design? Maybe look for multi-platform libraries that already exist.
Author
Owner

Can other programs access the secrets stored by jot-client? Does that actually matter?

Yes, and maybe.

https://wiki.archlinux.org/title/GNOME/Keyring#Protection_against_malicious_application

The security model says that untrusted applications should not be given access to the keyring by the user. So it depends on the user not blindly typing in their unlock passphrase, I guess. For jot, this may be good enough, just let users opt-out if they require stronger security.

> Can other programs access the secrets stored by jot-client? Does that actually matter? Yes, and maybe. https://wiki.archlinux.org/title/GNOME/Keyring#Protection_against_malicious_application The security model says that untrusted applications should not be given access to the keyring by the user. So it depends on the user not blindly typing in their unlock passphrase, I guess. For jot, this may be good enough, just let users opt-out if they require stronger security.
Author
Owner

Some other Rust options:

keyring-rs can be platform independent. Should consider going that route for future multi-platform support.

Some other Rust options: - https://github.com/open-source-cooperative/keyring-core - https://github.com/open-source-cooperative/keyring-rs/wiki/Keyring - https://github.com/open-source-cooperative/secret-service-rs keyring-rs can be platform independent. Should consider going that route for future multi-platform support.
Sign in to join this conversation.
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
treadful/jot#182
No description provided.