Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42D96DCB8 for ; Thu, 30 Aug 2012 21:10:19 +0000 (UTC) Received: (qmail 89813 invoked by uid 500); 30 Aug 2012 21:10:17 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 89774 invoked by uid 500); 30 Aug 2012 21:10:17 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 89762 invoked by uid 99); 30 Aug 2012 21:10:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 21:10:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.45] (HELO mail-qa0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 21:10:11 +0000 Received: by qadc10 with SMTP id c10so569811qad.11 for ; Thu, 30 Aug 2012 14:09:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=7UJiPLcUFCb/WZpVXi9TLhVUWKQuQPmGGciCuj80+Xo=; b=cMkL3qI1poZQ00Bs+J9Cr/6iDca9UNcu+wB+Hdk2EJWC2vBqh27aexvFWM3VrMFRbZ Ss9DzA8v/LX8m2F53CT4oHTa9z+sLXk8O3cjMaNgVoWw8MDl0bQnejO+lyT9qh6lT4Uy uR363L7awKhai97JS8r9CdyWs+5nhqrmrCcHLLiFqKoZ2c5MLb/bVfPG2sYM0xac/ILX TRQfhX0so9fT1GI/KbdseoeEKqGpYkG/g2PxKMyS/4rbOciEYQPDRHmeS9/wPjvsVcq/ GZMIgld2QXGi1jj1+VaDRyP5edVg7CbveZRugdZrmEVD/zW4GOcieS+aHBLIeEHHQ1o9 ufwQ== MIME-Version: 1.0 Received: by 10.224.78.199 with SMTP id m7mr14058369qak.28.1346360990091; Thu, 30 Aug 2012 14:09:50 -0700 (PDT) Received: by 10.49.110.74 with HTTP; Thu, 30 Aug 2012 14:09:50 -0700 (PDT) X-Originating-IP: [84.112.19.176] In-Reply-To: <503FCF95.4070908@83864.com> References: <503CA33A.6080305@gmail.com> <503F06B4.8010303@gmail.com> <503F4934.3010007@gmail.com> <503F592D.2000208@gmail.com> <8B6A2452-D9B7-4F1D-80A3-40E5170171DC@sri.com> <503FB309.4050908@83864.com> <503FCF95.4070908@83864.com> Date: Thu, 30 Aug 2012 23:09:50 +0200 Message-ID: Subject: Re: userCtx extra information From: Dave Cottlehuber To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf3074d2fa8dca4f04c88218de X-Gm-Message-State: ALoCoQmxfQqV3hYiqhuI45tLAi3EiDh6eXww7QuqqFVVEzmvJekf47D4tBOTn1dKCT9diTDkY9nb X-Virus-Checked: Checked by ClamAV on apache.org --20cf3074d2fa8dca4f04c88218de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 30 August 2012 22:39, Wendall Cada wrote: > > Like I said there are some features actually missing in couch that >> would ease that. (partial updates and partial fetch). Of course a view >> could be use to see only profile but that would be a hack. >> >> And this is not only about being a db or something alternative. This >> is more about security here. Even in the old world data for >> authentication and profiles are generally separated. For a good >> reason. This isn't generally the same person that have access to them. >> And personnaly I would see a profile linked to a user but not in the >> same doc. >> >> Also I'm pretty sure that the reason people are asking about >> populating this userCtx is because they lack the possibility to query >> internally the db. This can be changed. >> >> - beno=C4=ABt >> >> I agree with this. The reason for wanting to put data there is the lack > of support for doing this through a separate document and being able to > query the db internally for the extended data. Often this data is designe= d > not for security but to control application behavior. User settings, etc. > Currently there isn't a design pattern I can see where this is possible > without fetching extra docs for every request. > > Wendall > Very interesting thread. I think this comes down to 3 key features? #1 ability to store private / per-user data. - e.g. for profiles, custom user settings Today this is only possible in _users db, but that could be extended. #2 efficient access (single API call preferred) to retrieve extended data, during authentication/authorisation. Only possible with the [roles] hack mentioned earlier. Needs to be something resembling ?include_docs=3Dtrue to pull in the linked doc. #3 access to same info (e.g. in validation docs) than is possible today. A+ Dave --20cf3074d2fa8dca4f04c88218de--