Re: Blocking clients based on application name? - Mailing list pgsql-admin

From Jeff Janes
Subject Re: Blocking clients based on application name?
Date
Msg-id CAMkU=1xusATj_awJsTaHuWVW0Fp1+Zy14NQ62oRuQCJndyDxYQ@mail.gmail.com
Whole thread Raw
In response to Blocking clients based on application name?  (Wells Oliver <wells.oliver@gmail.com>)
List pgsql-admin
On Thu, Aug 29, 2019 at 1:49 PM Wells Oliver <wells.oliver@gmail.com> wrote:
Seems silly, but can you block clients based on the application name? i.e. if you wanted to block anyone trying to connect with PG Admin III...

There is an authentication hook you can use to do that, if you are willing to compile some C code and install the .so file.

It isn't going to be very robust, because there are different ways to set the application_name.  But it works for the way pgAdmin3 sets it.

This is heavily based on auth_delay (https://www.postgresql.org/docs/current/auth-delay.html).

Cheers,

Jeff
Attachment

pgsql-admin by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Index not always being used
Next
From: "James B. Byrne"
Date:
Subject: overwrote THE 'postgres' database - how to recover