Обсуждение: Blocking clients based on application name?

Поиск
Список
Период
Сортировка

Blocking clients based on application name?

От
Wells Oliver
Дата:
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...

--

Re: Blocking clients based on application name?

От
"David G. Johnston"
Дата:
On Thursday, August 29, 2019, 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...


No

David J. 

Re: Blocking clients based on application name?

От
Jeff Janes
Дата:
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
Вложения