Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cik6s-0002Ta-PV for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Feb 2017 15:54:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cik6s-0003To-CG for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Feb 2017 15:54:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cik6B-0002H9-AA for pgsql-bugs@postgresql.org; Tue, 28 Feb 2017 15:53:59 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cik68-0006VM-7S for pgsql-bugs@postgresql.org; Tue, 28 Feb 2017 15:53:58 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 7A35C5F794; Tue, 28 Feb 2017 10:53:55 -0500 (EST) Date: Tue, 28 Feb 2017 10:53:55 -0500 From: Stephen Frost To: Magnus Hagander Cc: Tom Lane , Bruce Momjian , postgres@freigeist.org, pgsql-bugs Subject: Re: BUG #14543: libpq fails with group readable ssl keys Message-ID: <20170228155355.GI9812@tamriel.snowman.net> References: <20170213184323.6099.18278@wrigleys.postgresql.org> <20170227225845.GG421@momjian.us> <5436.1488236853@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bONozrmKw2ELGBWV" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 10:42:23 up 234 days, 17:06, 11 users, load average: 0.13, 0.19, 0.17 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --bONozrmKw2ELGBWV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Magnus Hagander (magnus@hagander.net) wrote: > On Tue, Feb 28, 2017 at 12:07 AM, Tom Lane wrote: > > Bruce Momjian writes: > > > We changed Postgres 9.6 to allow open group permissions on the > > > _server_'s SSL key if it was owned by root: > > > Allow the server's SSL key file to have group read > > > access if it is owned by root (Christoph Berg) > > > Is this something we should change on the client? I don't see why no= t, > > > but the 'root' requirement would still remain. > > > > I'm pretty suspicious of doing this on the client side. It doesn't seem > > as useful, and it would open up a bunch of issues concerning e.g. what > > cert authentication actually is authenticating. >=20 > It does rapidly tread into platform-specific behaviour and exactly how > groups are used, yeah. Agreed. > I wonder if a better choice might be to have a way to override the > behavior. We're mostly trying to defend against an accidental > misconfiguration after all. So perhaps we should have a way to specify > something like sslkey=3D/foo/bar:insecure or something like that, which w= ould > ignore the permissions check on it. In this case it's very clearly a > *voluntary* configuration that the user did, and therefor any analysis of > the security of doing it is on them, but we retain the default behavior of > clearly pointing out to a user that what they're doing might be insecure? Well, I'm not keen on forcing users to say 'insecure' when, for their particular environment, it might be just fine. "nopermcheck" or something would be better, imv. As long as it's clearly a user requested behavior, I don't see any issue with it. Thanks! Stephen --bONozrmKw2ELGBWV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYtZ0TAAoJEO1sijiDR2RVBzgQAIh9GdpP9DBT4WfT65LXJ+EV KQo9D9f7rgwJ8/X77bw1cye/F8xjzXIsAtIbFDLBHpzghTpXwRjyi+llremcyfZl YIV+DMcTBdomXSc9S+J2t/QTh3OghMOFTUJi6jnm2RBkp+xVb4lt868Iv10/eQRL D/J0XQyAGw32jMW2CIUrZsxebv5QIIfMfKjHsihzh5Evz6MUBb8LQNZzcbafpj29 iP4dBchQX1uxk/l9Nx1yMIWwN0Te/oZlDLOIRYb/ZnHkjuyxF5IxaDMQRs/Hrzt2 UTH/WNgtmggBrncTDDfCPwA1d+xynDnkFOGaDb4QpejrD8Dmq9A4E+BOuf/42Z2x m8zmIJPDsH9Sf6ODr/gz3ZzothhhHoLB/Rk6ijuF9LC03eswAz5Z4lT7NXztEgWl 1lqbtMBgfA2tFCedPr6lbxJN6SfjBhnRFwSFUZexJOl3J0XMUEFUK6nOKg+AeDw7 WiVTpC9u45iCuqGqyWCoRrkWqEYytzok8sLM6UAie9ECMnkeFNgczO8RFBHd6hT8 3tG6aNMJ07AZ5ocQemoVrA3ZFgo0WM/StHuiIFcGG7MzUw+cmGJcqRJDmEoC1eGf IArYlHWaez9p1+xszKrCJnwETjzYNjlO6fqeMOzcaw8Gk6ecmFgTagernlHjO1iw 7UAVxnmEobm2qZ/s9qf0 =z5ot -----END PGP SIGNATURE----- --bONozrmKw2ELGBWV--