Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEzAU-0003S5-QC for pgsql-admin@arkaria.postgresql.org; Thu, 08 Dec 2016 13:55:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEzAT-0005pl-Ui for pgsql-admin@arkaria.postgresql.org; Thu, 08 Dec 2016 13:55:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEzAS-0005lA-Sx for pgsql-admin@postgresql.org; Thu, 08 Dec 2016 13:55:25 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEzAQ-0003Hg-Li for pgsql-admin@postgresql.org; Thu, 08 Dec 2016 13:55:23 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5E61A20800; Thu, 8 Dec 2016 08:55:21 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Thu, 08 Dec 2016 08:55:21 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=VtEAm5BsZ3Tc9uoxbfsEZR1lTgQ=; b=uAxpK5vtWQp/86xQWG8/ zBsq5iJ0L0JyS6+l/skLICbYmBgJYpgx2jWvYYaAXyO6Yez8UQBcveKIJm9xoDw3 wcVsr+Z0/H8oV/2RfA5CszPWTI4GJVOxr0qkdWDWXWTYH/JgaIiandKPjkwECWif 5wYdz4AhBrYF+RGv/YvVeto= X-ME-Sender: X-Sasl-enc: k5lVc6lMozL9G7VlLM0fBNrwdjcZxTUQRGaFNnX1aSTt 1481205321 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 111E47E456; Thu, 8 Dec 2016 08:55:21 -0500 (EST) Subject: Re: Are dns CNAME's allowed or useable in pg_hba.conf hostname specification To: "dennisr@visi.com" , Tom Lane References: <576363D5-19B5-4B34-A3C1-4D8BF63D3C78@visi.com> <712E05C9-E2D7-49CD-834E-26BA911C8D8A@visi.com> <369ED3B4-CAF3-4BBB-904F-E86999249D8E@visi.com> <3120.1480979712@sss.pgh.pa.us> <26EFFF38-A2FF-4BCB-A24D-4FD2D9E5E9EB@visi.com> Cc: pgsql-admin@postgresql.org, Scott Whitney From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Thu, 8 Dec 2016 08:55:20 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <26EFFF38-A2FF-4BCB-A24D-4FD2D9E5E9EB@visi.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 12/5/16 7:09 PM, dennisr@visi.com wrote: > My preference is to use a network address for this stuff but I was over ruled and needed to use a host specific name or address in the config file. I wanted to use a CNAME in place of the A or PTR records so as in the event we ever have to rebuild a new WAL receiver, I would only need to repoint the CNAME in the DNS system and avoid the possibility of updating a few hundred pg_hba.conf’s with a new IP address or hostname (this is a private cloud environment I am working with so I don’t have a lot of control over hostnames of the nodes they give me or even the networks the node is placed in.) Note that the IP addresses in pg_hba.conf are not really by themselves a primary security measure, because the source IP addresses in the same network are (potentially) under control of the source host. Their purpose is rather to allow different classes of hosts to use different authentication mechanisms. For example, newer hosts might use SSL, older hosts passwords. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin