Search

Controller-UI security settings

Controller-UI security settings

These examples cover various TLS and CSRF related settings.

Running without TLS

The Controller-UI runs in plaintext-mode as a default, but it assumes running behind a TLS-terminating reverse proxy or dedicated TLS terminator such as Hitch. As a result, HTTPS-specific CSRF checks are active as long as they are not turned off with the -no-tls parameter.

If you use a plaintext connection without the -no-tls parameter, any login attempt will fail with a Forbidden - origin invalid error message.

The start command of the Controller-UI should look like this:

varnish-controller-ui -api-hosts=http://api-gw:8002 -no-tls

Turning off the Forbidden - origin invalid message when using HTTPS

If you run the Controller-UI behind Varnish or any other reverse proxy and get the Forbidden - origin invalid error message when trying to log in, make sure that the reverse proxy does not modify the Host header.

Preserving the Host header in Varnish

In Varnish (both Varnish Enterprise and the open source Varnish Cache), do not modify the req.http.host variable in your VCL.

Preserving hte Host header in nginx

If you run the Controller-UI behind nginx and get the Forbidden - origin invalid error message, add the following configuration directive behind your proxy_pass ... entry:

proxy_set_header Host $http_host;

®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203