Event Handler - Mail Alert

Hello,

How can I setup an email alert when specific user are logged in ?
I can send email alert when the token is locked out but can not find the other way to do it for logged users

is it a feature already available ?

What do you mean by this?

What do you mean by this?

What do you mean by this?

Hello @cornelinux ,

For the Event Handler about the token locked after 10 failed attempts:

image

When a user tried 10 times to connects to the VPN with MFA auth (privacyidea)

What I want to do is create a similar Event Handler, that will mail alert when a specific group of user is connecting: (we have an IT Service Provider who are doing Support for a specific software and we need to monitor their access).

We do not have a syslog server yet who receive the VPN logs and can not trigger from the syslog. That is why I want to do it temporary on privacyidea server.

I was wondering if it is possible to create an Even Handler, with Events “validate_check”, with Handler module ‘UserNotification’ and position “post”.

image

But if this event handler is enabled, user that have a token can not log in anymore, as if the Event Handler prevent it.

image

The error shown in log when the event is enabled and monitor the token and user tried to connect.

I succedeed by selecting theses informations but it alerts for all user connecting to the VPN with MFA.

image

The alert is sended by mail.

image

I tried to alert on specific token but can not success.

If you have any idea it would be helpful !

I have created multiple Event Handler looking for specific token, when this token is connecting I should receive a mail alert.

image

The result is that even if I specify the serial token, it alert me for every user connecting.

But if I disabled all event except one, the condition is working and the alert is send only if the specific token is connecting, other token does not trigger the Event.

Is it possible to specifiy multiple token in the condition “serial” ?

See the note here: 8. Event Handler — privacyIDEA 3.9 documentation

The the docs for the condition serial!

Thanks. As I was not able to do it properly.

I configured the mail alert directly form OpenVPN ‘client-connect’ and ‘client-disconnect’ call.