]> git.ipfire.org Git - thirdparty/haproxy.git/commit
EXAMPLES: lua/acme: add a dns-01 handler for Gandi LiveDNS API
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 11 Jun 2026 17:34:15 +0000 (19:34 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 11 Jun 2026 17:37:49 +0000 (19:37 +0200)
commitd2c9bf70e5c481658a7d561b58ce94de8b76a212
treedca8a9b422615bf4b6ffbdfce004c6d168b2fa65
parent4bb21dae2f75ffb237b1f9a487c3cbdcf7336e8c
EXAMPLES: lua/acme: add a dns-01 handler for Gandi LiveDNS API

This Lua script automates dns-01 ACME challenges using the Gandi LiveDNS
API v5. It subscribes to the ACME_DEPLOY event to set the required
_acme-challenge TXT record via the Gandi REST API, signals HAProxy that
the challenge is ready using ACME.challenge_ready(), then cleans up the
TXT record once the certificate is issued on ACME_NEWCERT.

The API key is read from the GANDI_API_KEY environment variable at
startup. Zone discovery is automatic: the script probes parent zones
from longest to shortest until Gandi accepts the record, which handles
both apex and wildcard certificates transparently.
examples/lua/acme-gandi-livedns.lua [new file with mode: 0644]