Authorizations for connected users (always enabled):
</p>
<ul>
<liclass="level1"><divclass="li"> GET /mysession/?authorizationfor=<base64-encoded-url>: ask if url is authorizated</div>
</li>
</ul>
<p>
This session backend can be used to share sessions stored in a non-network backend (like <ahref="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, REST session backend is used by Handlers installed on external servers.
</p>
<p>
To configure it, REST session backend will be set trough Manager in global configuration (used by all Handlers), and the real session backend will be configured for local components in lemonldap-ng.ini.
Then, set <code>Lemonldap::NG::Common::Apache::Session::REST</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):
<tdclass="col0 centeralign"><strong>baseUrl</strong></td><tdclass="col1"><abbrtitle="Uniform Resource Locator">URL</abbr> of sessions REST end point </td><tdclass="col2"> http://auth.example.com/index.fcgi/sessions/global </td>
<tdclass="col0 centeralign"><strong>user</strong></td><tdclass="col1"> Username to use for auth basic mechanism </td><tdclass="col2 leftalign"></td>
</tr>
<trclass="row5 rowodd">
<tdclass="col0 centeralign"><strong>password</strong></td><tdclass="col1"> Password to use for auth basic mechanism </td><tdclass="col2 leftalign"></td>
<!-- EDIT4 TABLE [1790-2116] --><divclass="noteimportant">By default, user password and other secret keys are hidden by LLNG REST server. You can force REST server to export their real values by selecting “Export secret attributes in REST” in the manager. This less secure option is disabled by default.
Sessions REST end points access must be allowed in Apache portal configuration (for example, access by <abbrtitle="Internet Protocol">IP</abbr> range):
Real session backend will be configured in <code>lemonldap-ng.ini</code>, in <code>portal</code> section (the portal hosts the REST service for sessions, and will do the link between REST requests and real sessions).
<divclass="notetip">Session explorer and “single session” features can't be used using this backend. Session explorer and portal must be launched with real backend.
By default, only few sessions keys are shared by REST (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>
<preclass="code">+ uid cn mail</pre>
<p>
To share only the listed attributes:
</p>
<preclass="code">authenticationLevel groups ipAddr _startTime _utime _lastSeen _session_id uid cn mail</pre>