From: kpi6288@gmail.com
To: pgsql-general@postgresql.org
Subject: Disable TRUST authentication by using ClientAuthentication_hook
Date: Fri, 13 Jul 2018 13:57:35 +0200
Message-ID: <006c01d41aa0$b0ae27c0$120a7740$@gmail.com> (raw)
I'd like to disable the TRUST authentication method for certain servers
where modification of pg_hba.conf and restarting a service is fairly easy
for a number of users.
I looked at this example
https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf It appears
that creating a ClientAuthentication_hook and call ereport(ERROR) in case
that Port->HbaLine contains TRUST would do the job. Is that right?
I am aware that this would not make the server entirely secure but it would
make it at least a bit more difficult to enter.
Thanks 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: <006c01d41aa0$b0ae27c0$120a7740$@gmail.com>
References: <006c01d41aa0$b0ae27c0$120a7740$@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