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

42 lines
1.2 KiB
ReStructuredText
Raw Normal View History

2020-05-14 23:29:41 +02:00
DevOps Handler
==============
2022-02-05 00:14:19 +01:00
This Handler is designed to retrieve VHost configuration from the website
2022-01-02 22:45:25 +01:00
itself, not from LL:NG configuration. Rules and headers are set in a
2020-05-14 23:29:41 +02:00
**rules.json** file stored at the website root directory (ie
2020-05-18 09:56:39 +02:00
``http://website/rules.json``). This file looks like:
2020-05-14 23:29:41 +02:00
2020-05-21 15:13:24 +02:00
.. code-block:: json
2020-05-14 23:29:41 +02:00
{
"rules": {
"^/admin": "$uid eq 'admin'",
2020-05-21 15:13:24 +02:00
"default": "accept"
2020-05-14 23:29:41 +02:00
},
"headers": {
"Auth-User": "$uid"
}
}
If this file is not found, the default rule "accept" is applied and just
"Auth-User" header is sent (Auth-User => $uid).
No specific configuration is required except that:
2022-02-05 00:14:19 +01:00
- you have to select ``DevOps`` handler type either with
``VHOSTTYPE`` environment variable or in VHost options
- you can set in VHost options the loopback URL requested by
the DevOps handler to retrieve ``/rules.json`` or use
``RULES_URL`` environment variable to set JSON file location.
Default to ``http://127.0.0.1:<server-port>``
- HTTPS or redirection port can be set by using
``HTTP_REDIRECT`` or ``PORT_REDIRECT`` environment variables.
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
2022-01-02 22:45:25 +01:00
Note that DevOps handler will not compile
rules.json if :doc:`Safe Jail<safejail>` is not enabled.
2020-05-14 23:29:41 +02:00
2022-01-02 22:45:25 +01:00
See :doc:`SSO as a Service<ssoaas>` for more.