SecretService KWallet backwards compatibility

Open
#730 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend, desktop

Research direction

Start by comparing the keyring.backends.kwallet.DBusKeyring and keyring.backends.SecretService.Keyring entry points, reproducing the two keyring set/get commands from the report. Done means entries created through either KWallet or SecretService can be retrieved through both interfaces, including the differing service and server names.

Written by the indexing model from the issue text.

Description

enhancement help wanted Linux

Describe the bug
KWallet has support for SecretService now, however, KWallet created entries appear to store the service as 'server' in SecretService, while SecretService created entries do not show up at all in the KWallet interface.

For example, this is a KWallet created entry, in GNOME Passwords:
Image

and, here's a Secret Service created entry:
Image

To Reproduce
Steps to reproduce the behavior:

  1. Create an entry using KWallet

    PYTHON_KEYRING_BACKEND=keyring.backends.kwallet.DBusKeyring keyring set example_service example_user
    
  2. Requesting the entry using SecretService doesn't return anything

    PYTHON_KEYRING_BACKEND=keyring.backends.SecretService.Keyring keyring get example_service example_user
    

The opposite also doesn't work.

Expected behavior
I expected get_password to work for both backends when both backends are supplied by KWallet.

Environment

  • OS: Debian Forky
$ pip list | grep keyring
bash: pip: command not found
$ apt list --installed python3-keyring python3-secretstorage
python3-keyring/testing,testing,unstable,unstable,now 25.6.0-3 all [installed,automatic]
python3-secretstorage/testing,testing,unstable,unstable,now 3.4.0-1 all [installed,automatic]
$ keyring --list-backends
keyring.backends.SecretService.Keyring (priority: 5)
keyring.backends.kwallet.DBusKeyring (priority: 5.1)
keyring.backends.kwallet.DBusKeyringKWallet4 (priority: 4.1)
keyring.backends.fail.Keyring (priority: 0)
keyring.backends.libsecret.Keyring (priority: 4.8)
keyring.backends.chainer.ChainerBackend (priority: 10)

Additional context
The ChainerBackend does still work so this isn't an urgent issue, but I still thought it was worth raising to make it known. I believe a possible solution is to query both 'service' and 'server' for SecretService. KWallet will also only show entries with 'server', not 'service'.

Dominant language
Python
Stars
1.5k
Forks
208
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jaraco/keyring

All issues in jaraco/keyring

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.