I use Java PasswordSafe with Dropbox. Whilst I realise it might possible to intergrate with a Dropbox API, a simpler more general solution is to allow the Dropbox daemon to handle reading and writing files to its remote store. This works well for saving using PasswordSafe, but if another node update the password file, then a running PasswordSafe will not know about the change and so you have the risk of a lost update.
I propose that PasswordSafe monitors a file for a change by another actor on the file system and then will re-load file, optionally requesting permission from the user.
I would happy to develop this feature and offer to you as a patch / pull request, etc.
If you'd like this, let's discuss some more
Here's my initial idea of how this feature could be implemented - I've only skimmed the code, so lots could be wrong here. David, please provide your feedback before I sart.
Create a FileWatcher class (could use a library, but avoiding that, roll own)
Class allows the setting or unsetting of a single file to monitor.
Class would support the subscription of N listeners
On init a daemon thread is created that looks for the sole registered file every 5 seconds. On first run, the timestamp of the file is recorded. If on the 2nd+ iteration the file has a more recent time, then subscribers are notified.
In PasswordSafeJFace constructor, setup FileWatcher, set self as a listener
register file with FileWatcher. Consider how failed open should work
markFileChange
if(!isLocked) {
show file changed warning dialog box (on correct thread)
}
dispose of changeFileDialog if necessary
In UnlockDbAction
if(fileChanged)
show file changed warning dialog box
File Changed Warning dialog box needs further thought (aid of Sequence Diagram) to cater for all the scenarios..., e.g. remote change with dirty local change.