Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 6177 invoked from network); 1 Nov 2009 21:25:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Nov 2009 21:25:45 -0000 Received: (qmail 82252 invoked by uid 500); 1 Nov 2009 21:25:45 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 82150 invoked by uid 500); 1 Nov 2009 21:25:45 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 82140 invoked by uid 99); 1 Nov 2009 21:25:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 21:25:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bchesneau@gmail.com designates 209.85.160.56 as permitted sender) Received: from [209.85.160.56] (HELO mail-pw0-f56.google.com) (209.85.160.56) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Nov 2009 21:25:36 +0000 Received: by pwi18 with SMTP id 18so1680610pwi.35 for ; Sun, 01 Nov 2009 13:25:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=fE8IU4wLWoIt9PCfb31WdpdjL8j4t79kkUSgekiS9nI=; b=Gg9sPYROkzFWbOosgZLzWjI547qCn7/8e7Ln4L1+iBfE9RFxihaZhqf/H+BrDxa87t 7l+ykHOTMdXs6DQdy2WrgdzRSTpLQTu1/p0YK2b5KvgKlkuIyUX3yGczUBr3bgA9O5/+ xamCkEBMsM8MptBFAcWSniFjCeLacwcRn6y6U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vbxhFDBbSGGVV8jV3bS2OZuVqZb7gHqeN/s9opfbVn7VQEygnEHm2P5zqHiblIbi2D ZICnMPuSxT52+CLxmHU+LEmK+mVX3UlxqyBjmBpV62Ab7EcrJ+OpMXDE1l3KeqRKOEjL cpEyxjQwvdNwtKJDy8MoW02PbRCrnxSTzpGXs= MIME-Version: 1.0 Received: by 10.140.201.1 with SMTP id y1mr232014rvf.119.1257110715557; Sun, 01 Nov 2009 13:25:15 -0800 (PST) In-Reply-To: References: Date: Sun, 1 Nov 2009 22:25:15 +0100 Message-ID: Subject: Re: auth per db - thoughts and question From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Nov 1, 2009 at 7:59 PM, Chris Anderson wrote: > On Sun, Nov 1, 2009 at 3:33 AM, Benoit Chesneau wrote: >> Hi, >> >> I'm working on a authentification per db for couchdb. I failed to find >> a right system actually and trashed my code this morning. Suggested by >> Jan, I post here my thoughts about it. Main goals are : >> >> - Set permission read or write for users on a db > > I think the goal of getting this level of permissions is enough for > one patch. Throwing replication into the mix adds a whole level of > complexity. > > Imagine the user credentials are stored in the "users" db on node A, > and user Bob own db "foo" on node A, while user Alice has read-only > access to "foo" on node A. > > If Alice replicates "foo" to her laptop, Bob doesn't own it there. She > can now make all the edits she wants. However, she won't be able to > replicate them to Bob's "foo", because she can't write there. She can > make a "foo-alice" db and give Bob read access, and he can merge from > there to his "foo" db. A lot like git. I'm agree with this process, this is simple. But still git contain user "signature" with email and sometimes also the gpg signature so you can continue to track access/merge/branching whatever. > > == > > I think if we ignore replication when thinking about node A's > configuration, we'll be much much more successful. Leaving replication > out of the story frees admins to use it how they see fit. > > Imagine that node A is at the office, and they hire 500 people to a > new location, so now they have node A and node B. People in the new > office keep their databases on node B. IT wants to share credentials > and access controls across the two nodes, so they just setup > continuous replication on the users db - and done. > > Chris > > This schema works only in a trusted environment, doesn't it ?. I would like to be able to only share users / db rather than a whole db. A pub/private system would allow it, and also would allow later to have a way to follow documents/users imo. Anyway right step by step, and your schema above allow already the replication if one user allow read access exceot maybe for ddocs maybe. Anyway that may be a feature for 0.11 ? I could work on it quietly. For now I found an alternative to that for my service. - benoit