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 E740D10732 for ; Thu, 26 Feb 2015 19:44:17 +0000 (UTC) Received: (qmail 30992 invoked by uid 500); 26 Feb 2015 19:44:05 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 30932 invoked by uid 500); 26 Feb 2015 19:44: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 30920 invoked by uid 99); 26 Feb 2015 19:44:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2015 19:44:04 +0000 Date: Thu, 26 Feb 2015 19:44:04 +0000 (UTC) From: "Russell Branca (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (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 Russell Branca created COUCHDB-2629: --------------------------------------- Summary: 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)