Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xiqjz-0001n6-9Y for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Oct 2014 20:18:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xiqjy-00022Y-PO for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Oct 2014 20:18:10 +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 1Xiqjx-0001zu-BX for pgsql-bugs@postgresql.org; Mon, 27 Oct 2014 20:18:09 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xiqju-0001xI-4l for pgsql-bugs@postgresql.org; Mon, 27 Oct 2014 20:18:07 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id AE7BB5F870; Mon, 27 Oct 2014 16:18:05 -0400 (EDT) Date: Mon, 27 Oct 2014 16:18:05 -0400 From: Stephen Frost To: Steven Siebert Cc: Tom Lane , Bruce Momjian , Magnus Hagander , pgsql-bugs Subject: Re: BUG #10680: LDAP bind password leaks to log on failed authentication Message-ID: <20141027201805.GB28859@tamriel.snowman.net> References: <20141011183535.GA21267@momjian.us> <25516.1413142930@sss.pgh.pa.us> <28196.1413749669@sss.pgh.pa.us> <20141027171942.GW28859@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X3y8klF9Bu8lnh1Z" Content-Disposition: inline In-Reply-To: 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:12:12 up 202 days, 6:31, 7 users, load average: 0.21, 0.11, 0.11 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.5 (--) 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 --X3y8klF9Bu8lnh1Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Steven Siebert (smsiebe@gmail.com) wrote: > Thanks for the response. I was actually about to write the patch after > having let the thread bake a bit =3D) Great- would love to have a patch to review. :) > > > Normally, storing anything in reversible encryption is really just the > > > same as storing it as clear text, but what I propose is to use the > > > same asymmetric keys used for secure SSL comms > > > (http://www.postgresql.org/docs/9.3/static/ssl-tcp.html). > > > > Ok- and then what? You encrypt it with a different key than you use for > > decryption, sure, but PG still has to know the decryption key to be able > > to actually use the secret.. Now, if you fix radius to not use a shared > > secret structure... >=20 > lol. well, the idea of piggybacking on the way SSL comms works is that > this has already been addressed - at the DBA makes the choice (based on > their requirements) if they want to have to type it in each time they > restart the service or put it in a file...I wouldn't be introducing a > foreign concept to postgres. Of course, it's moot...I'm more than happy a > patch based around your suggestions - and it'll meet our needs for the > STIGs. Having a password have to be provided at startup is one option, I agree with that. I'm not sure it makes sense in this case, but perhaps.. We did do that with our KDC when I was operating a NIST Moderate level system, but we didn't use that approach for the shared secrets on each server as it just wouldn't have been workable. Storing the files on a encrypted filesystem which is mounted over loopback and requires a password to mount would also work though and would remove the need for PG to do any particular magic in this case. Let's at least get the 'pwfile' option handled first and then we can consider alternatives. There's no need to introduce public key cryptography for the "type-in-the-password-at-startup" solution though; we'd only be doing that because we could piggy-back on OpenSSL. I suspect we could do better than that. > I'll move forward with writing the patch now, I'm grateful for the > additional feedback. Sounds great! If you aren't familiar with it already, you might want to check out our Developer FAQ and http://commitfest.postgresql.org in particular, as that's how we track patches which are submitted to the community to try and avoid patches getting forgotten. :) Thanks! Stephen --X3y8klF9Bu8lnh1Z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUTqh9AAoJEO1sijiDR2RVsYgP/Ap6p9VCRe01dSrlOPUytRMx JxBZwkz1YQpiducUaE+vyMxVOYvgUj2v7ySRXJMdbmt9xTohYqw5jIjVJFWCSW44 0uXoQFMqqxaavsWe3ulZy7SoMU+zxXg/iP0XJGU2pL5zWYzrkKF5IczGtZQ3sb80 IshazhhWDnguWG2MpkrWqQhJ5phYK1kaaoI9xmo/Zh4oLTul4mm9kwIz9KW4x+WC kj05uRkdMqq3ZqCzr7/Ul0JeLBCXRfUnPqeVcB5L0qRji98Si7i9UEeqPOnDTetd FjQz+lMlL8ZYX5iohJF6fGHWtCNo54Gw5/jA8msF45zJBIFiBWMsvn244kndlHk7 AL81RSbL2FEkQMqY8D1BIJoHzf0qUzsG3yi5g0WZQkvOdp99WWiO46D4uG9po0cl Map/9rU+ObkJPi4MqZS4FcXrRYU9VR/vl8UIP0/+YpwXhduEA0pQ9LySDw9m7UdN XABV7r2OAIlF8GuN6e1dcajVypsWuv/6+pe/NqdM/jx9dKkI0WW4Lwy1DfMI3Ejd A/DBW2lphhTQKX3j4dxlo9/DplyViYLyBnlFdleUxJfZlAW27au+yTtBrr/PVDiH JJEEvE49x8BoSgryf70NuQ/Tqv/qIAhLvc3WH9xnBhqmqlOW5qJXgmhd0VyzESqt scAzffeDt6TGDAZcqCrQ =KDzm -----END PGP SIGNATURE----- --X3y8klF9Bu8lnh1Z--