github avandeputte/haproxy-manager v2.6.0
2.6.0

57 minutes ago

2.6.0: the review's fixes, TLS to the servers, a shorter service form

The fixes from a full review of 2.5.1, and issue #46. Tested as 2.6.0-beta.1 to beta.3. Several things that used to be accepted are now refused with a reason, and a few behaviours changed — read the list before upgrading a cluster.

TLS to the servers (#46)

  • A Real Server with Encrypt to server gains Server name for TLS (sni str(name), check-sni, verifyhost), CA certificate (ca-file; empty with Verify server certificate on means the node's trust store, @system-ca — before, the tick rendered verify required with nothing to verify against, which HAProxy refuses) and Extra server arguments (appended to the server line as typed, one line).
  • The same four settings are on the service form, beside Forward to: set on every server behind the service and read back when it is edited. A server given a name of its own on Real Servers keeps it until the form's field is changed; a server an edit creates starts as the others are spoken to.
  • default-server in a pool's Extra directives is written ahead of the servers, where it applies; it used to come after them and applied to none.

The service form has an Advanced switch. Most services are a name, an address and a health check, so the form opens short. Advanced settings, at the top, reveals the rest: Balancing and timeouts and Rate limiting whole, Error pages and Rules, HSTS, the health check's interval, method, HTTP version, Host header and database user, and how the servers are spoken to (PROXY protocol, HTTP/2, TLS). Remembered per browser; on by itself when you edit a service that has any of those set, or pick a recipe that sets one. Hidden settings keep their values. The cookie name and check timeout join the form.

Secrets and sessions

  • GET /api/local no longer returns the node's secrets (API key, cookie-signing secret, second-factor seed, MCP token, peer keys): they come back as [redacted], and sending [redacted] back keeps the stored value.
  • Changing the password keeps the second factor, email, appearance and language; before, it quietly turned 2FA off — and Apply to the other nodes spread that.
  • Enrolling a second factor asks for the current password, and refuses while 2FA is already on (turn it off first).
  • The session cookie is Secure whenever it travels over HTTPS, including through the UI's own listener. Sign-in lockout counts the visitor's address and the user name.
  • Changes asked with a session cookie must come from this UI (Origin/Referer, or the JSON the page sends); every answer carries X-Frame-Options: DENY, a Content-Security-Policy, nosniff and a Referrer-Policy. The UI can no longer be shown inside another page's frame.
  • Webhook headers come back redacted from the notifications page; SMTP verifies the mail server's certificate — untick the new Verify TLS on a destination with a self-signed one.
  • /api/logout works after the session expired; the anonymous 401 no longer says the version.

Certificates and acme.sh

  • A DNS credential line must name a variable the chosen hook reads. acme.sh's own settings (ACCOUNT_CONF_PATH, LE_CONFIG_HOME, HTTPS_INSECURE, …) were accepted before and acted on as root. Quotes and control characters in credential values, EAB key ID/HMAC and a custom CA URL are refused. A stored line that fails these checks stops the issue with the reason instead of being skipped.
  • acme.sh logs at level 1 (level 2 traced every DNS API call, tokens included, into the Logs page); a configured token is struck from the log before it is shown anyway.
  • Uploaded chain certificates are each read by openssl; a certificate whose name would share a file with another (a b / a_b), or the UI certificate's name, is refused; private keys are written 0600 from the first byte; one issue per certificate at a time (a second gets 409); one broken certificate no longer ends the renewal round for the rest.
  • The "safe to copy" backup no longer carries the AD CS service-account password.
  • install.sh upgrades an older acme.sh to the pinned release, unpacks it in a directory mktemp made, and makes the data and certificate directories 0700.

Cluster

  • A push ships only the shared certificates' files; the active node's pushes were overwriting the passive nodes' own UI certificate with one for the wrong host.
  • Apply on a passive node does not push; a passive node cannot change the shared UI address; /api/setup/create and /api/setup/join answer 409 once setup is complete.
  • A received peer list is merged, not substituted. Apply fills in unicast addresses only where empty, so Apply unicast plan's values stay.
  • Adding, disabling or removing a sign-in user now shows unapplied changes.
  • /api/status reports the live fingerprint, and the cluster page withholds changed independently while nodes run different versions.
  • Cloudflare's what was last told no longer bumps the shared revision or writes a history snapshot. A malformed section in a received configuration is refused (400) instead of being saved and taking the node down.
  • Package installs (cloudflared, the CrowdSec bouncer) and DNS lookups run outside the apply lock, so a node installing a package keeps answering pushes.
  • haproxy.cfg and its .bak are 0640 root:haproxy (0600 without the group).

HAProxy rendering

  • Everything typed into a rule or object becomes a word on a cfg line; what would change the line's meaning is refused with a reason, and rendered defensively if already stored: #, quotes or line breaks in condition values (a # in a redirect used to comment out the rule's condition — every host was redirected), spaces in redirect addresses, header names that are not one word, server addresses/ports with spaces or #, non-numeric weights/ports/intervals, unknown balance algorithms. Redirect addresses and header values render quoted.
  • Two conditions, pools, services or certificates whose names come to the same cfg token are refused; a pair stored earlier renders two ACLs instead of one merged one.
  • On a TCP listener with SNI, the user's reject rules now run before the accept (they never fired).
  • A disabled pool stays in the configuration as an empty backend answering 503, so disabling a pool no longer makes every Apply fail.
  • A condition a listener cannot read (host/path/header test on TCP, TLS-name test on HTTP) is refused when added; a stored one renders with a comment. Health-check Host: name:port is rendered as typed. Rate-limit stick tables are type ipv6 (IPv4 included), so IPv6 clients are limited too.

Cloudflare

  • A service limited to countries whose rule cannot be written is not published — route and DNS record are withheld or removed for that host, and Apply names the cause. Before, three paths left the route live with no limit.
  • The country rule follows HAProxy's rule order, so a wildcard rule placed before an exact host takes that host's countries too. Conditions with several hosts or paths limit each; long expressions pack into several rules; a failed Sync now leaves Cloudflare marked behind so the next Apply retries; unpublishing removes the route before the rule.

Reliability and UI

  • One non-HTTP answer no longer kills probing for good (it left busy stuck). A failing watchdog check is logged and the next one still runs.
  • Editing an HTTPS service no longer re-enables the HTTP→HTTPS redirect you had turned off.
  • Two table cells were rendered unescaped; four pages painted over each other on fast navigation; the Stats page kept every card's HTML in an attribute.

Build, install, update

  • Releases carry SHA256SUMS; the in-app package update verifies against it. The systemd update runs a downloaded install.sh rather than a pipe, from a private directory.
  • acme.sh and acme2certifier downloads in the image are held to their digests; nfpm is pinned; the upstream-check workflow validates tag names before using them.
  • A Tests workflow runs every Python suite in the built image and the UI suite with a DOM on every push and PR.
  • The image pins HAProxy 3.4.8 for now: haproxy.debian.net's 3.4.9 depends on a libpcre2 Debian 13 does not have.

Install: ghcr.io/avandeputte/haproxy-manager:2.6.0 (also :latest), the .deb/.rpm below (verified against SHA256SUMS), the Proxmox script, or the in-app Updates page.

Don't miss a new haproxy-manager release

NewReleases is sending notifications on new releases.