lemonldap-ng/doc/pages/documentation/current/soapsessionbackend.html
2019-04-09 22:26:40 +02:00

173 lines
8.2 KiB
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title>documentation:2.0:soapsessionbackend</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="documentation,2.0,soapsessionbackend"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
<link rel="start" href="soapsessionbackend.html"/>
<link rel="contents" href="soapsessionbackend.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:soapsessionbackend","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">
<!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>
<ul class="toc">
<li class="level1"><div class="li"><a href="#setup">Setup</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#manager">Manager</a></div></li>
<li class="level2"><div class="li"><a href="#apache">Apache</a></div></li>
<li class="level2"><div class="li"><a href="#real_session_backend">Real session backend</a></div></li>
</ul></li>
</ul>
</div>
</div>
<!-- TOC END -->
<h1 class="sectionedit1" id="soap_session_backend">SOAP session backend</h1>
<div class="level1">
<p>
<abbr title="LemonLDAP::NG">LL::NG</abbr> portal provides SOAP end points for sessions management:
</p>
<ul>
<li class="level1"><div class="li"> <strong>sessions/</strong>: read only access to sessions (enough for distant Handlers)</div>
</li>
<li class="level1"><div class="li"> <strong>adminSessions/</strong>: read/write access to sessions (required for distant Portal, distant Manager or distant Handlers which modify sessions)</div>
</li>
</ul>
<p>
This session backend can be used to share sessions stored in a non-network backend (like <a href="filesessionbackend.html" class="wikilink1" title="documentation:2.0:filesessionbackend">file session backend</a>) or in a network backend protected with a firewall that only accepts HTTP flows.
</p>
<p>
Most of the time, SOAP session backend is used by Handlers installed on external servers.
</p>
<p>
To configure it, SOAP session backend will be set trough Manager in global configuration (used by all Hanlders), and the real session backend will be configured for local components in lemonldap-ng.ini.
</p>
</div>
<!-- EDIT1 SECTION "SOAP session backend" [1-832] -->
<h2 class="sectionedit2" id="setup">Setup</h2>
<div class="level2">
</div>
<!-- EDIT2 SECTION "Setup" [833-851] -->
<h3 class="sectionedit3" id="manager">Manager</h3>
<div class="level3">
<p>
First, active SOAP in <code>General parameters</code> » <code>Advanced parameters</code> » <code>SOAP</code>.
</p>
<p>
Then, set <code>Lemonldap::NG::Common::Apache::Session::SOAP</code> in <code>General parameters</code> » <code>Sessions</code> » <code>Session storage</code> » <code>Apache::Session module</code> and add the following parameters (case sensitive):
</p>
<div class="table sectionedit4"><table class="inline table table-bordered table-striped">
<thead>
<tr class="row0 roweven">
<th class="col0 centeralign" colspan="3"> Required parameters </th>
</tr>
<tr class="row1 rowodd">
<th class="col0 centeralign"> Name </th><th class="col1 centeralign"> Comment </th><th class="col2 centeralign"> Example </th>
</tr>
</thead>
<tr class="row2 roweven">
<td class="col0 centeralign"> <strong>proxy</strong> </td><td class="col1"> <abbr title="Uniform Resource Locator">URL</abbr> of sessions SOAP end point </td><td class="col2"> http://auth.example.com/index.fcgi/sessions </td>
</tr>
</table></div>
<!-- EDIT4 TABLE [1163-1324] --><div class="notetip">Use /adminSessions if the Handler need to modify the session, for example if you configured an idle timeout.
</div>
<p>
By default, only few sessions keys are shared by SOAP (authenticationLevel, groups, ipAddr, _startTime, _utime, _lastSeen, _session_id), you need to define which other keys you want to share in <code>General parameters</code> » <code>Plugins</code> » <code>Portal servers</code> » <code>SOAP/REST exported attributes</code>.
</p>
<p>
You must start with <code>+</code> to keep default keys, else they will not be shared. For example:
</p>
<pre class="code">+ uid cn mail</pre>
<p>
To share only the listed attributes:
</p>
<pre class="code">_utime _session_id uid cn mail</pre>
</div>
<!-- EDIT3 SECTION "Manager" [852-1949] -->
<h3 class="sectionedit5" id="apache">Apache</h3>
<div class="level3">
<p>
Sessions SOAP end points access must be allowed in Apache portal configuration (for example, access by <abbr title="Internet Protocol">IP</abbr> range):
</p>
<pre class="code file apache"><span class="co1"># SOAP functions for sessions management (disabled by default)</span>
&lt;<span class="kw3">Location</span> /index.fcgi/adminSessions&gt;
<span class="kw1">Require</span> 192.168.2.0/<span class="nu0">24</span>
&lt;/<span class="kw3">Location</span>&gt;
&nbsp;
<span class="co1"># SOAP functions for sessions access (disabled by default)</span>
&lt;<span class="kw3">Location</span> /index.fcgi/sessions&gt;
<span class="kw1">Require</span> 192.168.2.0/<span class="nu0">24</span>
&lt;/<span class="kw3">Location</span>&gt;</pre>
</div>
<!-- EDIT5 SECTION "Apache" [1950-2375] -->
<h3 class="sectionedit6" id="real_session_backend">Real session backend</h3>
<div class="level3">
<p>
Real session backend will be configured in <code>lemonldap-ng.ini</code>, in <code>portal</code> section (the portal hosts the SOAP service for sessions, and will do the link between SOAP requests and real sessions).
</p>
<p>
For example, if real sessions are stored in <a href="filesessionbackend.html" class="wikilink1" title="documentation:2.0:filesessionbackend">files</a>:
</p>
<pre class="code file ini"><span class="re0"><span class="br0">&#91;</span>portal<span class="br0">&#93;</span></span>
<span class="re1">globalStorage</span> <span class="sy0">=</span><span class="re2"> Apache::Session::File</span>
<span class="re1">globalStorageOptions</span> <span class="sy0">=</span><span class="re2"> <span class="br0">&#123;</span> 'Directory' <span class="sy0">=</span>&gt; '/var/lib/lemonldap-ng/sessions/', 'LockDirectory' <span class="sy0">=</span>&gt; '/var/lib/lemonldap-ng/sessions/lock/', <span class="br0">&#125;</span></span></pre>
<div class="notetip">If your sessions explorer is on the same server that the portal, either use the <strong>adminSessions</strong> end point in Manager configuration, or override the <code>globalStorage</code> and <code>globalStorageOptions</code> parameters in section all (and not portal) of <code>lemonldap-ng.ini</code>.
</div>
</div>
<!-- EDIT6 SECTION "Real session backend" [2376-] --></div>
</body>
</html>