HTTPS, proxy and load balancer
The four ways to run Bugsoft Portal over HTTPS, and what Bugsoft Portal needs from the network.
Bugsoft Portal only works over HTTPS: secure cookies and the session need it. install.sh offers four ways
(--tls):
- Let's Encrypt: a free certificate, renewed automatically. The default.
- Your own certificate: from your own certificate authority or supplier.
- A proxy or load balancer does the HTTPS in front of the server.
- Self-signed: only for a test.
Let's Encrypt (default)
A free certificate that is renewed automatically. Conditions: the address points to this server in DNS, and ports 80 and 443 can be reached from the internet.
sudo ./install.sh --tls letsencrypt --acme-email it@klaverveld.example
The script checks the DNS, gets the certificate with certbot (through /var/www/letsencrypt), and adds a hook
that reloads the web server after every renewal.
On Oracle Linux, Rocky, Alma and RHEL, certbot is only in EPEL, an extra package source. The script asks first whether
that is allowed (or pass --enable-epel). Do you not want EPEL? Then choose your own certificate or a proxy.
Your own certificate
sudo ./install.sh --tls certificate --tls-cert /etc/pki/tls/certs/portal.pem --tls-key /etc/pki/tls/private/portal.key
The certificate file holds the full chain: first the certificate of the portal, then the intermediate certificates. The script checks that the key belongs to the certificate, that the certificate is valid for the address (subjectAltName), and how many days it is still valid.
To renew the certificate, replace the files and reload the web server. sudo bugsoft status warns you 30 days
before it expires.
Behind a proxy or load balancer
If a reverse proxy, WAF or load balancer does the HTTPS, this server only listens on port 80, on one address:
sudo ./install.sh --tls proxy --listen 10.20.0.15 --proxies 10.20.0.2,10.20.0.3
--listen: the address of this server that the proxy connects to. If the proxy is on the same server, use127.0.0.1.--proxies: the addresses of the proxy (stored inTRUSTED_PROXIES). Bugsoft Portal only trusts the headersX-Forwarded-ForandX-Forwarded-Protofrom these addresses.- The proxy sends
X-Forwarded-Proto: https, and uses/healthzas its health check. - Let the firewall open port 80 only for the proxy.
Self-signed (only for a test)
--tls selfsigned makes a certificate for one year in /etc/bugsoft/tls. Browsers warn about it.
Only use it on a test server without internet.
Outgoing traffic: no proxy
Bugsoft Portal does not use a proxy for outgoing traffic. Signing in with Microsoft and
fetching groups only work when this server may reach login.microsoftonline.com and
graph.microsoft.com directly, on port 443.
install.sh checks this at the start, and tells you if it fails. Then ask your network team to open those two
addresses for this server. The mail server (if you use e-mail) must also be reachable directly. The full list is on
Outbound connections.
Stuck? See Questions and problems or contact Bugsoft at ugurs156@gmail.com.