couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nebu Pookins <nebupook...@gmail.com>
Subject Re: Question about validator functions and replication
Date Mon, 28 Mar 2011 15:38:29 GMT
On Sat, Mar 26, 2011 at 8:42 AM, Patrick Barnes <mrtrick@gmail.com> wrote:
>> 1) Alice and Bob are friends, and Alice lent her laptop to Bob so that
>> he could do some offline blogging too.
>
> If 'Bob' wants to do some blogging, he *really* should be required to input
> his own credentials to push any of _his_ modifications back to the central
> server.

In theory, you can have a solution where Bob does input his
credentials at some point, but not necessarily exactly when his
changes are getting pushed to the central server. For example, he
could sign his changes, at one date, and then several days later, the
replication occurs and the server verifies the signature. I'm just
unsure of the feasibility of implementing this solution in CouchDB in
practice.

> As I understand it, you have a central server 'C' with a couchdb database,
> and users 'A' and 'B', each of whom have a local copy of C's database.

Your understanding of this example is correct, though I feel I should
now mention I'd like for any solution to also work in a
"decentralized" mode. It'd be a nice-to-have, but if it turns out to
be impossible (I doubt it's impossible, though), I'm also interested
in hearing solutions which depend on a centralized server.

[...]
> A: Users can have a different set of roles on different servers. So on 'C',
> Alice is probably an ordinary user, but on 'A' Alice can have admin
> permissions - the design doc on the target db can check the user roles and
> differentiate.

Thanks, I was worried about this point, but you've clarified to me
that it is possible for users to have different roles on different
instances of CouchDB despite replication.

> If you have some secure data floating around in your db, encryption can
> still be a good idea. Parts of one of my databases are encrypted, because
> users need to be able to see some documents in the db but not others.

I'm curious as how you've implemented encryption in your DB. Was it
pure JavaScript, or did you use native libraries? Elsewhere in this
thread, I've started a new "branch" where I've started outlining my
concerns with a pure JavaScript solution and wondered if cryptography
could be included as a core feature of CouchDB.

> Finally, you can also look at filtered replication, so - *as well as*
> restricting which documents can be replicated back to the central db 'C' by
> whom - you can limit replication pushes to only those docs that should pass
> validation.

Yeah, filtered replication is always in the back of my mind, but it
seems like the requirements for my problem are such that there's going
to be a lot of collaboration amongst the users; the real problem isn't
as simple as just a set of blog posts.

> Hope that helps,
> -Patrick

You've been a great help, thank you.
- Nebu

Mime
View raw message