Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YuQiR-0003WZ-0M for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2015 19:28:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YuQiQ-0003pA-GQ for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2015 19:28:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YuQiP-0003p3-06 for pgsql-hackers@postgresql.org; Mon, 18 May 2015 19:28:41 +0000 Received: from mx-out.zmailcloud.com ([192.198.85.98] helo=mx-out-1.zmailcloud.com) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YuQiK-0004gN-HP for pgsql-hackers@postgresql.org; Mon, 18 May 2015 19:28:40 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 71E0E563EBB; Mon, 18 May 2015 14:28:35 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 602AD601E1; Mon, 18 May 2015 14:28:35 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id itY2bpgSK8vl; Mon, 18 May 2015 14:28:35 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 3568760216; Mon, 18 May 2015 14:28:35 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 1AB0A601F7; Mon, 18 May 2015 14:28:35 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AgjUdMCMW2of; Mon, 18 May 2015 14:28:35 -0500 (CDT) Received: from [172.47.23.104] (50-0-190-244.dsl.dynamic.fusionbroadband.com [50.0.190.244]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 2B117601E1; Mon, 18 May 2015 14:28:34 -0500 (CDT) Message-ID: <555A3D60.1050004@agliodbs.com> Date: Mon, 18 May 2015 12:28:32 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jim Nasby , =?UTF-8?B?Vm9sa2VyIEHDn21hbm4=?= CC: Stephen Frost , Tom Lane , Andrew Dunstan , Alvaro Herrera , "pgsql-hackers@postgresql.org" Subject: Re: Disabling trust/ident authentication configure option References: <6837.1430946793@sss.pgh.pa.us> <554A9898.9040407@agliodbs.com> <20150507150254.GA30322@tamriel.snowman.net> <20150507205749.GE30322@tamriel.snowman.net> <55596375.7070601@agliodbs.com> <555A06ED.3040609@BlueTreble.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 05/18/2015 08:36 AM, Jim Nasby wrote: > On 5/17/15 10:58 PM, Josh Berkus wrote: >> The goal here was stated to preventing authentication misconfiguration >> by shortsighted admins who have superuser access and the ability to >> change pg_hba.conf. This is tantamount to giving someone a gun and >> bullets, but expecting duct tape across the cartridge slot to prevent >> them from loading or using the gun. > > The idea is to prevent *accidental* misconfiguration, not to try and > permanently lock them out. IE: make them think before allowing them to > just do something silly. Disabling auth methods at compile time seems a > very reasonable way to accomplish that. It doesn't seem like it to me. You're talking about a mechanism which would either require people to compile their own PostgreSQL binaries, or have an additional set of packages available. That's a huge amount of overhead for something which could be just as easily accomplished by putting the comment "#IF YOU ENABLE TRUST AUTH IN THIS FILE YOU WILL BE FIRED" in pg_hba.conf. Or, heck, simply putting pg_hba.conf in Puppet/Chef/Ansible/Salt and restricting permissions to the CMS repo. Which is something most modern shops *already do*. There are *real* things we could do to improve the overall security of auth methods. Mandatory logging of pg_hba.conf changes, for example. Or having a way to monitor which servers have which auth methods for which networks available in some scalable way (i.e. without reading pg_hba.conf). Those would also take a lot of work and thought lest they expose additional attack surfaces. One thing computer security history has demonstrated again and again is that ad-hoc attempts to duct-tape over real security issues are counter-productive, since they interfere with real work and the steps people take to get around them create bigger security holes than the original problem. Let's please not do that in Postgres. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers