I would like to create an application that use CouchDB as distributed database. Each user will work with the local CouchDB replica, and that way will be able to work offline. Each local replica will sync with a central replica, this is not a master replica it just easier for now to use central replica.
Given this design how can I secure both local and central databases?
By secure I mean that a user will have to authenticate with username and password before allow to either read or write to the database.
Off course the more important aspect is securing the central database because anything local can and will be hacked eventually but the central (or remote) database should be more secure. I've read that people suggest putting the CouchDB behind a proxy but how can the replication process authenticate on behalf of the user?
Thank you, Ido.