Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AEB649B05 for ; Tue, 1 May 2012 13:32:10 +0000 (UTC) Received: (qmail 15154 invoked by uid 500); 1 May 2012 13:32:10 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 15111 invoked by uid 500); 1 May 2012 13:32:10 -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 15102 invoked by uid 99); 1 May 2012 13:32:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2012 13:32:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2012 13:32:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F2319429F64 for ; Tue, 1 May 2012 13:31:48 +0000 (UTC) Date: Tue, 1 May 2012 13:31:48 +0000 (UTC) From: =?utf-8?Q?St=C3=A9phane_Alnet_=28JIRA=29?= To: dev@couchdb.apache.org Message-ID: <1264593881.13148.1335879109027.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (COUCHDB-1475) _users design documents access MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org St=C3=A9phane Alnet created COUCHDB-1475: --------------------------------------- Summary: _users design documents access Key: COUCHDB-1475 URL: https://issues.apache.org/jira/browse/COUCHDB-1475 Project: CouchDB Issue Type: Question Components: Database Core Affects Versions: 1.2 Environment: Debian/testing Reporter: St=C3=A9phane Alnet Priority: Minor Sorry I'm coming in late on this topic, I found this while testing my exist= ing code against 1.2.0. The comments for commit e5503ffef957dc5e8784c7223e318738ae79b6df indicate f= or `after_doc_read`: If the doc is a design doc and the userCtx doesn't identify an admin or db-admin: -> 403 // Forbidden This breaks the (previously working) case where access to the _users databa= se is restricted using a "members" security property, and authorized users = could use a couchapp found in the _users database to manager user records. (These power-users would have, say, "user_manager_ro" and "user_manager_rw"= roles assigned to them, with the ro/rw aspect handled by a specific valida= te_doc_udpate() which would be part of the couchapp; the roles were entered= in the _users' database members.roles security field.) Pointing me back to a discussion explaining the background for this new beh= avior would be sufficient, if it is effectively a desirable side-effect and= things will remain as they are. Otherwise it seems a finer-grained logic f= or after_doc_read() would be able to restore the desired result, along the = lines of: If the doc is a design doc and (there are no security members.rol= es and no members.names) and (the userCtx doesn't identify an admin or db-admin) -> 403 // Forbidden Thanks, S. PS: Overall I'm surprised the changes in that commit used new Erlang code r= ather than suggesting best-practices using the exisiting security features.= I don't understand how hiding the design documents enhances security ("sec= urity by obscurity"), but that's beyond what I'm asking here. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira