Re: On login trigger: take three
Greg Nancarrow <gregn4422@gmail.com>
From: Greg Nancarrow <gregn4422@gmail.com>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-12-08T00:17:33Z
Lists: pgsql-hackers
On Fri, Dec 4, 2020 at 9:05 PM Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote: > > As far as I understand Pavel concern was about the case when superuser > defines wrong login trigger which prevents login to the system > all user including himself. Right now solution of this problem is to > include "options='-c disable_session_start_trigger=true'" in connection > string. > I do not know if it can be done with pgAdmin. > > As an event trigger is tied to a particular database, and a GUC is global to the cluster, as long as there is one database in the cluster for which an event trigger for the "client_connection" event is NOT defined (say the default "postgres" maintenance database), then the superuser can always connect to that database, issue "ALTER SYSTEM SET disable_client_connection_trigger TO true" and reload the configuration. I tested this with pgAdmin4 and it worked fine for me, to allow login to a database for which login was previously prevented due to a badly-defined logon trigger. Pavel, is this an acceptable solution or do you still see problems with this approach? Regards, Greg Nancarrow Fujitsu Australia
Commits
-
Fix some typos in event trigger docs
- 5fce30e77fe1 17.0 landed
-
Use heap_inplace_update() to unset pg_database.dathasloginevt
- 8be93177c46b 17.0 landed
-
Remove the flaky check in event_trigger_login regression test
- 4b885d01f967 17.0 landed
-
Fix instable 006_login_trigger.pl test
- 06be01eb266b 17.0 landed
-
Add support event triggers on authenticated login
- e83d1b0c40cc 17.0 landed
-
Add GUC for temporarily disabling event triggers
- 7750fefdb2b8 17.0 landed
-
Fix typo in reference to __FreeBSD__.
- e52f8b301ed5 16.0 cited
-
Restore robustness of TAP tests that wait for postmaster restart.
- f452aaf7d4a9 14.0 cited
-
Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.
- 84f5c2908dad 14.0 cited