Bug 459289

Summary: KWallet/Secret Service: items lost if `kwalletd5` dies.
Product: [Frameworks and Libraries] frameworks-kwallet Reporter: michaelk83 <mk.mateng>
Component: generalAssignee: Valentin Rusu <valir>
Status: REPORTED ---    
Severity: major CC: kdelibs-bugs
Priority: NOR    
Version: 5.98.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 458318    

Description michaelk83 2022-09-17 16:04:41 UTC
KWallet Secret Service API does not persist new items to the wallet. If the daemon dies, the items are lost.

1. Set up KWallet with Secret Service integration, install Seahorse and secret-tool.
2. Create a default wallet (I used a blowfish wallet).
3. Run `echo -n 'mypass' | secret-tool store --label=testfdo attr1 val1` in a terminal.
4. Inspect the wallet in KWalletManager and in Seahorse, run `secret-tool lookup attr1 val1`.
5. Restart `kwalletd5` (send signal USR1).
6. Unlock the wallet via Seahorse (see Bug 459287 why KWalletManager won't do here).
7. Repeat step 4.

4. The new item shows up (KWalletManager may need a restart to show it).
5. (The wallet is locked)
6. (The wallet is unlocked, KWalletManager may need a restart to show it.)
7. The new item is gone.

4. The new item shows up.
7. The new item is still there.

Linux/KDE Plasma: KDE Neon User 20220825-0951 live DVD
(after updating Qt libraries and KWallet)
KDE Frameworks Version: 5.98.0
KWalletManager: 22.08.1
Seahorse: 3.36-1
libsecret: 0.20.4
libsecret-tools: 0.20.4
KDE Plasma Version: 5.25.4
Qt Version: 5.15.5

Currently QtKeyChain still prefers the `org.kde.kwalletd5` API if it's available, so this is unlikely to affect most KDE apps just yet. But this needs to be addressed before the switch to Secret Service API is made.