Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f10c298
Update CHANGELOG.md
bhillkeyfactor Jul 7, 2026
936bcdc
Fix validator resolution regression for non-delegated challenges
bhillkeyfactor Jul 7, 2026
c83942b
Merge pull request #21 from Keyfactor/cname-delegation-dnsplugins
bhillkeyfactor Jul 7, 2026
c272920
docs: document CNAME delegation (proxy) lookup
bhillkeyfactor Jul 8, 2026
5d5dc40
docs: auto-generate README and documentation [skip ci]
github-actions[bot] Jul 8, 2026
fae7b6a
Merge pull request #23 from Keyfactor/cname-delegation-dnsplugins
bhillkeyfactor Jul 8, 2026
87f017a
docs: replace bundled DNS provider lists with pluggable model
bhillkeyfactor Jul 8, 2026
a19cce6
docs: auto-generate README and documentation [skip ci]
github-actions[bot] Jul 8, 2026
1e7ed48
Merge pull request #24 from Keyfactor/cname-delegation-dnsplugins
bhillkeyfactor Jul 8, 2026
389a2c4
Remove externalized DNS provider config and unused SDK dependencies
bhillkeyfactor Jul 8, 2026
3ee4807
docs: auto-generate README and documentation [skip ci]
github-actions[bot] Jul 8, 2026
4948e90
Merge pull request #25 from Keyfactor/cname-delegation-dnsplugins
bhillkeyfactor Jul 8, 2026
fda7009
Set gateway framework compatibility to 26.2
bhillkeyfactor Jul 8, 2026
37f7dd2
docs: auto-generate README and documentation [skip ci]
github-actions[bot] Jul 8, 2026
559f379
Merge pull request #26 from Keyfactor/cname-delegation-dnsplugins
bhillkeyfactor Jul 8, 2026
e8a1625
Update AcmeCaPlugin.csproj
bhillkeyfactor Jul 21, 2026
d2ee088
docs: auto-generate README and documentation [skip ci]
github-actions[bot] Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions AcmeCaPlugin/AcmeCaPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,21 +685,38 @@ private async Task ProcessAuthorizations(AcmeClient acmeClient, OrderDetails ord
async () => await cnameResolver.ResolveChallengeTargetAsync(validation.DnsRecordName),
detail: $"from {validation.DnsRecordName}");

// Decide which name to resolve the DNS provider plugin against. The framework
// matches validators against the (wildcard) domain patterns configured per
// provider, keyed on the certificate/zone name (e.g. *.keyfactor.ssl4saas.com)
// -- NOT the _acme-challenge record name. So:
// * No delegation -> resolve on the cert domain (www.example.com), exactly
// as before delegation support existed.
// * CNAME delegated -> resolve on the terminal target (host.validation-zone),
// so the provider that owns the delegation zone is chosen.
// Note the resolver returns the original name unchanged when no CNAME exists,
// and that original name still carries the _acme-challenge prefix, which would
// not match the configured wildcard -- hence the explicit branch here.
bool isDelegated = !string.Equals(
recordName?.TrimEnd('.'),
validation.DnsRecordName?.TrimEnd('.'),
StringComparison.OrdinalIgnoreCase);
var validatorLookupName = isDelegated ? recordName : domain;

var domainValidator = flow.Step($"ResolveValidator:{domain}",
() =>
{
var v = _validatorFactory.ResolveDomainValidator(recordName, DNS_CHALLENGE_TYPE);
var v = _validatorFactory.ResolveDomainValidator(validatorLookupName, DNS_CHALLENGE_TYPE);
if (v == null)
{
throw new InvalidOperationException(
$"Failed to resolve domain validator for '{recordName}' (challenge for '{domain}'). " +
$"Failed to resolve domain validator for '{validatorLookupName}' (challenge for '{domain}'). " +
"Ensure the appropriate DNS provider plugin is deployed and configured for the zone that hosts the (possibly CNAME-delegated) challenge record.");
}
return v;
});

_logger.LogInformation("Using domain validator: {ValidatorType} for record: {RecordName} (domain: {Domain})",
domainValidator.GetType().Name, recordName, domain);
_logger.LogInformation("Using domain validator: {ValidatorType} resolved on {LookupName} (record: {RecordName}, domain: {Domain}, delegated: {Delegated})",
domainValidator.GetType().Name, validatorLookupName, recordName, domain, isDelegated);

await flow.StepAsync($"StageValidation:{domain}",
async () =>
Expand Down
30 changes: 3 additions & 27 deletions AcmeCaPlugin/AcmeCaPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand All @@ -22,32 +22,8 @@
<PackageReference Include="System.Drawing.Common" Version="10.0.2" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="9.0.5" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="9.0.5" />

<!-- DNS Provider dependencies - REMOVE THESE after migrating all providers to plugins -->
<!-- TODO: These should be removed once all DNS providers are moved to separate plugin projects -->
<!-- Google DNS - MIGRATED to Keyfactor.DnsProvider.Google plugin -->
<!-- <PackageReference Include="Google.Apis.Dns.v1" Version="1.69.0.3753" /> -->

<!-- AWS Route53 - TODO: Migrate to plugin -->
<PackageReference Include="AWSSDK.Core" Version="4.0.3.11" />
<PackageReference Include="AWSSDK.Route53" Version="4.0.8.8" />

<!-- Azure DNS - TODO: Migrate to plugin -->
<PackageReference Include="Azure.Identity" Version="1.14.0" />
<PackageReference Include="Azure.ResourceManager.Cdn" Version="1.4.0" />
<PackageReference Include="Azure.ResourceManager.Dns" Version="1.1.1" />

<!-- RFC2136 - TODO: Migrate to plugin -->
<PackageReference Include="ARSoft.Tools.Net" Version="3.6.0" />

<!-- Cloudflare - TODO: Migrate to plugin (uses standard HTTP client) -->

<!-- NS1 - TODO: Migrate to plugin (uses standard HTTP client) -->

<!-- Infoblox - TODO: Migrate to plugin (uses standard HTTP client) -->

<!-- Public Suffix - TODO: Evaluate if needed in core or per-provider -->
<PackageReference Include="Nager.PublicSuffix" Version="3.5.0" />
<!-- DnsClient (above) is used for CNAME delegation resolution and TXT propagation checks.
DNS provider SDKs now live in their own externalized DNS provider plugins. -->
</ItemGroup>
<ItemGroup>
<None Update="manifest.json">
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.4.0
# v2.0.0
* Dns Plugin Support
* Cname Proxy Support

Expand Down
Loading