I want to know whether Postgres has a policy to lock a particular database user after several unauthorized login attempts.
Asked
Active
Viewed 3,047 times
0
-
2No, nothing built-in (unless you externally authenticate e.g. using LDAP, PAM or [similar technologies](https://www.postgresql.org/docs/current/client-authentication.html)) – Oct 09 '19 at 13:27
1 Answers
1
You can write it using pluggins:
See https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf
There is a hook named ClientAuthentication_hook it is called after the login is checked and before the answer is sended to the client. There you can do what you want.
Emilio Platzer
- 2,327
- 21
- 29