Skip to content

Commit d126c0d

Browse files
Merge branch 'next' into mouss-user-guide-general-updates
2 parents 23f541a + 2101112 commit d126c0d

File tree

8 files changed

+151
-15
lines changed

8 files changed

+151
-15
lines changed

doc/contributing.rst

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,18 +243,6 @@ Install the database
243243
docker exec -it elabftw bin/init db:install
244244
245245
246-
* Enable debug mode to disable the caching of Twig templates
247-
248-
.. code-block:: bash
249-
250-
# go back to where elabctl is present
251-
cd $dev
252-
./elabctl mysql
253-
# you are now on the mysql command line
254-
mysql> update config set conf_value = '1' where conf_name = 'debug';
255-
exit;
256-
exit
257-
258246
Finishing up
259247
^^^^^^^^^^^^
260248

@@ -508,3 +496,20 @@ Locally: current workaround:
508496
./node_modules/.bin/cypress open
509497
510498
Not great, not terrible.
499+
500+
Debugging mysql queries
501+
=======================
502+
503+
Connect as root in the MySQL container:
504+
505+
.. code-block:: bash
506+
507+
docker exec -it mysql
508+
mysql -uroot -p$MYSQL_ROOT_PASSWORD
509+
mysql> SET GLOBAL general_log = ON;
510+
# check where it is saved
511+
mysql> SHOW VARIABLES WHERE Variable_name IN ('general_log','log_output','general_log_file');
512+
# exit mysql
513+
tail -f /var/lib/mysql/abcd1234.log
514+
515+
This will log ALL queries.

doc/coordinator-guide.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. _coordinator-guide:
2+
3+
*****************
4+
Coordinator guide
5+
*****************
6+
7+
What is an Instance Coordinator
8+
===============================
9+
10+
An instance coordinator helps manage the users in an instance. For example, they may add and remove users from different teams, and help to implement exit strategies for users and data. More information about the utility of this role and helpful strategies will be added soon!
11+
12+
13+
Different strategies for managing users in teams
14+
================================================
15+
16+
When a user leaves a team
17+
-------------------------
18+
19+
In eLabFTW, there are currently several options for handling the data of users who are about to leave a team. Here are four exit strategies to consider:
20+
21+
1. Archiving the user and their entries
22+
If a person is only a member of one team, they can be archived. In this process, it's possible to choose whether their associated entries should also be locked and archived. This method ensures a clean separation, but it is only suitable if the person belongs to a single team. If the person is active in multiple teams, archiving them would also archive them in the other teams, which is usually not desired.
23+
2. Adjusting visibility and write permissions
24+
Another exit strategy involves explicitly setting the visibility and write permissions of the entries for the team the person is leaving. To ensure that the entries remain visible to the team after the user’s departure, the corresponding permissions for all entries need to be updated. This can be done by a team admin as a bulk action through the admin control panel. This way, the team retains access to experiments and entries without the person remaining part of the team.
25+
3. Transferring ownership or duplicating entries
26+
Another option is to transfer ownership of the entries to another team member. Alternatively, relevant entries can be duplicated before the person is removed from the team. Once a person is removed from the team, their entries are no longer visible to the team, which also means that the original ownership becomes unclear. To avoid this, the name of the original creator can be added to the entry title or stored as a tag to make the data origin more transparent.
27+
4. Restricting the visibility of entries
28+
Instead of removing the person from the team, they can remain a member while limiting the visibility of their entries. Access rights can be managed so that only the original owner and admins have access to certain entries. This ensures that the person leaving the team cannot access information irrelevant to them, while still technically remaining in the team.

doc/generalities.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Let's define a few terms first:
1414
* **Admin**: a user with Admin rights for a given team has access to the Admin Panel and can manage settings related to their Team. A given user can be Admin in Team A and User in Team B
1515
* **User**: a user with an account on the Instance, belonging to at least one Team
1616

17+
We could also mention the role of **Instance Coordinator**, someone identified by the Users as the person to go to for all things eLab in the institution. It might be Research Data Managers, or a designated Researcher or Engineer that is very familiar with eLabFTW. This person could have access to managing the relationship between users and teams. They could animate the internal chat room related to eLabFTW usage.
18+
1719
General principles
1820
==================
1921

doc/import-export.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,21 @@ Now you need to have a column named **title**. This is the column that will be p
152152

