607011 / Qt-SESAM

c't SESAM Password Manager (Qt version)
http://607011.github.io/Qt-SESAM/
GNU General Public License v3.0
77 stars 29 forks source link

Add a module and interface to synchronise with (a file in) ownCloud #52

Closed Wikinaut closed 9 years ago

Wikinaut commented 9 years ago

I suggest to add a module and interface to synchronise with (a file in) ownCloud https://github.com/owncloud/core , i.e. on one's own cloud server.

607011 commented 9 years ago

@Wikinaut Can you please specify what exactly should happen? E.g. through which interfaces should be synchronised?

dragotin commented 9 years ago

I looked into this already. I will continue on this if that is wanted.

@ola-ct I have a couple of questions tough: Any reason that the code does a POST request to fetch the file from the server? Shouldn't that rather be a get? see https://github.com/ola-ct/Qt-SESAM/blob/master/Qt-SESAM/mainwindow.cpp#L1311

How is it supposed to work if there is no file on the server yet? Currently I think the code bails out. I think it should just upload them.

How about conflict resolution? Ie. if both the file on client has changed, as well as the one on the server?

Wikinaut commented 9 years ago

Ad-hoc solution without the need to code something new:

In the QTSesam GUI `"Extras > Options..."`` window use a "Sync file" (do not use a "Sync server") and choose a local Sync file name in a location on your local machine which is synchronized via an ownCloud client on the local machine.

Example for LINUX: ~/ownCloud/somedirectory/QtSESAM.bin.

Solves the issue without extra coding. Be aware of some sync delays due to the independent ownCloud sync schedule which syncs, for example, every 30 or 60 seconds.

607011 commented 9 years ago

@dragotin The code you referenced is for syncing with a specialized c't SESAM sync server. The reason behind POST instead of GET is simple: I wanted to maintain consistency across all HTTP requests. At least one requires POST, so all of them are POSTs ;-)

No files are fetched but JSON data exchanged. The will be an article on how this works in one of the forthcoming c't issues.

607011 commented 9 years ago

@Wikinaut This is not some ad-hoc solution, this is the solution as described in the c't article ;-)

dragotin commented 9 years ago

Hmm. The solution with the local file that is synced is working of course. But, tbh, I think this nice project will be much more successful if it's really easy to use. Requiring a working ownCloud sync connection, plus setting the correct path, will be too much for normal users I fear.

And we really can do better. We can automatically save a file containing the data on ownCloud.

@ola-ct Are you telling me that the exchange of the JSON data happens through some active code on the c't Sesam server, rather than through a simple file storage? What's the reasoning behind that?

Wikinaut commented 9 years ago

@ola-ct do you mean section "Synchronisieren" c't 2015/20 S. 184 ? After having installed the program, I was puzzled with lower part of the sync window, where "Sync Server" settings can be set.

Perhaps there should be made a more apparent distinction between "Sync File" and "Sync Server" (Sync File => "local sync file (which may be synchronised with a clowd)".

But not so very important.

Wikinaut commented 9 years ago

@dragotin: yes, this was my intention. If possible, NO owncloud client on the local machine, only a file or special file and additional code (app, if needed) on the owncloud server.

dragotin commented 9 years ago

@Wikinaut yes, that was what I was already trying and that's not far away.

607011 commented 9 years ago

@dragotin c't SESAM doesn't require ownCloud. You can use any cloud storage you like to synchronise your settings via a file. I've successfully tested it with Dropbox, Google Drive and Microsoft OneDrive.

@dragotin @Wikinaut However, some people don't want to share their data, especially passwords (even if they are well encrypted), with a cloud storage provider. So I thought it would be nice to synchronise via a specialized sync server that is completely under your own control. The c't SESAM server allows you to provide one central sync facility for many people, e.g. your family and friends. A future c't magazine article will dive into that matter.