xi-keyring

simple and extensible alternative for gnome-keyring
git clone https://git.ce9e.org/xi-keyring.git

commit
9b32cb44697f20a29d8bfb1375daab7d57352b68
parent
f10605b29beae7f6d42c8c627b90dc05a0387f17
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2026-05-24 10:03
breaking: store secrets portal app_id in attributes

Diffstat

M xikeyring/dbus.py 11 +++++++----

1 files changed, 7 insertions, 4 deletions


diff --git a/xikeyring/dbus.py b/xikeyring/dbus.py

@@ -382,13 +382,16 @@ class DBusService(BaseDBusService):
  382   382         try:
  383   383             if self.get_app_id(conn, sender):
  384   384                 raise AccessDeniedError
  385    -1             attrs = {'application': 'org.freedesktop.portal.Secret'}
  386    -1             ids = self.keyring.search_items(app_id, attrs)
   -1   385             attrs = {
   -1   386                 'application': 'org.freedesktop.portal.Secret',
   -1   387                 'app_id': app_id,
   -1   388             }
   -1   389             ids = self.keyring.search_items('', attrs)
  387   390             if ids:
  388    -1                 secret = self.keyring.get_secret(app_id, ids[0])
   -1   391                 secret = self.keyring.get_secret('', ids[0])
  389   392             else:
  390   393                 secret = os.urandom(64)
  391    -1                 self.keyring.create_item(app_id, attrs, secret)
   -1   394                 self.keyring.create_item('', attrs, secret)
  392   395             os.write(fd, secret)
  393   396             os.close(fd)
  394   397         finally: