Debian Codegraph @

doc/sources/admin/checkstate.rst

raw
1 Check state plugin
2 ==================
3
4 This plugin can be used to check if portal instance is ready. This can
5 be a health check to request keep-alive service to force a fail-over on
6 the backup-node.
7
8 Configuration
9 -------------
10 To enable Check state:
11 Go in Manager, ``General Parameters`` » ``Plugins`` » ``State Check``.
12 You must also set a shared secret.
13
14 Usage
15 -----
16
17 When enabled, ``/checkstate`` URL path is handled by this plugin.
18 GET *(or POST)* parameters:
19
20 ============= ======== ============================================================
21 GET Parameter Need Value
22 ============= ======== ============================================================
23 ``secret`` required Same value as the shared secret given to the manager
24 ``sessions`` optional If set to any value, checkState tries to create/delete a session into all defined session databases *(SSO, OIDC, CAS, and SAML)*
25 ``user`` optional If set (with password), a login/logout process will be tried, else if set without password, this user is searched into users database
26 ``password`` optional
27 ============= ======== ============================================================
28
29 Response
30 --------
31
32 The plugin will respond to the HTTP request with:
33
34 * HTTP code 500 if something went wrong
35 * HTTP code 200 and the following JSON content if something went right
36
37 .. code:: json
38
39 {"result":1,"version":"2.0.14"}
40
41 .. versionadded:: 2.0.14
42 The *version* key is returned
43
44
45
46 Example
47 ~~~~~~~
48
49 - Basic availability check:
50 ``https://auth.example.com/checkstate?secret=qwerty``
51 - Try to log a user in:
52 ``https://auth.example.com/checkstate?secret=qwerty&user=dwho&password=dwho``
53 - Full test for a server that doesn't allow simple user/password authentication
54 ``https://auth.example.com/checkstate?secret=qwerty&user=dwho&sessions``
55 - Full test for a server that allow simple user/password authentication
56 ``https://auth.example.com/checkstate?secret=qwerty&user=dwho&password=dwho&sessions``