Re: Trigger when user logs in

2019-04-14 Thread Michael Nolan
On Sun, Apr 14, 2019 at 4:06 AM Peter J. Holzer wrote: > > If you want to prevent a user from logging in (which is functionally > equivalent but a bit stronger than "instantly kick off"), then this is > definitely something that could and should be implemented via PAM (I'm > not sure what informa

Re: Trigger when user logs in

2019-04-14 Thread Ron
On 4/14/19 4:05 AM, Peter J. Holzer wrote: On 2019-04-13 22:22:16 -0500, Ron wrote: In our case, another looming Auditor requirement is to be able to instantly kick off -- or at least send a warning email -- when certain roles log in from unapproved IP addresses or programs.  For example, servic

Re: Trigger when user logs in

2019-04-14 Thread Peter J. Holzer
On 2019-04-13 22:22:16 -0500, Ron wrote: > In our case, another looming Auditor requirement is to be able to instantly > kick off -- or at least send a warning email -- when certain roles log in > from unapproved IP addresses or programs.  For example, service accounts > should only be able to log

Re: Trigger when user logs in

2019-04-13 Thread Ron
On 4/13/19 7:28 PM, Schneider, Jeremy wrote: On Apr 11, 2019, at 19:52, Tom Lane wrote: Ron writes: I bet requests like this will start to make it onto the beaten path. Meh. I'm not that excited about inventing our own versions of wheels that already exist, especially when there's nothing v

Re: Trigger when user logs in

2019-04-13 Thread Dan Langille
Pushover.net comes to mind. The email sending should not delay login. If you want notifications, look at mqtt. https://dan.langille.org/2018/04/15/using-mtqq-to-create-a-notification-network-mosquitto-mqttwarn-hare-and-hared/ Lightweight, non-pausing solution. HTH -- Dan Langille d...@

Re: Trigger when user logs in

2019-04-13 Thread Schneider, Jeremy
> On Apr 13, 2019, at 17:28, Schneider, Jeremy wrote: > >> On Apr 11, 2019, at 19:52, Tom Lane wrote: >> >> Ron writes: >>> I bet requests like this will start to make it onto the beaten path. >> >> Meh. I'm not that excited about inventing our own versions of wheels >> that already exist,

Re: Trigger when user logs in

2019-04-13 Thread Schneider, Jeremy
> On Apr 11, 2019, at 19:52, Tom Lane wrote: > > Ron writes: >> I bet requests like this will start to make it onto the beaten path. > > Meh. I'm not that excited about inventing our own versions of wheels > that already exist, especially when there's nothing very Postgres-specific > about th

Re: Trigger when user logs in

2019-04-11 Thread Ron
On 4/11/19 9:52 PM, Tom Lane wrote: Ron writes: On 4/11/19 9:12 PM, Tom Lane wrote: PAM is the usual suggestion Can you be more specific? I'm suggesting that you use PAM auth https://www.postgresql.org/docs/current/auth-pam.html and then configure the email behavior on the PAM side. Unde

Re: Trigger when user logs in

2019-04-11 Thread Tom Lane
Ron writes: > On 4/11/19 9:12 PM, Tom Lane wrote: >> PAM is the usual suggestion > Can you be more specific? I'm suggesting that you use PAM auth https://www.postgresql.org/docs/current/auth-pam.html and then configure the email behavior on the PAM side. The PAM doc link we provided there lea

Re: Trigger when user logs in

2019-04-11 Thread Ron
On 4/11/19 9:12 PM, Tom Lane wrote: Ron writes: PCI auditors have mandated that our databases (all running v9.6) send an email when certain users log in.  Thus, I've been searching for how to do this, but without much luck. PAM is the usual suggestion Can you be more specific?  (All users ex

Re: Trigger when user logs in

2019-04-11 Thread Tom Lane
Ron writes: > PCI auditors have mandated that our databases (all running v9.6) send an > email when certain users log in.  Thus, I've been searching for how to do > this, but without much luck. PAM is the usual suggestion when you need off-the-beaten-path login behavior.

Trigger when user logs in

2019-04-11 Thread Ron
Hi, PCI auditors have mandated that our databases (all running v9.6) send an email when certain users log in.  Thus, I've been searching for how to do this, but without much luck. https://www.postgresql.org/message-id/flat/20170720204733.40f2b7eb.nagata%40sraoss.co.jp This long thread from a