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 2AB80102D9 for ; Fri, 27 Feb 2015 19:47:11 +0000 (UTC) Received: (qmail 46374 invoked by uid 500); 27 Feb 2015 19:47:05 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 46317 invoked by uid 500); 27 Feb 2015 19:47:05 -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 46306 invoked by uid 99); 27 Feb 2015 19:47:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2015 19:47:05 +0000 Date: Fri, 27 Feb 2015 19:47:05 +0000 (UTC) From: "Jan Lehnardt (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-2629) Hide internal config details from other applications MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-2629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14340700#comment-14340700 ] Jan Lehnardt commented on COUCHDB-2629: --------------------------------------- +1 > Hide internal config details from other applications > ---------------------------------------------------- > > Key: COUCHDB-2629 > URL: https://issues.apache.org/jira/browse/COUCHDB-2629 > Project: CouchDB > Issue Type: Bug > Security Level: public(Regular issues) > Components: Database Core > Reporter: Russell Branca > > Throughout the code base we do things like `config:get("couch_httpd_auth", "authentication_db", "_users")` which exposes internal details to other applications that don't need to be aware of the particulars. This duplicates code unnecessarily and causes problematic typos to go unnoticed like in COUCHDB-2628. > One possible approach that I'm a fan of is to go into the application responsible for relevant config value, and add a function to hide the details. For instance, this is done in `cassim_metadata_cache:metadata_db`: https://github.com/apache/couchdb-cassim/blob/windsor-merge/src/cassim_metadata_cache.erl#L58-L59 -- This message was sent by Atlassian JIRA (v6.3.4#6332)