Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 53473 invoked from network); 7 Feb 2011 15:45:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2011 15:45:16 -0000 Received: (qmail 50818 invoked by uid 500); 7 Feb 2011 15:45:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 50562 invoked by uid 500); 7 Feb 2011 15:45:11 -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 50552 invoked by uid 99); 7 Feb 2011 15:45:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 15:45:09 +0000 X-ASF-Spam-Status: No, hits=4.2 required=5.0 tests=FS_REPLICA,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.17.9] (HELO moutng.kundenserver.de) (212.227.17.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 15:45:02 +0000 Received: from [192.168.0.54] (host81-137-251-59.in-addr.btopenworld.com [81.137.251.59]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0Mgrgq-1PQWXP2EsK-00M4SZ; Mon, 07 Feb 2011 16:44:39 +0100 From: Robert Johnson Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Replication and security advice sought Date: Mon, 7 Feb 2011 15:44:37 +0000 Message-Id: <91F25BBC-5FEB-4FE4-8693-F608AEDF4F48@rowanshire.net> To: user@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) X-Provags-ID: V02:K0:0NvbdPqdy9Ug2lXTDu4O/v43H1QhxH8SuMSnMpahZh9 HK+rVZ4zOHE7BhYgu/kVXeHNMBxoLqnjLr53AvMTszqzU2wU48 a0sFSksLdA5swRQpCsvk6JGjglCtIkdw5hc9B0Y+Fx5J5TVKVj dC/On7klqA2kVrgferh6CpI5MUCGlqXbiDcrNuaNFZGiumkDuN /o0I49OU3INwWsgB3WmTJP6AHXY1cSt5roen25Lt2w= Hello I am creating an application in which individual Company sites input = data into individual CouchDB databases running on site specific servers = which is then replicated to a single central system at head office = (running on a separate server). The central system holds configuration = data for each sites local system. I therefore need to replicate data between the site databases and the = central database and the Company has no internal secure network and so = it will have to do all this via the public internet. Replication will = always be initiated from the site based systems. For the applications to function, Couch only needs to listen on = localhost (nice and private) but in order to replicate, unless I have = missed something, the central system will have to listen on its public = IP address or they will not receive the replication requests. By = contrast the site based systems can listen only on localhost because the = application is on the local server and they will initiate the = replication with the remote database. I am not a proxy or firewall expert by any means, so I am looking for = some fairly detailed advice and guidance as to how to make the process = secure in the simplest fashion. I have scoured the internet and I have found basic advice that would = have me use a proxy or a firewall to control access but there is a = comment that Couch 1.0.1 enhanced replication to run over https which = lead me to wonder if you could simply use Couch security and pass the = replication commands with the necessary login information over https. If the proxy is the best route, then the central system application is = web based and users access that over the public internet on port 80, the = central couchdb runs on the same server as the application and is = currently listening on its default port 5984. Each site has a = technically identical set up on separate servers. To me this means I = will need to set up a proxy n the central server that will allow http = requests on port 5984 from localhost and forward http requests on port = 5984 from a defined set of other ip addresses to localhost:5984. It must = also allow http requests on port 80 from any incoming ip address. All servers are Ubuntu Linux 10.04.1 LTS, web servers are apache 2.2.14, = couchdb is 1.0.1. Advice and guidance would be very gratefully received, but please bear = in mind that whilst I am a pretty good application developer, my = networking knowledge generally and proxy / firewall knowledge = specifically is limited to principals and not practice so if you could = explain the details of any suggestions in detail at a "put this line in = this file" type level I would be eternally grateful. Many thanks to you all in advance. Bob Johnson=