Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 56551 invoked from network); 7 Sep 2010 12:52:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Sep 2010 12:52:02 -0000 Received: (qmail 84184 invoked by uid 500); 7 Sep 2010 12:52:01 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 83658 invoked by uid 500); 7 Sep 2010 12:51:57 -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 83649 invoked by uid 99); 7 Sep 2010 12:51:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Sep 2010 12:51:56 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of james.jackson@cern.ch designates 137.138.144.179 as permitted sender) Received: from [137.138.144.179] (HELO CERNMX31.cern.ch) (137.138.144.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Sep 2010 12:51:46 +0000 Received: from CERNFE22.cern.ch (137.138.144.151) by cernmxgwlb2.cern.ch (137.138.144.179) with Microsoft SMTP Server (TLS) id 14.1.218.12; Tue, 7 Sep 2010 14:51:26 +0200 Received: from hepmbp3.home (81.154.98.136) by smtp.cern.ch (137.138.144.172) with Microsoft SMTP Server (TLS) id 14.0.702.0; Tue, 7 Sep 2010 14:51:25 +0200 From: James Jackson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Using multiple auth handlers Date: Tue, 7 Sep 2010 13:51:24 +0100 Message-ID: To: MIME-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) Keywords: CERN SpamKiller Note: -50 X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I'm just writing some custom auth handlers for a CouchDB cluster we are = setting up. To do what we need to do, in the security context we = require, I need to run two such custom handlers. I believe that I should = be able to do this with the following syntax: [httpd] authentication_handlers =3D {couch_cms_auth, = cms_backend_authentication_handler},{couch_cms_auth, = cms_host_authentication_hander} Now, each of these handlers on their own work just fine, but I have = problems when attempting to use both. My understanding is that if one = throws an unauthorized exception, then the next handler in the list = should be tried. However, I see a throw in the first handler kill the = request there and then with a 401, without trying the second handler. Have I misunderstood this behaviour, or do I need to modify how I write = my custom handlers so they behave with each other? Best regards, James Jackson.=