lemonldap-ng/doc/sources/admin/checkuser.rst

114 lines
3.5 KiB
ReStructuredText
Raw Normal View History

2020-05-14 23:29:41 +02:00
Check user plugin
=================
This plugin allows us to check session attributes, access rights and
transmitted headers for a specific user and URL. This can be useful for
IT Ops, dev teams or administrators to debug or check rules. Plugin
DISABLED by default.
Configuration
-------------
Just enable it in the manager (section “plugins”).
- **Parameters**:
- **Activation**: Enable / Disable this plugin
- **Identities use rule**: Rule to define which profiles can be
displayed (by example: ``!$anonymous``)
2020-05-20 22:48:54 +02:00
- **Unrestricted users rule**: Rule to define which users can check
ALL users. ``Identities use rule`` is bypassed.
2020-12-01 21:33:16 +01:00
- **Hidden attributes**: Session attributes not displayed
2020-05-14 23:29:41 +02:00
- **Attributes used for searching sessions**: User's attributes used
for searching sessions in backend if ``whatToTrace`` fails. Useful
to look for sessions by mail or givenName. Let it blank to search
by ``whatToTrace`` only.
2020-09-14 20:14:36 +02:00
- **Display computed sessions**: Rule to define which users can display a
computed session if no SSO session is found
- **Display empty headers**: Rule to define which users can display ALL headers
appended by LemonLDAP::NG including empty ones
- **Display empty values**: Rule to define which users can display ALL attributes
even empty ones
- **Display persistent session data**: Rule to define which users can display
persistent session data
2020-12-01 21:33:16 +01:00
- **Hidden headers**: Sent headers whose value is masked except for unrestricted users.
Key is a Virtualhost name and value represents a headers list.
A blank value obfuscates ALL relative Virtualhost sent headers.
Note that just valued hearders are masked.
2020-05-14 23:29:41 +02:00
2020-05-18 09:56:39 +02:00
.. note::
2020-05-14 23:29:41 +02:00
2020-12-01 21:33:16 +01:00
By example:
\* test1.example.com => ``Auth-User mail``
Just 'Auth-User' and 'mail' headers are masked if valued.
\* test2.example.com => '' ALL valued headers are masked.
Unrestricted users can see the masked headers.
.. note::
By example:
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
\* Search attributes => ``mail uid givenName``
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
If ``whatToTrace`` fails, sessions are searched by ``mail``, next
``uid`` if none session is found and so on...
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
\* Display empty headers rule => ``$uid eq "dwho"`` -> Only 'dwho' will
2020-05-18 09:56:39 +02:00
see empty headers
2020-05-14 23:29:41 +02:00
2020-05-18 09:56:39 +02:00
.. note::
2020-05-14 23:29:41 +02:00
Keep in mind that Nginx HTTP proxy module gets rid of empty
headers. If the value of a header field is an empty string then this
field will not be passed to a proxied server. To avoid misunderstanding,
2020-05-18 09:56:39 +02:00
it might be useful to not display empty headers.
2020-05-14 23:29:41 +02:00
2020-05-21 15:13:24 +02:00
.. attention::
2020-05-14 23:29:41 +02:00
Be careful to not display secret attributes.
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
checkUser plugin hidden attributes are concatenation of
``checkUserHiddenAttributes`` and ``hiddenAttributes``. You just have to
2020-05-18 09:56:39 +02:00
append checkUser specific attributes.
2020-05-14 23:29:41 +02:00
2020-05-21 15:13:24 +02:00
.. danger::
2020-05-14 23:29:41 +02:00
This plugin displays ALL user session attributes except
the hidden ones.
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
You have to restrict access to specific users (administrators, DevOps,
power users and so on...) by setting an access rule like other
VirtualHosts.
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
By example: ``$groups =~ /\bsu\b/``
2020-05-18 09:56:39 +02:00
2020-05-14 23:29:41 +02:00
To modify persistent sessions attributes ('_loginHistory \_2fDevices
notification\_' by default), edit ``lemonldap-ng.ini`` in [portal]
section:
2020-05-21 15:13:24 +02:00
.. code-block:: ini
2020-05-14 23:29:41 +02:00
[portal]
persistentSessionAttributes = _loginHistory _2fDevices notification_
Usage
-----
When enabled, ``/checkuser`` URL path is handled by this plugin.
2020-05-21 15:13:24 +02:00
.. attention::
2020-05-14 23:29:41 +02:00
With federated authentication, checkUser plugin works
2020-05-18 09:56:39 +02:00
only if a session can be found in backend.