Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XdPeG-0002Ej-7r for pgsql-bugs@arkaria.postgresql.org; Sun, 12 Oct 2014 20:21:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XdPeE-0003Ow-NY for pgsql-bugs@arkaria.postgresql.org; Sun, 12 Oct 2014 20:21:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XdPeC-0003Oj-JS for pgsql-bugs@postgresql.org; Sun, 12 Oct 2014 20:21:44 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XdPe5-0004Yu-78 for pgsql-bugs@postgresql.org; Sun, 12 Oct 2014 20:21:42 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A91025F7E1; Sun, 12 Oct 2014 16:21:36 -0400 (EDT) Date: Sun, 12 Oct 2014 16:21:36 -0400 From: Stephen Frost To: Tom Lane Cc: Steven Siebert , Bruce Momjian , Magnus Hagander , pgsql-bugs Subject: Re: BUG #10680: LDAP bind password leaks to log on failed authentication Message-ID: <20141012202136.GZ28859@tamriel.snowman.net> References: <20140619160901.GW16098@tamriel.snowman.net> <20141011183535.GA21267@momjian.us> <25516.1413142930@sss.pgh.pa.us> <20141012195800.GY28859@tamriel.snowman.net> <26135.1413144596@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="n4ulkF7HeEacyORT" Content-Disposition: inline In-Reply-To: <26135.1413144596@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.11.0-19-generic (x86_64) X-Uptime: 16:11:25 up 187 days, 6:30, 5 users, load average: 0.18, 0.11, 0.07 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 --n4ulkF7HeEacyORT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Let's stop having passwords and secrets in a complex configuration file > > which can have parsing and other failures. >=20 > > How about allowing users to put that information in an independent file, > > as do for SSL (admittedly, probably more because it's easier for us to > > deal with OpenSSL that way, but still)? >=20 > And then what? This other file can't possibly be so simple that > it's immune to having syntax errors, for example. =20 Uh, no, that's exactly the point of the independent file. It's *only* the password. fopen() - fails, then log that you can't open the file fgets() - fails, then log that you can't read the file (check for newline and remove it, if it's there) If it grows to be a complex configuration file which can have syntax errors, then it loses the point, I agree, but I don't hear anyone complaining about SSL keys or SSH keys or Kerberos keytabs being leaked in log files- and I'm pretty darn sure they would be complaining if it was happening, regardless of any "keep your log files secure and only let trusted people look at them" requirement. > You're just moving > the same problems from point A to point B. More, this would complicate > configuration and thereby create a whole new set of possible config > errors, which we'd then feel pressure to ameliorate by adding more > logging showing what the postmaster is doing. And that logging would > have this same issue of maybe it's exposing information that person A > doesn't want logged ... even though person B needs that very same info > to help him figure out his configuration mistake. A likely example of > that is feeding the wrong password/secret to some auth infrastructure > service, because you referenced the wrong item in this secondary file. This is done in other systems and has worked well from my experience. > The core problem here is that we *need* to put security-relevant info > into the postmaster log in order to help people resolve problems. Moving > around configuration details isn't going to fix that; indeed, the more > complicated the configuration files, the worse the problem will be. Having pg_hba be complicated but not having passwords in secrets in it isn't making this problem worse- we can log all we want about pg_hba. The point is to remove the sensetive information from the complicated config file, even if that makes the complicated config file a bit more complicated. Thanks, Stephen --n4ulkF7HeEacyORT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUOuLQAAoJEO1sijiDR2RVh9wP/1QuwtcqYsv6Paoe2yeWU5mD 1oTpEsJqbQRh5D89WTDd+7lmvPQw+9j7sXpKRsXEtvXIfZj8vrxmGZEuXMPsVTOj NTSPMl4fJ8mtDQxl99Ku9hmUcvKU/3rBZlcVc27EuZA+VUbPjukIy2x8cVJKEeRK CGKKj0qzzwHLZufIH6IU6Ja2i7Qi6Kc904GKP0+EOJyY5L28R0+Kb4nkJ5qyIOTo BUcV/CI8IaBuoKRBQA6oWqTBe6x4QZZTvKUpaulJJllhTJe0KA/4vEZJYEK01nVf Kb4lcObxay+2DLIPoqh03vDEPTBILviXzkaaPgumzhdIpX4kKeIkTBmJPG7mjAi1 YBiMk0W4wbiFZtruzgG6Fh/+6ASICxnLvr5rWiFW3YBDU+J2pn5iM2E+4MOXMlIb SIE31j4VyO6FMSJ+a1qdCh3ECB/k8+XCwxqb2Ie0fYP3ZP/QRPbnaNqI9WRQAb7Q cDzOmUumRjfYIt+R/JolmmJNPXAUPxzQ//JbNDSPB9KlRY+ycZICIAoEXFWh4p6W qpWNJQ9tamSOY8git0u4HIlEPcdJYE01GzH7+yITr+DmSg1DC45tPcunXKibvlzM BVIFC2m+RmRdQYgAG8oMdEcWtbVQKjc7Lr1IWsX/5/ZUJ9wn6bQNzrEZyGdIkO+S EA+bRhRuNrtHiAcW13W7 =xQ/L -----END PGP SIGNATURE----- --n4ulkF7HeEacyORT--