Debian Codegraph @

doc/sources/admin/browseablemysqlsessionbackend.rst

raw
1 Browseable MySQL session backend
2 ================================
3
4 Prerequisites
5 -------------
6
7 First, make sure you have installed the ``DBD::mysql`` perl module.
8
9 On Debian-based distributions ::
10
11 apt install libdbd-mysql-perl
12
13 On Fedora-based distributions ::
14
15 yum install 'perl(DBD::mysql)'
16
17 Create database schema
18 ----------------------
19
20 You can find the database schema in ``/usr/share/lemonldap-ng/ressources/sessions.my.sql``.
21
22 LemonLDAP::NG configuration
23 ---------------------------
24
25 Go in the Manager and set the session module to ``Apache::Session::Browseable::MySQL`` for each session type you intend to use:
26
27 * ``General parameters`` » ``Sessions`` » ``Session storage`` » ``Apache::Session module``
28 * ``General parameters`` » ``Sessions`` » ``Persistent sessions`` » ``Apache::Session module``
29 * ``CAS Service`` » ``CAS sessions module name``
30 * ``OpenID Connect Service`` » ``Sessions`` » ``Sessions module name``
31 * ``SAML2 Service`` » ``Advanced`` » ``SAML sessions module name``
32
33 Then, set the following module options:
34
35 =================== ================================================= =============================================================
36 Required parameters
37 =================== ================================================= =============================================================
38 Name Comment Example
39 **DataSource** The `DBI <https://metacpan.org/pod/DBI>`__ string dbi:mysql:database=lemonldap-ng;port=3306
40 **UserName** The database username lemonldapng
41 **Password** The database password mysuperpassword
42 **TableName** Table name (optional) sessions
43 **Index** Fields to index refer to :ref:`fieldstoindex`
44 =================== ================================================= =============================================================
45
46
47 .. tip::
48
49 We recommend adding the `mysql_connect_timeout`, `mysql_write_timeout`, and `mysql_read_timeout` options to the DataSource string