Re: Failed Login Attempts in PostgreSQL

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Jagmohan Kaintura <jagmohan(at)tecorelabs(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Failed Login Attempts in PostgreSQL
Date: 2020-11-13 10:13:13
Message-ID: CABUevExsNuXqhG39G4Rhd4oERC9j0PquzZfbOre38AoUn5z2Pg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 13, 2020 at 11:03 AM Jagmohan Kaintura
<jagmohan(at)tecorelabs(dot)com> wrote:
>
> Hi Team,
> I was looking for a workaround on how we can configure Failed Login attempts feature of Oracle in PostgreSQL.
> The Only requirement is End user shouldn't be allowed to Login after an "n" number of unsuccessful attempts.
>
> Users have the ability to perform all operations on the underlying tables. So we wanted to restrict after doing "n" unsuccessful attempts.
>
> I couldn't get any source anywhere.

You can use fail2ban for example. See for example this thread here
https://www.postgresql.org/message-id/flat/61463e206b7c4c0ca17b03a59e890b78%40lmco.com,
and the config on https://github.com/rc9000/postgres-fail2ban-lockout.
(probably needs some small adaptations, but as a base it should work).

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Jacobfeuerborn 2020-11-13 12:52:10 "invalid record length" after restoring pg_basebackup
Previous Message Jagmohan Kaintura 2020-11-13 10:03:16 Failed Login Attempts in PostgreSQL