Impersonation plugin

This plugin allows us to use identity of another user. User have to log in with its real account and can choose to use an another profile. Can be useful for training/learning or development platforms.

Configuration

Just enable it in the Manager (section “plugins”) by setting a rule. Impersonation can be allowed or denied for specific users. Furthermore, specific identities like administrators or anonymous users can be forbidden to impersonate.

You HAVE TO modify REMOTE_USER to log both real AND spoofed uid.

Set a macro like this :

_whatToTrace -> $real__user ? "$real__user / $_user" : $_user / $_user

and set Genaral Parameters > Logs > REMOTE_USER with _whatToTrace

Both spoofed and real session attributes can be used to set access rules, groups or macros.

By example : $real_uid eq 'dwho' or $real_groups =~ /\bsu\b/

Keep in mind that real session is computed first. Afterward, if access is granted, impersonated session is computed with real and spoofed session attributes if Impersonation is allowed.

By example, to prevent impersonation with 'dwho' set Identities use rule like :

$uid ne 'dwho'