documentation:2.1:devopshandler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:2.1:devopshandler [2019/01/15 15:55] (current)
Line 1: Line 1:
 +====== DevOps Handler ======
 +
 +This handler is designed to read vhost configuration from the website itself not from LL:NG configuration. Rules and headers are set in a **rules.json** file stored at the website root directory (ie ''<nowiki>http://website/rules.json</nowiki>''). This file looks like:
 +<file json rules.json>
 +{
 +  "rules": {
 +    "^/admin": "$uid eq 'admin'",
 +    "default": "accept'
 +  },
 +  "headers": {
 +    "Auth-User": "$uid"
 +  }
 +}
 +</file>
 +
 +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:
 +  * you have to choose this specific handler //(directly by using ''VHOSTTYPE'' environment variable)//
 +  * you can set the loopback URL needed by the DevOps handler to get ''/rules.json'' or use ''RULES_URL'' parameter to set JSON file path //(see [[ssoaas|SSO as a Service]])//. Default to ''<nowiki>http://127.0.0.1:<server-port></nowiki>''
 +
 +<note important>Note that DevOps handler will refuse to compile rules.json if [[safejail|Safe Jail]] isn't enabled.</note>
 +
 +See [[ssoaas|SSO as a Service]] for more