Debian Codegraph @

doc/sources/admin/sessions.rst

raw
1 Sessions
2 ========
3
4 LL::NG rely on a session mechanism with the session ID as a shared
5 secret between the user (in :doc:`SSO cookie<ssocookie>`) and the
6 :ref:`session database<start-sessions-database>`.
7
8 To configure sessions, go in Manager, ``General Parameters`` »
9 ``Sessions``:
10
11 - **Store user password in session**: see
12 :doc:`password store documentation<passwordstore>`
13 - **Display session identifier**: should the session ID be displayed in the manager's session explorer. The session ID is a sensitive information that should only be shown to highly trusted administrators
14 - **Sessions timeout**: maximum lifetime of a session. Old sessions are
15 deleted by a cron script
16 - **Sessions activity timeout**: maximum inactivity duration
17 - **Sessions update interval**: minimum interval used to update session
18 when activity timeout is set
19
20
21 .. danger::
22
23 Session activity timeout requires Handlers to have a write
24 access to sessions database.
25
26 - **Opening conditions**: rules which are evaluated before granting
27 session, see :doc:`Grant Session plugin documentation<grantsession>`
28 - **Log application access**: record OIDC/SAML/CAS application access
29 to session. This can be used to define custom display rules based on
30 previous access to application by user.
31 - **Sessions storage**: you can define here which session backend to
32 use, with the backend options. See
33 :ref:`sessions database configuration<start-sessions-database>` to
34 know which modules you can use. Here are some global options that you
35 can use with all sessions backends:
36
37 - **generateModule**: allows one to override the default module that
38 generates sessions identifiers. For security reasons, we recommend
39 to use
40 Lemonldap::NG::Common::Apache::Session::Generate::SHA256
41 - **IDLength**: length of sessions identifiers. Max is 32 for MD5
42 and 64 for SHA256
43
44 - **Multiple sessions**, you can restrict the number of open sessions:
45
46 - **One session per user**: when a user logs in, all their previous
47 sessions are removed
48 - **One IP address per user**: when a user logs in, all their
49 previous sessions on a different IP address are removed
50 - **One user per IP address**: when a user logs in, all sessions
51 that belong to a different user on that IP address are removed
52 - **Display deleted sessions**: display deleted sessions on
53 authentication phase.
54 - **Display other sessions**: display other sessions on
55 authentication phase, with a link to delete them.
56
57 - **Persistent sessions**: are used for storing users log in history,
58 2F devices, OIDCConsents and so on. Heavy organizations may have to
59 disable persistent sessions storage to avoid too many database
60 tuples.
61
62 - **Disable storage**: do not store user persitent sessions
63
64
65 .. attention::
66
67 Note that since HTTP protocol is not connected,
68 restrictions are not applied to the new session. The oldest are
69 destroyed.
70
71 Command-line tools
72 ==================
73
74 .. versionadded:: 2.0.9
75
76 You can use the ``lemonldap-ng-sessions`` tool to search, update or delete sessions. See a few examples in :ref:`the examples page <cli-sessions>`
77
78 .. deprecated:: 2.0.10
79
80 - LLNG Portal provides a simple tool to delete a session:
81 ``llngDeleteSession``. To use it, simply give it the user identifier
82 *(wildcard are authorized)*:
83
84 .. code-block:: shell
85
86 # Delete all sessions opened by user "dwho"
87 $ llngDeleteSession dwho
88 # Delete all sessions opened by user starting with "dh"
89 $ llngDeleteSession dh*
90 # Delete all sessions:
91 $ llngDeleteSession *
92
93 .. tip::
94
95 For sessions purge see :doc:`timers <timers>`