| From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
|---|---|
| To: | Wells Oliver <wells(dot)oliver(at)gmail(dot)com> |
| Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: Blocking clients based on application name? |
| Date: | 2019-09-01 16:58:15 |
| Message-ID: | CAMkU=1xusATj_awJsTaHuWVW0Fp1+Zy14NQ62oRuQCJndyDxYQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
On Thu, Aug 29, 2019 at 1:49 PM Wells Oliver <wells(dot)oliver(at)gmail(dot)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 | Content-Type | Size |
|---|---|---|
| auth_deny.c | application/octet-stream | 1.2 KB |
| Makefile | application/octet-stream | 317 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | James B. Byrne | 2019-09-04 16:51:04 | overwrote THE 'postgres' database - how to recover |
| Previous Message | Jeff Janes | 2019-08-30 01:43:45 | Re: Index not always being used |