| 1 |
DevOps Handler |
| 2 |
============== |
| 3 |
|
| 4 |
This Handler is designed to retrieve VHost configuration from the website |
| 5 |
itself, not from LL:NG configuration. Rules and headers are set in a |
| 6 |
**rules.json** file stored at the website root directory (ie |
| 7 |
``http://website/rules.json``). This file looks like: |
| 8 |
|
| 9 |
.. code-block:: json |
| 10 |
|
| 11 |
{ |
| 12 |
"rules": { |
| 13 |
"^/admin": "$uid eq 'admin'", |
| 14 |
"default": "accept" |
| 15 |
}, |
| 16 |
"headers": { |
| 17 |
"Auth-User": "$uid" |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
If this file is not found, the default rule "accept" is applied and just |
| 22 |
"Auth-User" header is sent (Auth-User => $uid). |
| 23 |
|
| 24 |
No specific configuration is required except that: |
| 25 |
|
| 26 |
- you have to select ``DevOps`` handler type either with |
| 27 |
``VHOSTTYPE`` environment variable or in VHost options |
| 28 |
- you can set in VHost options the loopback URL requested by |
| 29 |
the DevOps handler to retrieve ``/rules.json`` or use |
| 30 |
``RULES_URL`` environment variable to set JSON file location. |
| 31 |
Default to ``http://127.0.0.1:<server-port>`` |
| 32 |
- HTTPS or redirection port can be set by using |
| 33 |
``HTTP_REDIRECT`` or ``PORT_REDIRECT`` environment variables. |
| 34 |
|
| 35 |
|
| 36 |
.. attention:: |
| 37 |
|
| 38 |
Note that DevOps handler will not compile |
| 39 |
rules.json if :doc:`Safe Jail<safejail>` is not enabled. |
| 40 |
|
| 41 |
See :doc:`SSO as a Service<ssoaas>` for more. |