From 6df3662077824f15704e6fbc3c15fa07f527565e Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Thu, 2 Apr 2026 16:15:12 +0200 Subject: [PATCH] MEDIUM: acme: split the initial delay from the retry DNS delay The previous ACME_RSLV_WAIT state served a dual role: it applied the initial dns-delay before the first DNS probe and also handled the delay between retries. There was no way to simply wait a fixed delay before submitting the challenge without also triggering DNS pre-checks. Replace ACME_RSLV_WAIT with two distinct states: - ACME_INITIAL_DELAY: an optional initial wait before proceeding, only applied when "challenge-ready" includes the new "delay" keyword - ACME_RSLV_RETRY_DELAY: the delay between resolution retries, always applied when DNS pre-checks are in progress The new "delay" keyword in "challenge-ready" can be used standalone (wait then submit the challenge directly) or combined with "dns" (wait then start the DNS pre-checks). When "delay" is not set, the first DNS probe fires immediately. Update the documentation accordingly. --- doc/configuration.txt | 30 +++++++++++---- include/haproxy/acme-t.h | 4 +- src/acme.c | 82 ++++++++++++++++++++++++++++++---------- 3 files changed, 88 insertions(+), 28 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 45b948603..9f4d1ef6d 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -32290,14 +32290,19 @@ challenge-ready [,]* option is independent of the CLI command, so no human intervention is required. + delay - apply an initial wait of "dns-delay" before proceeding. Without + "dns", the challenge is submitted after the delay expires. When + combined with "dns", the initial wait is applied before starting + the DNS pre-checks. + none - no readiness condition; the challenge is submitted to the ACME server immediately without waiting for any external confirmation. This option cannot be combined with others. - Multiple values can be combined with a comma so that both conditions must be - met. The order of the values is not significant. When "cli" and "dns" are - combined, HAProxy first waits for the CLI confirmation before triggering the - DNS propagation check. + Multiple values can be combined with a comma. When several conditions are + specified, HAProxy processes them in the following order: first it waits for + the CLI confirmation ("cli"), then applies the initial delay ("delay"), then + performs the DNS pre-checks ("dns"). This option is only compatible with the dns-01 challenge type. @@ -32322,9 +32327,20 @@ directory directory https://acme-staging-v02.api.letsencrypt.org/directory dns-delay