Debian Codegraph @

doc/sources/admin/checkuser.rst

raw
1 Check user plugin
2 =================
3
4 This plugin allows us to check session attributes, access rights and
5 transmitted headers for a specific user and URL. This can be useful for
6 IT Ops, dev teams or administrators to debug or check rules. Plugin
7 DISABLED by default.
8
9 Configuration
10 -------------
11
12 Just enable it in the manager (section “plugins”).
13
14 - **Parameters**:
15
16 - **Activation**: Enable / Disable this plugin
17 - **Identities use rule**: Rule to define which profiles can be
18 displayed (by example: ``!$anonymous``)
19 - **Unrestricted users rule**: Rule to define which users can check
20 ALL users and attributes.
21 - **Hidden attributes**: Session attributes not displayed except for unrestricted users
22 - **Attributes used for searching sessions**: User's attributes used
23 for searching sessions in backend if ``whatToTrace`` fails. Useful
24 to look for sessions by mail or givenName. Let it blank to search
25 by ``whatToTrace`` only
26 - **Hidden headers**: Sent headers whose value is masked except for unrestricted users.
27 Key is a VirtualHost name and value represents a space-separated headers list.
28 A blank value obfuscates ALL relative VirtualHost sent headers.
29 Note that just valued hearders are masked.
30
31 - **Display**:
32
33 - **Computed sessions**: Rule to define which users can display a
34 computed session if no SSO session is found
35 - **Persistent session data**: Rule to define which users can display
36 persistent session data
37 - **Normalized headers**: Rule to define which users can see headers name sent by
38 the web server (see RFC3875)
39 - **Empty headers**: Rule to define which users can display ALL headers
40 sent by LemonLDAP::NG including empty ones
41 - **Empty values**: Rule to define which users can display empty values
42 - **Hidden attributes**: Rule to define which users can display hidden attributes
43 - **History**: Rule to define which users can display logins history
44
45 .. note::
46
47 By example:
48
49 \* test1.example.com => ``Auth-User mail``
50 Just 'Auth-User' and 'mail' headers are masked if valued.
51
52 \* test2.example.com => '' ALL valued headers are masked.
53
54 Unrestricted users can see the masked headers.
55
56
57 .. note::
58
59 By example:
60
61 \* Search attributes => ``mail, uid, givenName``
62
63 If ``whatToTrace`` fails, sessions are searched by ``mail``, next
64 ``uid`` if none session is found and so on...
65
66 \* Display empty headers rule => ``$uid eq "dwho"`` -> Only 'dwho' will
67 see empty headers
68
69
70 .. note::
71
72 Keep in mind that Nginx HTTP proxy module gets rid of empty
73 headers. If the value of a header field is an empty string then this
74 field will not be passed to a proxied server. To avoid misunderstanding,
75 it might be useful to not display empty headers.
76
77
78 .. attention::
79
80 Be careful to not display secret attributes.
81
82 checkUser plugin hidden attributes are concatenation of
83 ``checkUserHiddenAttributes`` and ``hiddenAttributes``. You just have to
84 append checkUser specific attributes.
85
86
87 .. danger::
88
89 This plugin displays ALL user session attributes except
90 the hidden ones.
91
92 You have to restrict access to specific users (administrators, DevOps,
93 power users and so on...) by setting an access rule like other
94 VirtualHosts.
95
96 By example: ``$groups =~ /\bsu\b/``
97
98
99
100 To modify persistent sessions attributes ('_loginHistory \_2fDevices
101 notification\_' by default), edit ``lemonldap-ng.ini`` in [portal]
102 section:
103
104 .. code-block:: ini
105
106 [portal]
107 persistentSessionAttributes = _loginHistory _2fDevices notification_
108
109 Usage
110 -----
111
112 When enabled, ``/checkuser`` URL path is handled by this plugin.
113
114
115 .. attention::
116
117 With federated authentication, checkUser plugin works
118 only if a session can be found in backend.