From: kpi6288@gmail.com
To: pgsql-general@postgresql.org
Subject: AW: Disable TRUST authentication by using ClientAuthentication_hook
Date: Fri, 13 Jul 2018 16:13:34 +0200
Message-ID: <009e01d41ab3$af9a2510$0ece6f30$@gmail.com> (raw)
In-Reply-To: <23124.1531489879@sss.pgh.pa.us>
References: <006c01d41aa0$b0ae27c0$120a7740$@gmail.com>
<CAECtzeWexM91HD-g5D7GZJubboZ9Uzohu-SA7pGDDWTR0bOMGw@mail.gmail.com>
<CAPfkCSAp1h1kipBdd7TA3TM6FmDesQDe6Q=4Y_tnD4oDJoa5pQ@mail.gmail.com>
<23124.1531489879@sss.pgh.pa.us>
> -----Ursprüngliche Nachricht-----
> Von: Tom Lane <tgl@sss.pgh.pa.us>
>
> > If you're an server admin you can disable the extension (editing
> > shared_pre_load_libraries GUC), change password and then enable the
> > extension again...
I am aware of this and all the other points.
> Or more to the point: exactly what is the threat model here?
It is similar like with your garage door: locking it with a simple 50 year-old-key is still better than just clamping it with a wedge. It is certainly not as good as enforcing the door and putting a modern and solid lock to it.
> ISTM that
> someone with enough privilege to alter pg_hba.conf can probably suppress
> loading of an extension too, so that the security added by this idea is not just
> questionable but completely illusory.
This is a valid point of concern. However, settings in pg_hba.conf need to be documented to allow modification of IP address ranges etc. A few people have access to this and it is likely that they look into the manuals and find alternative settings. Configuration of libraries is not clear to everyone.
>
> What would actually move the goalposts a bit is to build a modified server
> which doesn't have the TRUST code path at all, so that there is no question of
> installing an extension or not; then somebody who wants to defeat the
> security needs to be able to replace the server executable. But you don't
> need any hook if you do that.
That is true but I came across a discussion that for several reasons a proposal to add build-time options for authentication methods was not implemented. I'm trying to avoid modification of the source code if I can. I agree that I may have to build a modified server if I don't find a better solution.
Regards Klaus
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-general@postgresql.org
Cc: kpi6288@gmail.com
Subject: Re: Disable TRUST authentication by using ClientAuthentication_hook
In-Reply-To: <009e01d41ab3$af9a2510$0ece6f30$@gmail.com>
References: <006c01d41aa0$b0ae27c0$120a7740$@gmail.com> <CAECtzeWexM91HD-g5D7GZJubboZ9Uzohu-SA7pGDDWTR0bOMGw@mail.gmail.com> <CAPfkCSAp1h1kipBdd7TA3TM6FmDesQDe6Q=4Y_tnD4oDJoa5pQ@mail.gmail.com> <23124.1531489879@sss.pgh.pa.us> <009e01d41ab3$af9a2510$0ece6f30$@gmail.com>
* 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