POST /validate/check
POST /token/init
GET /token/
DELETE /token/OATH12344
Workflows with Event Handler in privacyIDEA
Fun fact: We developed it, but we do not know what for!
What are Event handlers
Additional actions can be attached to each reqeust
Pre or Post request
...with certain conditions
Event handler classes
Notification, Token, Federation, Counter, Script
Each class comes with it's defined actions
send email, send sms, enroll token, set token info, reset failcounter, set counters, run
arbitrary scripts, forword to other privacyIDEA machine...
small code changes => big chances
counter (100 sloc), token (350 sloc)
Some handler examples
Notify the user in case of admin action
handler: Notification
event: /token/init
position: post
condition: user is an admin
action: send email to token owner
Mark tokens as being enrolled
handler: TokenHandler
event: /token/init
position: post
condition: user is an admin
action: set tokeninfo / arbitrary field
alternative action: disable token
Reset timeshift of a TOTP token in case of successful authentication
handler: TokenHandler
event: /validate/check
position: post
condition: successful auth
action: set tokeninfo / timeshift
Count failed authentications
handler: CounterHandler
event: /validate/check
position: post
condition: failed authentication
action: increase counter
Print welcome letters
handler: ScriptHandler
event: /token/init
position: post
condition: administrator / helpdesk user enrolled token
action: call a script, that prints a welcome letter
Create registration token, if the last token of a user is deleted
handler: TokenHandler
event: DEL /token
position: post
condition: number of user tokens "0"
action: enroll registration token
Enroll a token, if the user has none
handler: TokenHandler
event: /validate/check
position: pre
condition: number of user tokens "0"
action: enroll email token
Migration
Possible Migration scenarios
via RADIUS
via data migration (import seeds)
via privacyIDEA passthru policy
privacyIDEA talks to RADIUS
define (old) RADIUS server
privacyIDEA policy
forward authentication request to
old radius
migrating to privacyIDEA
No need to hurry
Users can keep their old tokens
Mix and match
500 old + 10 new
One central audit log
since all auth
requests routed in privacyIDEA