Bug 458774

Summary: KWallet/Secret Service: `default` alias should default to the 1st collection
Product: [Frameworks and Libraries] frameworks-kwallet Reporter: michaelk83 <mk.mateng>
Component: generalAssignee: Valentin Rusu <valir>
Status: REPORTED ---    
Severity: wishlist CC: kdelibs-bugs
Priority: NOR    
Version: 5.97.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=458776
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description michaelk83 2022-09-06 06:21:07 UTC
SUMMARY
If a default wallet has not been set manually, it defaults to the 1st wallet. But via Secret Service API, there is no `default` alias in this case. It should default to the collection matching the default wallet name.

STEPS TO REPRODUCE
1. On a fresh install such as KDE Neon live DVD, copy a wallet from backup (or from another KDE installation) into `~/.local/share/kwalletd`.
2. Adjust the user/permissions as needed to make the wallet readable by the current user.
3. Launch KWalletManager and enable the KDE Wallet system.
4. Run `qdbus org.freedesktop.secrets`
5. In KWalletManager, open Settings -> Configure Wallet... (don't make any changes)

OBSERVED RESULT
- The wallet is listed as `/org/freedesktop/secrets/collection/<name-of-wallet>`
- In the settings, "Select wallet to use as default" defaults to the 1st wallet.
- There is no `/org/freedesktop/secrets/aliases/default` alias.

EXPECTED RESULT
- `/org/freedesktop/secrets/aliases/default` should exist by default if there are any collections (wallets) available, and should match the default (pre)selection of the "Select wallet to use as default" setting.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon User 20220825-0951 live DVD
KDE Frameworks Version: 5.97.0
KWalletManager: 22.08.0
KDE Plasma Version: 5.25.4
Qt Version: 5.15.5

ADDITIONAL INFORMATION
`/org/freedesktop/secrets/aliases/default` is created after restarting `kwalletd5` (and KWalletManager?).
Comment 1 michaelk83 2022-09-06 06:57:38 UTC
Related to Bug 458776.