Skip to content

Commit 87109d0

Browse files
Merge branch 'dnsplugins' of https://github.com/Keyfactor/acme-provider-caplugin into dnsplugins
2 parents 03b90c5 + f315c13 commit 87109d0

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

AcmeCaPlugin/AcmeCaPlugin.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,15 @@ private async Task ProcessAuthorizations(AcmeClient acmeClient, OrderDetails ord
560560
pendingChallenges.Add((authz, challenge, validation, domainValidator));
561561
}
562562

563-
// Second pass: Wait for DNS propagation and submit challenges
563+
// Wait for initial DNS propagation delay if configured
564+
if (pendingChallenges.Count > 0 && config.DnsPropagationDelaySeconds > 0)
565+
{
566+
_logger.LogInformation("Waiting {DelaySeconds} seconds for DNS propagation before verification (configured delay)...",
567+
config.DnsPropagationDelaySeconds);
568+
await Task.Delay(TimeSpan.FromSeconds(config.DnsPropagationDelaySeconds));
569+
}
570+
571+
// Second pass: Verify DNS propagation and submit challenges
564572
foreach (var (authz, challenge, validation, validator) in pendingChallenges)
565573
{
566574
// Skip external DNS verification for Infoblox since it cannot ping external DNS providers

AcmeCaPlugin/AcmeCaPluginConfig.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ public static Dictionary<string, PropertyConfigInfo> GetPluginAnnotations()
197197
Hidden = false,
198198
DefaultValue = "",
199199
Type = "String"
200+
},
201+
["DnsPropagationDelaySeconds"] = new PropertyConfigInfo()
202+
{
203+
Comments = "Time in seconds to wait after creating DNS records before checking propagation. Azure DNS typically needs 60-120 seconds, AWS Route53 needs 60 seconds. Set to 0 to skip the delay.",
204+
Hidden = false,
205+
DefaultValue = "60",
206+
Type = "Number"
200207
}
201208

202209
//Infoblox DNS

AcmeCaPlugin/AcmeClientConfig.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,9 @@ public class AcmeClientConfig
5353
// DNS Verification Settings
5454
public string DnsVerificationServer { get; set; } = null;
5555

56+
// DNS Propagation Delay (in seconds) - wait this long after creating DNS records before checking propagation
57+
// Azure DNS typically needs 60-120 seconds, AWS Route53 needs 60 seconds
58+
public int DnsPropagationDelaySeconds { get; set; } = 60;
59+
5660
}
5761
}

0 commit comments

Comments
 (0)