DEV Community

Discussion on: Switching to KeePass and Syncthing for password management

Collapse
 
tvmanus profile image
tvmanus

I've been using KeePass with GDrive sync and Ybikey for a while, so this proposed setup is a nice option. I would also clarify the root cause of the simultaneous editing issue. The KeePass file is handled in the local application and encrypted by itself, which means that external sync process has no way to know how to merge two versions.
Multi-user KeePass uses file system locking mechanism, only the first user would be able to edit the file, while all other users would be able to open the database in read-only mode. There is a mechanism of triggers built into KeePass, would be nice to make use of them in order to resolve conflicts and merge databases automatically, I have no idea how, but maybe someone can share good ideas.

The advantage of the sync method is that the user can have all the passwords locally and offline. For example I use a lot of encrypted files with unique passwords and being unable to access them while not connected to some kind of online (even self-hosted) password manager would be a big downside.

Collapse
 
rusty_sys_dev profile image
Scott

Thanks for your comment!

True, I suppose the encryption would hinder the merge process, although that gave me an idea! You mentioned the KeePass Triggers/API, I wonder if those could be used in order to produce a custom merge plugin for Syncthing (if such a thing exists) that could diff the KeePass DB file after unlocking it via some kind of initialized authentication.

For example, when you login to your account on your OS (start Syncthing on android) systemctl startup command brings up an authentication window to input your KeePass DB password. Upon entering the password it will have the ability to merge changes when a new version comes from Syncthing.

I have some searching to do!