Disable TRUST authentication by using ClientAuthentication_hook

From: <kpi6288(at)gmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Disable TRUST authentication by using ClientAuthentication_hook
Date: 2018-07-13 11:57:35
Message-ID: 006c01d41aa0$b0ae27c0$120a7740$@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2018-07-13 12:01:42 Re: Disable TRUST authentication by using ClientAuthentication_hook
Previous Message Rijo Roy 2018-07-13 11:10:55 Database Refresh confusion