Skip to content

Server

Under the server config option the (http) server can be configured.

port

integer 15661 optional

The port config option is used to set the port at which OFFA starts the webserver and listens for incoming requests. Will only be used if tls is not used. If tls is enabled port 443 will be used (and optionally port 80).

config.yaml
server:
    port: 4242

tls

Under the tls config option settings related to tls can be configured. It is unlikely that one enables tls since a reverse proxy will be used in most cases.

If tls is enabled port 443 will be used.

config.yaml
server:
    tls:
        enabled: true
        redirect_http: true
        cert: /path/to/cert
        key: /path/to/key

enabled

boolean true optional

If set to false tls will be disabled. Otherwise, it will automatically be enabled, if cert and key are set.

redirect_http

boolean true optional

The redirect_http option determines if port 80 should be redirected to port 443 or not.

cert

file path required for TLS

The cert option is set to the tls cert file.

key

file path required for TLS

The key option is set to the tls key file.

trusted_proxies

list of strings optional

The trusted_proxies option is used to configure a list of trusted proxies by IP address or network range (CIDR notation). If set, only requests from those proxies / networks are accepted at the forward auth endpoint and other requests are not accepted. Without setting this option all requests are accepted.

config.yaml
server:
    trusted_proxies:
        - "10.0.0.0/8"
        - "172.16.0.0/12"
        - "192.168.0.0/16"
        - "fc00::/7"

paths

mapping / object optional

The paths option is used to set (custom) uri paths for the different endpoints.

config.yaml
server:
    paths:
        login: /login
        forward_auth: /auth

login

string /login optional

The login option can be used to set the uri path under which the login endpoint is served.

The login endpoint will serve a webinterface where the user can select an OpenID Provider and log in. After a successful login, OFFA sets a session cookie and can redirect the user to the target page.

If OFFA is used with apache and AuthMemCookie only the login endpoint is needed.

forward_auth

string /auth optional

The forward_auth option can be used to set the uri path under which the forward auth endpoint is served.

The forward auth endpoint will receive auth requests from the reverse proxy. OFFA checks if the user is authenticated and authorised to access the requested uri and return the response to the proxy. If the user is not authenticated, the request is redirected to the login endpoint.