Skip to content

Web Application Firewall

All HTTP(S) traffic to IsardVDI is fronted by isard-portal, an HAProxy instance. IsardVDI does not include a signature-based rule engine such as ModSecurity, Coraza, or the OWASP Core Rule Set. Instead, web application protection is implemented directly as HAProxy rules within isard-portal. This page describes the threats these rules address and their location.

Where the rules live

HAProxy configuration is assembled from fragments located in docker/haproxy/cfg/. The following fragments handle security:

Fragment Protection
_base/04_00_fe_tcp_nonsecured_begin.cfg IP blacklist/whitelist at the TCP layer.
_base/16_00_fe_http_secured_begin.cfg Bad-path rejection, security response headers, and CORS.
web/16_04_fe_http_secured_abuse.cfg Abuse and rate-limiting on the registration endpoint.
monitor/20_be_monitor.cfg JWT verification and role checks for the monitor backend.

The portal mounts site-local overrides and IP lists from the host:

  • /opt/isard-local/haproxy/cfg: Per-site custom HAProxy configuration fragments.
  • /opt/isard-local/ipsec-fw/lists: IP allow/deny lists (see below).

IP allow/deny lists

At the TCP frontend, connections are matched against blacklist and whitelist files before any HTTP processing:

  • lists/black.lst and lists/external/black.lst — blocked source IPs.
  • lists/white.lst — allowed source IPs. The whitelist takes precedence over the blacklist.

Blacklisted connections that are not whitelisted are rejected. ACME/Let's Encrypt validation requests are exempted to ensure certificate renewal continues to work. These list files are mounted from /opt/isard-local/ipsec-fw/lists.

This portal-level list is distinct from BLACKLIST_IPTABLES in isardvdi.cfg. That setting is a host-firewall control used to prevent guest VMs from reaching internal infrastructure services; it is not part of the HTTP protection layer.

Bad-path rejection

Requests to dot-prefixed paths, such as /.git and /.env, are rejected. These paths often contain sensitive repository or environment metadata.

In development mode (USAGE=devel), the /.vite/ path is allowed. This enables the Vue 3 dev server to serve its pre-bundled dependencies.

Abuse and rate limiting

The registration endpoint (/api/v4/item/user/register) is protected against abuse using an HAProxy stick-table named AbuseSystem. This table tracks the HTTP error rate for each source IP.

Sources that exceed the configured error-rate threshold are tarpitted and receive an HTTP 429 Too Many Requests response.

Additional rate-limit ACLs for general request and error rates are present in the same configuration fragment. They are currently commented out and can be enabled per deployment.

Security response headers

For non-development traffic, the portal strips fingerprinting headers and adds a hardened set of response headers:

  • Strict-Transport-Security (HSTS, with includeSubDomains; preload).
  • X-Frame-Options: DENY.
  • X-Content-Type-Options: nosniff.
  • Referrer-Policy: no-referrer.
  • X-XSS-Protection: 0.
  • Removal of Server and X-Powered-By.
  • A per-context Content-Security-Policy — a strict policy for the Vue 3 frontend, and relaxed variants for the legacy webapp, the noVNC viewer, and the monitor UI.

CORS is controlled by the CORS key in isardvdi.cfg. The default value is * for testing. Set it to your production web domain.

Backend authorization (monitor)

The monitor backend enforces a JWT check in HAProxy before proxying requests. The bearer token must meet the following requirements:

  1. It is signed with HS256.
  2. It is issued by isard-authentication with key id isardvdi.
  3. It is verified against API_ISARDVDI_SECRET.
  4. It is not expired.
  5. It carries an admin role.

Requests that fail any of these checks are denied.

Customising the rules

The protection layer uses plain HAProxy configuration. You can add site-specific rules as custom fragments under /opt/isard-local/haproxy/cfg without rebuilding the image. You can also edit IP lists under /opt/isard-local/ipsec-fw/lists.

Do not create new isardvdi.cfg keys for this purpose. WAF behavior is defined by these HAProxy fragments and lists, not by dedicated toggles.

See also