153153
If you wish to include tags during the import, specify a column "tags" that will contain the tags separated by a "|" character. You can also have a "metadata" column containing JSON. The same logic applies to "metadata" column which can contain JSON that will be included in the metadata of the created entry.
154154
155+
How columns are processed
156+
"""""""""""""""""""""""""
157+
158+
* ``title`` becomes ``title``
159+
* ``body`` becomes the main text (HTML). If you wish to import markdown, have a column ``content_type`` with value `2` (`1` being for HTML content)
160+
* ``date`` becomes the user defined date. Prefer YYYY-MM-DD format
161+
``category_title`` and ``status_title`` will become the category or status (a new category/status will be created if necessary)
162+
``metadata`` will be processed as eLabFTW metadata (in JSON)
163+
``tags`` will get added as tags, they must be separated by ``|`` character
164+
``canread``, ``canwrite`` and ``canbook`` are the JSON permissions suitable for eLabFTW
165+
``rating``, if present, must be a value between 0 and 5 (stars rating)
166+
167+
The rest of the columns will get added as Text Extra field.
168+
169+
155170
Once you are satisfied with the file, export it as a **.csv** (in File > Save as...). Make a copy of only the first 3 rows and export that too as csv, this will be our test file.
156171

157172
2. Importing the file

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Join the `chat room <https://gitter.im/elabftw/elabftw>`_ if you want to ask a q
6666
user-guide
6767
admin-guide
6868
sysadmin-guide
69+
coordinator-guide
6970
import-export
7071
inventory
7172
metadata

doc/install.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The following MySQL modes are known to work fine with eLabFTW codebase:
5353
Strongly recommended dependencies
5454
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5555
* `curl <https://curl.haxx.se/>`_, to get files from command line (very likely already installed)
56-
* `docker compose plugin <https://docs.docker.com/compose/install/>`_, the tool to orchestrate containers, required by `elabctl`. It can be installed with the `docker-compose-plugin` package.
56+
* `docker compose plugin <https://docs.docker.com/compose/install/>`_, the tool to orchestrate containers, required by `elabctl`. It can be installed with the `docker-compose-plugin` package. You might need to enable Docker repositories to get this plugin. Make sure to **NOT** use the old `docker-compose` package/tool but to use the actual `compose plugin` of Docker, which might or might not come with Docker depending on your distribution/method of installation.
5757
* `dialog <https://en.wikipedia.org/wiki/Dialog_(software)>`_, required by `elabctl install`
5858
* `borgbackup <https://borgbackup.readthedocs.io/en/stable/>`_, a backup tool required by `elabctl backup`. Not required during installation.
5959

@@ -144,6 +144,8 @@ Start eLabFTW
144144
145145
elabctl start
146146
147+
Then go to section :ref:`Initialize your database <db-init>`.
148+
147149

148150
Without elabctl (advanced users)
149151
--------------------------------
@@ -159,6 +161,8 @@ Edit this file and ``docker compose up -d`` to launch the containers.
159161
Initialize your database
160162
========================
161163

164+
.. _db-init:
165+
162166
* Import the database structure with:
163167

164168
.. code-block:: bash

doc/sysadmin-guide.rst

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,40 @@ Configure authentication :sup:`(optional)`
7373

7474
eLabFTW currently supports four authentication mechanisms:
7575

