From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Steven Siebert <smsiebe@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #10680: LDAP bind password leaks to log on failed authentication
Date: Sun, 12 Oct 2014 16:21:36 -0400
Message-ID: <20141012202136.GZ28859@tamriel.snowman.net> (raw)
In-Reply-To: <26135.1413144596@sss.pgh.pa.us>
References: <20140619160901.GW16098@tamriel.snowman.net>
<CAC3nzegc2hSqcLcGdgGLXsMYapOAPBFmr76VkzqK=vBpefmRdg@mail.gmail.com>
<CABUevEziycN8irGudCg+DW0MY-afwbEjDR0ODGO9Rz9Sm9wSRQ@mail.gmail.com>
<CAC3nzeitnG+3DthhAer3TF0OQO0-JsFWVB9iuXMqMCRz7aDmpw@mail.gmail.com>
<20141011183535.GA21267@momjian.us>
<CAC3nzeidOUjEsF-dUYo_eDEMQqYMe0zWnc8RtirX8=vPoxAR5w@mail.gmail.com>
<CAC3nzeivnRFD+41PRhAx8Kd9VwbW0B2bzzJEmf603RTO6xAJvg@mail.gmail.com>
<25516.1413142930@sss.pgh.pa.us>
<20141012195800.GY28859@tamriel.snowman.net>
<26135.1413144596@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > Let's stop having passwords and secrets in a complex configuration file
> > which can have parsing and other failures.
>
> > 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)?
>
> And then what? This other file can't possibly be so simple that
> it's immune to having syntax errors, for example.
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
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: sfrost@snowman.net, tgl@sss.pgh.pa.us, smsiebe@gmail.com, bruce@momjian.us, magnus@hagander.net
Subject: Re: BUG #10680: LDAP bind password leaks to log on failed authentication
In-Reply-To: <20141012202136.GZ28859@tamriel.snowman.net>
References: <20140619160901.GW16098@tamriel.snowman.net> <CAC3nzegc2hSqcLcGdgGLXsMYapOAPBFmr76VkzqK=vBpefmRdg@mail.gmail.com> <CABUevEziycN8irGudCg+DW0MY-afwbEjDR0ODGO9Rz9Sm9wSRQ@mail.gmail.com> <CAC3nzeitnG+3DthhAer3TF0OQO0-JsFWVB9iuXMqMCRz7aDmpw@mail.gmail.com> <20141011183535.GA21267@momjian.us> <CAC3nzeidOUjEsF-dUYo_eDEMQqYMe0zWnc8RtirX8=vPoxAR5w@mail.gmail.com> <CAC3nzeivnRFD+41PRhAx8Kd9VwbW0B2bzzJEmf603RTO6xAJvg@mail.gmail.com> <25516.1413142930@sss.pgh.pa.us> <20141012195800.GY28859@tamriel.snowman.net> <26135.1413144596@sss.pgh.pa.us> <20141012202136.GZ28859@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox