Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WxcnR-0008Jm-AJ for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Jun 2014 13:54:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WxcnQ-0001x8-Qf for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Jun 2014 13:54:32 +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 1WxcnQ-0001x1-0a for pgsql-bugs@postgresql.org; Thu, 19 Jun 2014 13:54:32 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WxcnN-00066a-Ch for pgsql-bugs@postgresql.org; Thu, 19 Jun 2014 13:54:30 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 03F475F7E3; Thu, 19 Jun 2014 09:54:28 -0400 (EDT) Date: Thu, 19 Jun 2014 09:54:28 -0400 From: Stephen Frost To: Steven Siebert Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10680: LDAP bind password leaks to log on failed authentication Message-ID: <20140619135428.GM16098@tamriel.snowman.net> References: <20140617175511.2589.45249@wrigleys.postgresql.org> <20140619124432.GP16098@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5adDe+nHDi68q/7x" 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: 09:49:46 up 72 days, 8 min, 13 users, load average: 0.08, 0.06, 0.05 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 --5adDe+nHDi68q/7x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Steven, * Steven Siebert (smsiebe@gmail.com) wrote: > > If you don't want the server to see the user's password, don't use LDAP > > authentication. A much better approach is Kerberos or client-side SSL > > certificates. >=20 > Sadly, all other authentication options will not work for us. >=20 > I'm not seeing the user password in the log, I'm seeing the bind > password (ldapbindpasswd) that in the pg_hba.conf file. There is a > line in auth.c that, on every failed attempt, prints the full (raw) > configuration line to the log at all log levels. So, this isn't just > a problem with LDAP (with ldapbindpasswd) but also the RADIUS method > (radiussecret). Ah, ok. Kerberos and SSL certs aren't immune to that problem, though the secrets don't ever end up in the logs- but they still must be visible to the server process in order. Of course, if you already have access to the server process, there shouldn't be much to gain =66rom the Kerberos secret, the RADIUS secret, the SSL private key, or the LDAP bind password.. > I've submitted a patch and we're discussing the problem further on the > pgsql-hackers distro. Really, I think it all comes down to finding > the right balance of security and convenience of the administrator. > I'm hopeful we'll come up with the right answer soon and I can submit > a new patch. Oh, yeah, I saw that discussion but hadn't quite put it together with this bug report (somehow I saw the bug report after the hackers discussion...). Thanks, Stephen --5adDe+nHDi68q/7x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTouuUAAoJEO1sijiDR2RVACcQAMT8PLVqU3VVkH1Zyv/aTdyq RDJuBraTDt04z4L8fEIcsIV4CMfQCM/VGhosjafZhgJ+vveJBcCdjbsZZhlBZSxs keiQD83EPcrlCNNovwuUPD2vqE1v5eCEt4dh02iYDF++YJ+qZDTbxZIqE8R1o4t0 hBGlFLaxDw6858iDD2asMBsYNFhA5UYDmkYkUlZ1q7DJlX5KstjH6NgXfMbC8GOk pdn9U7Ar14BZLW+20RjxoNNuEQ4eCIbc3Sm/W3HbeJZLO1Aw5FHpve7x9oy+c0y4 46uC+D9//DAKPojVNqjJs4SznOLQjaE1ZkiKMsTQd/s9YqEP7gDxMeARpa7yUWMV 2rcXM/ESBgGRj8stT4eFzxmLB0scnqwvbVp1LKshJwGcBl2Bi19ruouGi2I505Xv ry3iQhozkMXLqaewBuCb5VpAhCFFU58lE/DPxDQLFk8WSDsr8ZpU+V5gBaVTL6Nk r2GVDZ0gzT8RlI/lYzmc/EPLKoAKx2dxCJYaXrq8XdHElCgQbqWLUrT7L1zjWROc TkWKzu+V4uJbpcoPbkw1yEBNmYOkG/vb3o77DL5hqSC0O0MhIby7FWBGCpcEurqt y/Dr9rp8xDXYEiSDVDrDCiIbn0DjRDSqdNa+DmufCuBmaRD/WgBaVSbTy2r1YfhH keqvmmgrdpQnNP5FS6z6 =Urw3 -----END PGP SIGNATURE----- --5adDe+nHDi68q/7x--