76-
* Local authentication: email + password stored locally, this is the default
76+
* Local authentication: email + password stored locally (in the eLabFTW database), this is the default
7777
* SAML authentication: use one or several Identity Provider (IDP) to authenticate users. See dedicated :ref:`SAML documentation page <saml>`.
7878
* LDAP authentication: verify the login with an LDAP service. See dedicated :ref:`LDAP documentation page <ldap>`.
79-
* External authentication: use request headers added by your own middleware to authenticate the user (e.g. Apache's auth_mellon)
79+
* External authentication: use request headers added by your own middleware to authenticate the user (_e.g._ Apache's auth_mellon)
8080

8181
It is possible to have several mechanisms at the same time but recommended to only leave one visible to users. So if you configure LDAP or SAML, disable the Local login so Users are not confused.
8282

83+
Example configuration 1: only Admins can create accounts
84+
--------------------------------------------------------
85+
86+
If you want to prevent users from registering accounts from the Register page but still want to allow Admins to create local user accounts in their team, use these settings:
87+
88+
- enable "Admins can create local accounts" from the Server tab of Sysconfig panel (it is enabled by default)
89+
- in the Local Auth tab, disable "Enable local account creation"
90+
91+
Example configuration 2: accounts can only be created from SAML
92+
---------------------------------------------------------------
93+
94+
If you want user accounts to only exist through a valid SAML response, use these settings:
95+
96+
- disable "Admins can create local accounts" from the Server tab of Sysconfig panel (it is enabled by default)
97+
- in the Local Auth tab, disable "Enable local account creation" and "Show local login form"
98+
- in the SAML tab, set "If the user doesn't exist yet, what to do?" to "Create the user on the fly"
99+
100+
Example configuration 3: use LDAP mainly, but allow Admins to create local user accounts for external collaborators
101+
-------------------------------------------------------------------------------------------------------------------
102+
103+
Configure the LDAP settings from the LDAP tab. Then you have a choice: you can either mask local login form with "Show local login form" disabled from the Local Auth tab, or keep it enabled and users can select "Local" or "LDAP" from the login page (LDAP will be selected by default), which might be confusing to some users (as they don't know what Local or LDAP corresponds to). It's up to you. If you mask local login, external collaborators will need to append "?letmein" to the login page URL so they can select Local login.
104+
105+
Make sure that "Admins can create local accounts" from first tab is enabled, and that if you have a filter on email domains, the external collaborators emails can fit.
106+
107+
Help, I'm locked out!
108+
---------------------
109+
83110
If you disabled Local authentication and cannot login back because your other method fails, you'll want to run this SQL query (`elabctl mysql` will give you a MySQL prompt if you're using Dockerized MySQL service):
84111

85112
.. code-block:: mysql
@@ -334,3 +361,14 @@ In some contexts, it might be advantageous to use S3 backed storage for uploaded
334361
3. In the Sysconfig panel, configure your bucket from the "UPLOADS" tab, test by uploading a file in an experiment
335362
4. Once S3 is correctly configured, run ``bin/console uploads:migrate``. This will copy all your locally stored files into the S3 bucket
336363
5. The final step is to remove the bind mounted ``/elabftw/uploads/`` folder from the container runtime configuration
364+
365+
Command line tools
366+
==================
367+
368+
The container comes with two CLI tools: ``bin/console`` and ``bin/init``. They provide utilities for Sysadmins such as team export as .eln.
369+
370+
You can list available commands with ``bin/console list`` or ``bin/init list``.
371+
372+
Example: ``docker exec -it elabftw bin/console list``.
373+
374+
Check a command manual with ``-h`` flag. For example: ``bin/console prune:experiments -h``.

doc/user-guide.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,49 @@ This timestamp archive is immutable and cannot be modified or deleted.
239239

240240
The archived zip
241241

242+
Verifying the timestamp
243+
"""""""""""""""""""""""
244+
245+
To verify locally the validity of the timestamp, you can use ``openssl`` with a command similar to:
246+
247+
.. code:: bash
248+
249+
openssl ts -verify -CAfile /etc/ssl/cert.pem -data /path/to/X-timestamped.json -in /path/to/X-timestamped.asn1 -text
250+
251+
If it was signed with a certificate trusted on your system, it should output "Verification: OK". You can also check the token content directly with:
252+
253+
.. code:: bash
254+
255+
openssl ts -reply -in /path/to/X-timestamped.asn1 -text
256+
257+
The output should look like:
258+
259+
.. code-block:: console
260+
261+
Using configuration from /etc/ssl/openssl.cnf
262+
Status info:
263+
Status: Granted.
264+
Status description: Operation Okay
265+
Failure info: unspecified
266+
267+
TST info:
268+
Version: 1
269+
Policy OID: 1.3.6.1.4.1.22177.300.22.1
270+
Hash Algorithm: sha256
271+
Message data:
272+
0000 - 5a 58 7b 86 c3 a6 79 27-35 b8 4d 57 bc 5a 7e 80 ZX{...y'5.MW.Z~.
273+
0010 - 52 89 92 60 0b 8d 03 d4-f2 9e 4a 4c 6d ec 91 a4 R..`......JLm...
274+
Serial number: 0xCDAB07382DF7B1BBE0CC970E93A7625B63F4DB7A
275+
Time stamp: Jul 16 23:07:34 2025 GMT
276+
Accuracy: unspecified
277+
Ordering: no
278+
Nonce: unspecified
279+
TSA: unspecified
280+
Extensions:
281+
282+
The "Time stamp" line gives you the timestamp time. The "Hash Algorithm" and "Message data" should correspond to the digest of the data file (the .json). Compare it with: ``openssl dgst -sha256 /path/to/X-timestamped.json``
283+
284+
242285

243286
6. Blockchain timestamp
244287
^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)