Conversation
check for duplicate PEMs
change default start sync date for first incremental sync
removing caching of product type list
change default incremental sync range
shorten incremental sync if it is too long
* add duplicate support * Update generated docs --------- Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io>
* improve BouncyCastle parsing * add duplicate support * Update generated docs * Merge 2.2.0 to main * fix for smime profile type * template parameter to include client auth eku * Update generated docs * changelog and logging * check for duplicate PEMs * change default start sync date for first incremental sync * removing caching of product type list * change default incremental sync range * version * changelog * shorten incremental sync if it is too long * feat: release v2.2.0 * add duplicate support * Update generated docs --------- Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> --------- Co-authored-by: David Galey <dgaley@keyfactor.com> Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> Co-authored-by: Dave Galey <89407235+dgaley@users.noreply.github.com> Co-authored-by: Sean <1661003+spbsoluble@users.noreply.github.com> * treat needs_approval the same as pending on enrollments and don't return failure code * Update generated docs * Merge 2.2.1 to main (#49) * fix for smime profile type * template parameter to include client auth eku * Update generated docs * changelog and logging * check for duplicate PEMs * change default start sync date for first incremental sync * removing caching of product type list * change default incremental sync range * version * changelog * shorten incremental sync if it is too long * feat: release v2.2.0 * add duplicate support * Update generated docs --------- Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> * Dev 2.2 (#47) * add duplicate support * Update generated docs * treat needs_approval the same as pending on enrollments and don't return failure code * Update generated docs --------- Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> --------- Co-authored-by: David Galey <dgaley@keyfactor.com> Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> Co-authored-by: Dave Galey <89407235+dgaley@users.noreply.github.com> Co-authored-by: Sean <1661003+spbsoluble@users.noreply.github.com> * Merge to main (#48) * fix for smime profile type * template parameter to include client auth eku * Update generated docs * changelog and logging * check for duplicate PEMs * change default start sync date for first incremental sync * removing caching of product type list * change default incremental sync range * version * changelog * shorten incremental sync if it is too long * add duplicate support * Update generated docs * treat needs_approval the same as pending on enrollments and don't return failure code * Update generated docs --------- Co-authored-by: David Galey <dgaley@keyfactor.com> Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> Co-authored-by: Dave Galey <89407235+dgaley@users.noreply.github.com> Co-authored-by: Sean <1661003+spbsoluble@users.noreply.github.com> * Update CHANGELOG.md (#50) * add option for kdc/smartcardlogon eku, fix template validation * Update generated docs * changelog --------- Co-authored-by: Sean <1661003+spbsoluble@users.noreply.github.com> Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> Co-authored-by: Morgan Gangwere <470584+indrora@users.noreply.github.com>
* add product ID filter to sync * Update generated docs * add Intel vPro EKU support * Update generated docs * fix for renewal of smime certs * validation for intel vpro eku * fix for template validation * changelog --------- Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io>
* add product ID filter to sync * Update generated docs * add Intel vPro EKU support * Update generated docs * fix for renewal of smime certs * validation for intel vpro eku * fix for template validation * changelog * check for existance of template parameter fields --------- Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io>
automated domain validation functionality
There was a problem hiding this comment.
🟡 Changes recommended
A duplicate CheckDCV member prevents compilation, and automated validation has unresolved enrollment and error-handling issues.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This merge updates the DigiCert CertCentral plugin for AnyCA Gateway 26.2.0 with configurable DNS validation and updated framework dependencies.
Changes:
- Adds TXT/CNAME DNS validation support.
- Updates target frameworks, dependencies, and metadata.
- Updates configuration, documentation, and release notes.
File summaries
| File | Description |
|---|---|
README.md |
Documents compatibility and DNS settings. |
integration-manifest.json |
Updates framework metadata and configuration descriptions. |
digicert-certcentral-caplugin/digicert-certcentral-caplugin.csproj |
Updates target frameworks and dependencies. |
digicert-certcentral-caplugin/Constants.cs |
Adds DNS configuration constants. |
digicert-certcentral-caplugin/Client/CertCentralClient.cs |
Adds DCV check client support. |
digicert-certcentral-caplugin/CertCentralConfig.cs |
Adds DNS configuration properties. |
digicert-certcentral-caplugin/CertCentralCAPlugin.cs |
Implements DNS validation and enrollment handling. |
CHANGELOG.md |
Records release notes. |
Review details
Suppressed comments (5)
digicert-certcentral-caplugin/CertCentralCAPlugin.cs:1297
- This error string opens a parenthesized validation-type segment but never closes it, producing malformed log/status text. Add the closing
)before the newline.
errors.Add($"Failed to resolve DNS provider plugin for '{dom}' (validation type '{validType}'\nError: {ex.Message}");
digicert-certcentral-caplugin/CertCentralCAPlugin.cs:1281
- When
DnsValidationEnabledis true whileDnsValidationMethodremains at the documented defaultemail, every order that returns a DCV token reaches this branch and throws because onlytxtandcnameare accepted for automation. The connector annotations do not reject this combination, so enabling the new flag with the default settings breaks enrollment; reject the combination up front or handleemailas non-automated validation.
string validType = "";
if (string.Equals(dcvMethod, "dns-txt-token"))
validType = "dns-01";
else if (string.Equals(dcvMethod, "dns-cname-token"))
validType = "cname";
else
throw new Exception($"For automated DNS validation, validation type must be either 'txt' or 'cname'");
digicert-certcentral-caplugin/CertCentralCAPlugin.cs:536
- The connector UI description has the same mismatch: it promises TXT-based requests while the code supports CNAME and fails for the default
emailwhen automation is enabled. Clarify that automated validation requirestxtorcnameand uses the configured method.
Comments = "Enable automated DNS (TXT or CNAME) domain control validation. When enabled, the plugin " +
"requests TXT-based validation from DigiCert and publishes the returned record via the " +
"DNS provider plugin resolved by the AnyCA Gateway. Requires a DNS provider plugin (e.g. Azure, " +
digicert-certcentral-caplugin/CertCentralCAPlugin.cs:1315
- When
StageValidationreports a provider failure, this code returnsEXTERNALVALIDATION, but automated mode does not put the token inEnrollmentContext; the sync path only reads DigiCert status and never retriesStageValidation. A transient DNS-provider failure can therefore leave the order pending indefinitely. Preserve a retryable validation context or add a retry path before returning.
if (result == null || !result.Success)
{
var msg = result?.ErrorMessage ?? "unknown error";
errors.Add($"Failed to publish DNS validation record for '{dom}': {msg}");
}
digicert-certcentral-caplugin/CertCentralCAPlugin.cs:1324
DVCheckDCVResponsecarries the actualdcv_statusandorder_status, but this condition only tests the transport-levelStatus(which is successful for a successful JSON response). A pending DCV check can therefore take theelsepath, attempt to download a certificate, and fail instead of returningEXTERNALVALIDATION; branch on the response status fields before retrieving the chain.
var dcvcheck = client.DVCheckDCV(new DVCheckDCVRequest((int)orderID));
if (dcvcheck.Status == CertCentralBaseResponse.StatusType.ERROR)
{
- Files reviewed: 8/8 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| public DVCheckDCVResponse CheckDCV(DVCheckDCVRequest request) | ||
| { | ||
| CertCentralResponse response = Request(request); | ||
|
|
||
| DVCheckDCVResponse checkDCVResponse = new DVCheckDCVResponse(); | ||
| if (!response.Success) | ||
| { | ||
| Errors errors = JsonConvert.DeserializeObject<Errors>(response.Response); | ||
| checkDCVResponse.Status = CertCentralBaseResponse.StatusType.ERROR; | ||
| checkDCVResponse.Errors = errors.errors; | ||
| } | ||
| else | ||
| { | ||
| checkDCVResponse = JsonConvert.DeserializeObject<DVCheckDCVResponse>(response.Response); | ||
| } | ||
| return checkDCVResponse; |
| var certChain = client.GetCertificateChain(new CertificateChainRequest(orderResponse.CertificateId.Value.ToString())); | ||
| string certPem = certChain.Intermediates.SingleOrDefault(c => c.SubjectCommonName.Equals(commonName, StringComparison.OrdinalIgnoreCase))?.PEM; |
| * **DnsValidationMethod** - The DNS validation method to use. Default value is 'email'. Other valid values are 'txt' and 'cname' If using automated DNS validation, 'txt' is the preferred method. | ||
| * **DnsValidationEnabled** - Enable automated DNS (TXT or CNAME) domain control validation. When enabled, the plugin requests TXT-based validation from DigiCert and publishes the returned record via the DNS provider plugin resolved by the AnyCA Gateway. Requires a DNS provider plugin (e.g. Azure, Cloudflare, etc) to be deployed and configured on the gateway. When disabled, requests that require validation will be flagged as External Validation, and the validation token, if needed depending on the DNS Validation method, will be returned. |
| } | ||
| else | ||
| { | ||
| _logger.LogWarning($"Unexpeted DCV method '{_config.DnsValidationMethod}'. Falling back to default of 'email'"); |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0</TargetFrameworks> | ||
| <TargetFrameworks>net8.0;net10.0</TargetFrameworks> |
| }, | ||
| { | ||
| "name": "DnsValidationEnabled", | ||
| "description": "Enable automated DNS (TXT or CNAME) domain control validation. When enabled, the plugin requests TXT-based validation from DigiCert and publishes the returned record via the DNS provider plugin resolved by the AnyCA Gateway. Requires a DNS provider plugin (e.g. Azure, Cloudflare, etc) to be deployed and configured on the gateway. When disabled, requests that require validation will be flagged as External Validation, and the validation token, if needed depending on the DNS Validation method, will be returned." |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved critical enrollment-status handling and additional configuration/order-management issues remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (11)
Use DCV payload status before downloading the certificate · New This adds a secondCheckDCV(DVCheckDCVRequest)method; the class already contains the same… Validate DNS automation configuration before creating orders · New Use DigiCert's actual DCV method for reissues · New Unlike the existing certificate-download paths, this ignorescertChain.Statusbefore… Document the configured DNS validation method · New Fix malformed validation type diagnostic · New The manifest repeats the same misleading claim that automation requests TXT validation even though… The target list now dropsnet6.0and addsnet10.0, but the installation instructions still tell… The warning contains the typoUnexpeted, which is exposed in gateway logs. Please correct it to… This documentation says enabling automation requests TXT validation, but the implementation honors…
| var dcvcheck = client.DVCheckDCV(new DVCheckDCVRequest((int)orderID)); | ||
| if (dcvcheck.Status == CertCentralBaseResponse.StatusType.ERROR) |
| else | ||
| throw new Exception($"For automated DNS validation, validation type must be either 'txt' or 'cname'"); |
|
|
||
| _logger.LogTrace("Attempting to reissue certificate."); | ||
| return await ExtractEnrollmentResult(client, client.ReissueCertificate(reissueRequest), commonName); | ||
| return await ExtractEnrollmentResult(client, client.ReissueCertificate(reissueRequest), commonName, dcvMethod); |
| Comments = "Enable automated DNS (TXT or CNAME) domain control validation. When enabled, the plugin " + | ||
| "requests TXT-based validation from DigiCert and publishes the returned record via the " + |
| } | ||
| catch (Exception ex) | ||
| { | ||
| errors.Add($"Failed to resolve DNS provider plugin for '{dom}' (validation type '{validType}'\nError: {ex.Message}"); |



Merge dev-3.0 to main - Automated PR