Bug 403648 - Prevent overwrite local changes of kdewallet.kwl file via KWalletManager service for solve password sync problems
Summary: Prevent overwrite local changes of kdewallet.kwl file via KWalletManager serv...
Status: CONFIRMED
Alias: None
Product: kwalletmanager
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Valentin Rusu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-27 07:33 UTC by Murz
Modified: 2019-12-29 14:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Murz 2019-01-27 07:33:17 UTC
Many KDE users want to sync his KDE Wallet password storage between several computers! This feature is planned natively via ksecretsservice and secretsync, but seems it development is stopped.

So now only one way to sync passwords is manually sync kdewallet.kwl file via some sync program (Rsync, Syncthing, NextCloud, Google Drive, etc).

It works very well when only one computer is online, but other is turned off. But if two computes are online, any change on one computer owerwrite all changes on other computer.

And if we try to setup new empty KDE account and configure sync after KDE is loaded, kwallet will overwrite all your password database to empty file!!! 

Now we can easily solve this sync problem via listen local changes in kdewallet.kwl file and reload it on demand, immediately when changes are detected. 

Can any of developers investigate this and describe how hard to implement listening file changes and reload kwallet database on every change? Thanks!
Comment 1 Murz 2019-01-30 16:25:00 UTC
For current workaround to this problem, maybe exists some command to kwallet that will force reload kwl file from command line?

Via it users will can write script, that listen kdewallet.kwl file changes via inotify and send signal kwallet to force reload kdewallet.kwl file (close and open wallet).
Comment 2 Murz 2019-01-30 16:30:59 UTC
There are exists commands to close and open:
$ qdbus org.kde.kwalletd /modules/kwalletd org.kde.KWallet.closeAllWallets
$ qdbus org.kde.kwalletd /modules/kwalletd org.kde.KWallet.open

but they always re-ask password from user each time.

Can you implement something like:
$ qdbus org.kde.kwalletd /modules/kwalletd org.kde.KWallet.reloadAllWallets
?
Comment 3 Murz 2019-02-04 06:51:33 UTC
As example, KeePassXC have good support for cloud syncing password database file: https://keepassxc.org/docs/#faq-cloudsync
Comment 4 Murz 2019-02-04 08:57:31 UTC
I have found
method Q_NOREPLY void org.kde.KWallet.sync(int handle, QString appid)
- can anybody describe what it do?
Comment 5 Vaso 2019-12-29 14:25:44 UTC
*** This bug has been confirmed by popular vote. ***