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 08E1BD358 for ; Wed, 20 Jun 2012 20:35:00 +0000 (UTC) Received: (qmail 4622 invoked by uid 500); 20 Jun 2012 20:34:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 4580 invoked by uid 500); 20 Jun 2012 20:34:54 -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 4236 invoked by uid 99); 20 Jun 2012 20:34:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 20:34:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dave@muse.net.nz designates 209.85.220.180 as permitted sender) Received: from [209.85.220.180] (HELO mail-vc0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 20:34:44 +0000 Received: by vcbfk26 with SMTP id fk26so4874616vcb.11 for ; Wed, 20 Jun 2012 13:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muse.net.nz; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=xDV0yunvINg7uqWM5x8zCBoobdnzWdTGDAdF4/QC3fI=; b=Jss4PaSz7i1AWENwVUJXJ75W9BoW6n7p7Fc+X9y+2Hx4o9TfIH/t1181jks1m17ZS3 TptLwb9hdJ2QknqdD0hIO2bxBJaZnYWtNr8gJZ2xqDzKH/FliA513amt+AvpWgJLQSmy WkcidbpSdDPUUlQCbXO5rSl6o4UoInJYJRBww= 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=xDV0yunvINg7uqWM5x8zCBoobdnzWdTGDAdF4/QC3fI=; b=gLUdjQNhgNRoVh2RImty0CJyW971MF/j7Rt041l8BGPV3Rk3qdBCovETYo4LKgFZ16 CeNsyx8OPnFjaUDZz7VCc3zizC1LI9bE0FiOxJRpxhvK4aWUMmnYwiU8QP7HU1wySy0q 1bdhux9pP/HiOAe9MhitiEaJOboq7eoGoBF6ocpnWiCna/vBBwQaXEVFsAKhXQZsio58 /oIwgEb0YMXY8n+K82iWPJ1LgZbQ7wplmn5tEuJaWEpw/JNRsRlMSoEIWfvjpTBE4s1W q0AAQnANmjmGtMlJiOBDkZQmmHTgvPz6/9U6OuKaML09uqO0kCTjVlAzSXkqHAa1fpPG KU0Q== MIME-Version: 1.0 Received: by 10.52.70.242 with SMTP id p18mr9886735vdu.97.1340224463489; Wed, 20 Jun 2012 13:34:23 -0700 (PDT) Received: by 10.52.33.172 with HTTP; Wed, 20 Jun 2012 13:34:23 -0700 (PDT) X-Originating-IP: [84.112.19.176] In-Reply-To: References: Date: Wed, 20 Jun 2012 22:34:23 +0200 Message-ID: Subject: Re: Replication and validate_doc_field From: Dave Cottlehuber To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlSONsUulr4CZY5inyq59Y3zyRuga4vRUlOxDIusNIDmgZaxErzFRoRFxQSNF6paO/H/Vg9 On 20 June 2012 22:22, Pulkit Singhal wrote: > Does validate_doc_field method affect replication authN or authZ for > CouchDB 1.2.0? Hey Pulkit, I googled authN/Z and found authorisation and authentication. I checked the source and there's no validate_doc_field. A validate_doc_update function (VDU) is run on a single doc only, and has access to the proposed new doc as well as the current on-disk version, and the user context. So you can tell if the submitter of the update is authenticated or not, and you can use couchdb roles, or other custom javascript fields in your doc to decide to reject the docs or not. There's more info on both the wiki and the definitive guide on this too. A+ Dave