You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
5.9 KiB
120 lines
5.9 KiB
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>documentation:2.0:impersonation</title>
|
|
<meta name="generator" content="DokuWiki"/>
|
|
<meta name="robots" content="index,follow"/>
|
|
<meta name="keywords" content="documentation,2.0,impersonation"/>
|
|
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
|
|
<link rel="start" href="impersonation.html"/>
|
|
<link rel="contents" href="impersonation.html" title="Sitemap"/>
|
|
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.bootstrap3.css"/>
|
|
<!-- //if:usedebianlibs
|
|
<link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
|
|
//elsif:useexternallibs
|
|
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
|
|
//elsif:cssminified
|
|
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
|
|
//else -->
|
|
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
|
|
<!-- //endif -->
|
|
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:2.0';var JSINFO = {"id":"documentation:2.0:impersonation","namespace":"documentation:2.0"};
|
|
/*!]]>*/</script>
|
|
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script>
|
|
<!-- //if:usedebianlibs
|
|
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
|
|
//elsif:useexternallibs
|
|
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
|
|
//elsif:jsminified
|
|
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
|
|
//else -->
|
|
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
|
|
<!-- //endif -->
|
|
<!-- //if:usedebianlibs
|
|
<script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
|
|
//elsif:useexternallibs
|
|
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
|
|
//elsif:jsminified
|
|
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.min.js"></script>
|
|
//else -->
|
|
<script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.js"></script>
|
|
<!-- //endif -->
|
|
</head>
|
|
<body>
|
|
<div class="dokuwiki export container">
|
|
|
|
<h1 class="sectionedit1" id="impersonation_plugin">Impersonation plugin</h1>
|
|
<div class="level1">
|
|
|
|
<p>
|
|
This plugin allows certain users to assume the identity of another user. A privileged user first logs in with its real account and can then choose another profile to appear as. This feature can be especially useful for training/learning or development platforms.
|
|
</p>
|
|
<div class="noteimportant">This plugin should not be used on production instance, prefer <a href="contextswitching.html" class="wikilink1" title="documentation:2.0:contextswitching">ContextSwitching plugin</a>.
|
|
</div>
|
|
</div>
|
|
<!-- EDIT1 SECTION "Impersonation plugin" [1-432] -->
|
|
<h2 class="sectionedit2" id="configuration">Configuration</h2>
|
|
<div class="level2">
|
|
|
|
<p>
|
|
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 protected from being impersonated.
|
|
</p>
|
|
<ul>
|
|
<li class="level1"><div class="li"> <strong>Parameters</strong>:</div>
|
|
<ul>
|
|
<li class="level2"><div class="li"> <strong>Use rule</strong>: </div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="level1"><div class="li"> Select which users may use this plugin</div>
|
|
<ul>
|
|
<li class="level2"><div class="li"> <strong>Identities use rule</strong>: Rule to define which identities can be assumed. Useful to prevent impersonation of certain sensitive identities like CEO, administrators or anonymous/protected users.</div>
|
|
</li>
|
|
<li class="level2"><div class="li"> <strong>Hidden attributes</strong>: Attributes not displayed</div>
|
|
</li>
|
|
<li class="level2"><div class="li"> <strong>Skip empty values</strong>: Do not use empty profile attributes</div>
|
|
</li>
|
|
<li class="level2"><div class="li"> <strong>Merge spoofed and real <abbr title="Single Sign On">SSO</abbr> groups</strong>: Can be useful for administrators to keep higher privileges. "Special rule" field can be used to set <abbr title="Single Sign On">SSO</abbr> groups to merge if exist in real session. Multivalue <code>separator</code> is used. By example : <code>su; admins; anonymous</code></div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="notewarning">You HAVE TO modify <strong>REMOTE_USER</strong> to log both real AND spoofed uid.
|
|
<p>
|
|
Set a macro like this :
|
|
</p>
|
|
|
|
<p>
|
|
<code> _whatToTrace -> $real__user ? "$real__user/$_user" : "$_user/$_user" </code>
|
|
</p>
|
|
|
|
<p>
|
|
and set <code>Genaral Parameters > Logs > REMOTE_USER</code> with <code> _whatToTrace </code>
|
|
</p>
|
|
|
|
</div><div class="noteimportant">Both spoofed and real session attributes can be used to set access rules, groups or macros.
|
|
<p>
|
|
By example : <code>$real_uid eq 'dwho</code>' or <code>$real_groups =~ /\bsu\b/</code>
|
|
</p>
|
|
|
|
<p>
|
|
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.
|
|
</p>
|
|
|
|
</div><div class="noteimportant">By example, to prevent impersonation as 'dwho' set <strong>Identities use rule</strong> like :
|
|
<p>
|
|
<code> $uid ne 'dwho' </code>
|
|
</p>
|
|
|
|
</div>
|
|
<p>
|
|
impersonationPrefix is used to rename user's real profile attributes. You can set real attributes prefix ('real_' by default) by editing <code>lemonldap-ng.ini</code> in section [portal]:
|
|
</p>
|
|
<pre class="code file ini"><span class="re0"><span class="br0">[</span>portal<span class="br0">]</span></span>
|
|
<span class="re1">impersonationPrefix</span> <span class="sy0">=</span><span class="re2"> real_</span></pre>
|
|
|
|
</div>
|
|
<!-- EDIT2 SECTION "Configuration" [433-] --></div>
|
|
</body>
|
|
</html>
|
|
|