| 1 |
SOAP session backend |
| 2 |
==================== |
| 3 |
|
| 4 |
LL::NG portal provides SOAP end points for sessions management: |
| 5 |
|
| 6 |
- **sessions/**: read only access to sessions (enough for distant |
| 7 |
Handlers) |
| 8 |
- **adminSessions/**: read/write access to sessions (required for |
| 9 |
distant Portal, distant Manager or distant Handlers which modify |
| 10 |
sessions) |
| 11 |
|
| 12 |
This session backend can be used to share sessions stored in a |
| 13 |
non-network backend (like |
| 14 |
:doc:`file session backend<filesessionbackend>`) or in a network backend |
| 15 |
protected with a firewall that only accepts HTTP flows. |
| 16 |
|
| 17 |
Most of the time, SOAP session backend is used by Handlers installed on |
| 18 |
external servers. |
| 19 |
|
| 20 |
To configure it, SOAP session backend will be set through Manager in |
| 21 |
global configuration (used by all Hanlders), and the real session |
| 22 |
backend will be configured for local components in lemonldap-ng.ini. |
| 23 |
|
| 24 |
Setup |
| 25 |
----- |
| 26 |
|
| 27 |
Manager |
| 28 |
~~~~~~~ |
| 29 |
|
| 30 |
First, active SOAP in ``General parameters`` » ``Advanced parameters`` » |
| 31 |
``SOAP``. |
| 32 |
|
| 33 |
Then, set ``Lemonldap::NG::Common::Apache::Session::SOAP`` in |
| 34 |
``General parameters`` » ``Sessions`` » ``Session storage`` » |
| 35 |
``Apache::Session module`` and add the following parameters (case |
| 36 |
sensitive): |
| 37 |
|
| 38 |
=================== ============================== =========================================== |
| 39 |
Required parameters |
| 40 |
---------------------------------------------------------------------------------------------- |
| 41 |
Name Comment Example |
| 42 |
=================== ============================== =========================================== |
| 43 |
**proxy** URL of sessions SOAP end point http://auth.example.com/index.fcgi/sessions |
| 44 |
=================== ============================== =========================================== |
| 45 |
|
| 46 |
|
| 47 |
.. tip:: |
| 48 |
|
| 49 |
Use /adminSessions if the Handler need to modify the session, |
| 50 |
for example if you configured an idle timeout. |
| 51 |
|
| 52 |
By default, only few sessions keys are shared by SOAP |
| 53 |
(authenticationLevel, groups, ipAddr, \_startTime, \_utime, \_lastSeen, |
| 54 |
\_session_id), you need to define which other keys you want to share in |
| 55 |
``General parameters`` » ``Plugins`` » ``Portal servers`` » |
| 56 |
``SOAP/REST exported attributes``. |
| 57 |
|
| 58 |
You must start with ``+`` to keep default keys, else they will not be |
| 59 |
shared. For example: |
| 60 |
|
| 61 |
:: |
| 62 |
|
| 63 |
+ uid cn mail |
| 64 |
|
| 65 |
To share only the listed attributes: |
| 66 |
|
| 67 |
:: |
| 68 |
|
| 69 |
_utime _session_id uid cn mail |
| 70 |
|
| 71 |
Apache |
| 72 |
~~~~~~ |
| 73 |
|
| 74 |
Sessions SOAP end points access must be allowed in Apache portal |
| 75 |
configuration (for example, access by IP range): |
| 76 |
|
| 77 |
.. code-block:: apache |
| 78 |
|
| 79 |
# SOAP functions for sessions management (disabled by default) |
| 80 |
<Location /index.fcgi/adminSessions> |
| 81 |
Require ip 192.168.2.0/24 |
| 82 |
</Location> |
| 83 |
|
| 84 |
# SOAP functions for sessions access (disabled by default) |
| 85 |
<Location /index.fcgi/sessions> |
| 86 |
Require ip 192.168.2.0/24 |
| 87 |
</Location> |
| 88 |
|
| 89 |
Real session backend |
| 90 |
~~~~~~~~~~~~~~~~~~~~ |
| 91 |
|
| 92 |
Real session backend will be configured in ``lemonldap-ng.ini``, in |
| 93 |
``portal`` section (the portal hosts the SOAP service for sessions, and |
| 94 |
will do the link between SOAP requests and real sessions). |
| 95 |
|
| 96 |
For example, if real sessions are stored in |
| 97 |
:doc:`files<filesessionbackend>`: |
| 98 |
|
| 99 |
.. code-block:: ini |
| 100 |
|
| 101 |
[portal] |
| 102 |
globalStorage = Apache::Session::File |
| 103 |
globalStorageOptions = { 'Directory' => '/var/lib/lemonldap-ng/sessions/', 'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/', } |
| 104 |
|
| 105 |
|
| 106 |
.. tip:: |
| 107 |
|
| 108 |
If your sessions explorer is on the same server that the |
| 109 |
portal, either use the **adminSessions** end point in Manager |
| 110 |
configuration, or override the ``globalStorage`` and |
| 111 |
``globalStorageOptions`` parameters in section all (and not portal) of |
| 112 |
``lemonldap-ng.ini``. |