Skip to content

SecretService KWallet backwards compatibility #730

@Steve-Tech

Description

@Steve-Tech

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'.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions