From 2fc236207fff2db5b58314adc0dc0c5add2b3b19 Mon Sep 17 00:00:00 2001
From: Morgan Gangwere <470584+indrora@users.noreply.github.com>
Date: Mon, 13 Jul 2026 08:48:03 -0700
Subject: [PATCH 1/6] Merge 1.1.2 to main (#13)
* Release: 1.0.1
Signed-off-by: Morgan Gangwere
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#6)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#10)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
* Change incremental sync to use GetModifiedOrders API call
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Release 1.1
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
* Change incremental sync to use GetModifiedOrders API call
* Merge 1.1.1 to main (#11)
* Release: 1.0.1
Signed-off-by: Morgan Gangwere
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#6)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#10)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
* Change incremental sync to use GetModifiedOrders API call
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
---------
Signed-off-by: Morgan Gangwere
Co-authored-by: Dave Galey <89407235+dgaley@users.noreply.github.com>
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Add 30 day window from expiration for doing a renewal instead of a reissue
* changelog
* documentation
* Update generated docs
---------
Signed-off-by: Morgan Gangwere
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
Co-authored-by: Morgan Gangwere <470584+indrora@users.noreply.github.com>
---------
Signed-off-by: Morgan Gangwere
Co-authored-by: Dave Galey <89407235+dgaley@users.noreply.github.com>
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
---
CHANGELOG.md | 6 ++++--
README.md | 5 ++++-
docsource/configuration.md | 5 ++++-
globalsign-mssl-caplugin/GlobalSignCAPlugin.cs | 2 +-
4 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index db145fe..6d68ee8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,5 +5,7 @@ v1.0
Remove retry logic around reissue pickups
1.1.1
-Change incremental sync to use GetModifiedOrders API call
-Remove retry logic around reissue pickups
+Change incremental sync to use GetModifiedOrders API call
+
+1.1.2
+Add 30 day window from expiration for doing renewals instead of reissues
diff --git a/README.md b/README.md
index d58ec3f..d0ce3a5 100644
--- a/README.md
+++ b/README.md
@@ -133,12 +133,15 @@ This extension uses the contact information of the GCC Domain point of contact f
GlobalSign supports specific combinations of SAN types with certain GlobalSign products. For example, a Private IP can only be used as a SAN with a `PV_INTRA` Certificate.
Please refer to the GlobalSign documentation for more information on SAN usage: [GlobalSign MSSL API User Guide (Section 2.2.5)](https://www.globalsign.com/en/repository/globalsign-mssl-api-user-guide.pdf)
-## Enrollment Fields
+## Enrollment
### Required Enrollment Fields
The following fields are required for enrollment on all certificate templates:
- **ContactName**: Set Data Type to 'string' when creating the field. The name of the contact person for the certificate. This is required by the GlobalSign API.
+### Renewal vs Reissue
+Currently, the gateway determines whether to do a renew or reissue based on the expiration date of the certificate in question. If it is within 30 days of expiration, the gateway will do a renew; otherwise, it will do a reissue.
+
### PV_INTRA Specific Enrollment Fields
The following fields are available for use in the enrollment of `PV_INTRA` Certificates:
- **PrivateDomain**: Set Data Type to 'string' when creating the field. Set to `true` if enrolling a certificate for a private domain (e.g., `.local`, `.lab`, etc.).
diff --git a/docsource/configuration.md b/docsource/configuration.md
index b6afe0d..ea208a3 100644
--- a/docsource/configuration.md
+++ b/docsource/configuration.md
@@ -24,12 +24,15 @@ GlobalSign supports specific combinations of SAN types with certain GlobalSign p
Please refer to the GlobalSign documentation for more information on SAN usage: [GlobalSign MSSL API User Guide (Section 2.2.5)](https://www.globalsign.com/en/repository/globalsign-mssl-api-user-guide.pdf)
-## Enrollment Fields
+## Enrollment
### Required Enrollment Fields
The following fields are required for enrollment on all certificate templates:
- **ContactName**: Set Data Type to 'string' when creating the field. The name of the contact person for the certificate. This is required by the GlobalSign API.
+### Renewal vs Reissue
+Currently, the gateway determines whether to do a renew or reissue based on the expiration date of the certificate in question. If it is within 30 days of expiration, the gateway will do a renew; otherwise, it will do a reissue.
+
### PV_INTRA Specific Enrollment Fields
The following fields are available for use in the enrollment of `PV_INTRA` Certificates:
- **PrivateDomain**: Set Data Type to 'string' when creating the field. Set to `true` if enrolling a certificate for a private domain (e.g., `.local`, `.lab`, etc.).
diff --git a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
index d6ec046..1aa848d 100644
--- a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
+++ b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
@@ -427,7 +427,7 @@ public async Task Enroll(string csr, string subject, Dictionar
expirationDate = localcert.RevocationDate;
}
- if (expirationDate < DateTime.Now) renewal = true;
+ if (expirationDate.Value.AddDays(-30) < DateTime.Now) renewal = true; // 30 day renewal window
if (renewal)
{
Logger.LogDebug(
From 831249cb4776f31ae7966843b1b5b47eea172823 Mon Sep 17 00:00:00 2001
From: Morgan Gangwere <470584+indrora@users.noreply.github.com>
Date: Thu, 27 Aug 2026 16:25:05 -0700
Subject: [PATCH 2/6] Merge 1.1.3 to main (#15)
* Release: 1.0.1
Signed-off-by: Morgan Gangwere
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#6)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#10)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
* Change incremental sync to use GetModifiedOrders API call
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Release 1.1
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
* Change incremental sync to use GetModifiedOrders API call
* Merge 1.1.1 to main (#11)
* Release: 1.0.1
Signed-off-by: Morgan Gangwere
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#6)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Dev 1.1 (#10)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
* Change incremental sync to use GetModifiedOrders API call
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
---------
Signed-off-by: Morgan Gangwere
Co-authored-by: Dave Galey <89407235+dgaley@users.noreply.github.com>
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
* Add 30 day window from expiration for doing a renewal instead of a reissue
* changelog
* documentation
* Update generated docs
---------
Signed-off-by: Morgan Gangwere
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
Co-authored-by: Morgan Gangwere <470584+indrora@users.noreply.github.com>
* Dev 1.1 (#14)
* Update to provide "Enabled" flag support for SAAS deployment.
* Update generated docs
* Fixing build.
* Fixes for enabled.
* Update generated docs
* More fixes.
* remove retry logic for reissue pickup
* changelog
* Update keyfactor-bootstrap-workflow.yml
* Update keyfactor-bootstrap-workflow.yml
* Change incremental sync to use GetModifiedOrders API call
* Add 30 day window from expiration for doing a renewal instead of a reissue
* changelog
* documentation
* Update generated docs
* domain matching logging
---------
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
Co-authored-by: Morgan Gangwere <470584+indrora@users.noreply.github.com>
---------
Signed-off-by: Morgan Gangwere
Co-authored-by: Dave Galey <89407235+dgaley@users.noreply.github.com>
Co-authored-by: Mark Kachkaev
Co-authored-by: Keyfactor
---
.../GlobalSignCAPlugin.cs | 170 ++++++++++--------
1 file changed, 98 insertions(+), 72 deletions(-)
diff --git a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
index 1aa848d..ba38f6e 100644
--- a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
+++ b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
@@ -270,91 +270,112 @@ public async Task Enroll(string csr, string subject, Dictionar
List matchedDomains = new List();
- // only try to resolve a domain if we don't already have a commonName
- if (string.IsNullOrWhiteSpace(commonName))
- {
- // 1) Try IP SANs first
- if (ipSans != null)
- foreach (var ipSan in ipSans)
- {
- if (string.IsNullOrWhiteSpace(ipSan))
- continue;
-
- var tempDomains = validDomains
- .Where(d =>
- !string.IsNullOrEmpty(d?.DomainName) &&
- ipSan.EndsWith($".{d.DomainName}", StringComparison.OrdinalIgnoreCase)
- ).ToList();
-
- if (tempDomains != null && tempDomains.Count > 0)
- {
- Logger.LogDebug($"ipSAN Domain match found for ipSAN: {ipSan}");
- matchedDomains = tempDomains;
- commonName = ipSan;
- break;
- }
- }
-
- // 2) If still not found, try DNS SANs
- if (domain == null && dnsSans != null)
- foreach (var dnsSan in dnsSans)
- {
- if (string.IsNullOrWhiteSpace(dnsSan))
- continue;
-
- var tempDomains = validDomains
- .Where(d =>
- !string.IsNullOrEmpty(d?.DomainName) &&
- dnsSan.EndsWith(d.DomainName, StringComparison.OrdinalIgnoreCase)
- ).ToList();
+ // only try to resolve a domain if we don't already have a commonName
+ if (string.IsNullOrWhiteSpace(commonName))
+ {
+ // 1) Try IP SANs first
+ if (ipSans != null)
+ foreach (var ipSan in ipSans)
+ {
+ if (string.IsNullOrWhiteSpace(ipSan))
+ continue;
+
+ var tempDomains = validDomains
+ .Where(d =>
+ !string.IsNullOrEmpty(d?.DomainName) &&
+ ipSan.EndsWith($".{d.DomainName}", StringComparison.OrdinalIgnoreCase)
+ ).ToList();
+
+ if (tempDomains != null && tempDomains.Count > 0)
+ {
+ Logger.LogDebug($"ipSAN Domain match found for ipSAN: {ipSan}");
+ matchedDomains = tempDomains;
+ commonName = ipSan;
+ break;
+ }
+ }
- if (tempDomains != null && tempDomains.Count > 0)
- {
- Logger.LogDebug($"SAN Domain match found for SAN: {dnsSan}");
- matchedDomains = tempDomains;
- commonName = dnsSan;
- break;
- }
- }
- }
- // If private domain skip domain resolution.
- else if (privateDomain)
- {
- var profiles = await apiClient.GetProfiles();
- var fillProfile = profiles.FirstOrDefault();
- // If PrivateDomain is true, we don't need to fully resolve a domain
- domain = new GetDomainsDomainDetail()
- {
- ContactInfo = new ContactInfoDomain()
- {
- Email = requesterEmail,
- Phone = requesterTel,
- FirstName = requestor,
- LastName = requestor
+ // 2) If still not found, try DNS SANs
+ if (domain == null && dnsSans != null)
+ foreach (var dnsSan in dnsSans)
+ {
+ if (string.IsNullOrWhiteSpace(dnsSan))
+ continue;
+
+ var tempDomains = validDomains
+ .Where(d =>
+ !string.IsNullOrEmpty(d?.DomainName) &&
+ dnsSan.EndsWith(d.DomainName, StringComparison.OrdinalIgnoreCase)
+ ).ToList();
+
+ if (tempDomains != null && tempDomains.Count > 0)
+ {
+ Logger.LogDebug($"SAN Domain match found for SAN: {dnsSan}");
+ matchedDomains = tempDomains;
+ commonName = dnsSan;
+ break;
+ }
+ }
+ }
+ // If private domain skip domain resolution.
+ else if (privateDomain)
+ {
+ var profiles = await apiClient.GetProfiles();
+ var fillProfile = profiles.FirstOrDefault();
+ // If PrivateDomain is true, we don't need to fully resolve a domain
+ domain = new GetDomainsDomainDetail()
+ {
+ ContactInfo = new ContactInfoDomain()
+ {
+ Email = requesterEmail,
+ Phone = requesterTel,
+ FirstName = requestor,
+ LastName = requestor
- }
- };
- domain.MSSLProfileID = fillProfile.MSSLProfileId;
+ }
+ };
+ domain.MSSLProfileID = fillProfile.MSSLProfileId;
matchedDomains = new List { domain };
- }
+ }
- // 3) Fallback: if we did obtain a commonName (or it was already set), try matching it
- else if (domain == null && !string.IsNullOrWhiteSpace(commonName))
- matchedDomains = validDomains
- .Where(d =>
- !string.IsNullOrEmpty(d?.DomainName) &&
- commonName.EndsWith(d.DomainName, StringComparison.OrdinalIgnoreCase)
- ).ToList();
+ // 3) Fallback: if we did obtain a commonName (or it was already set), try matching it
+ else if (domain == null && !string.IsNullOrWhiteSpace(commonName))
+ {
+ matchedDomains = validDomains
+ .Where(d =>
+ !string.IsNullOrEmpty(d?.DomainName) &&
+ commonName.EndsWith(d.DomainName, StringComparison.OrdinalIgnoreCase)
+ ).ToList();
+ }
if (matchedDomains.Count == 1)
{
domain = matchedDomains[0];
}
+ else if (matchedDomains.Count == 0)
+ {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.AppendLine($"No domains found matching common name {commonName}\nAll domains:");
+ foreach (var dm in validDomains)
+ {
+ stringBuilder.AppendLine($"Domain: {dm.DomainName}\tProfileID: {dm.MSSLProfileID}");
+ }
+ Logger.LogTrace(stringBuilder.ToString());
+ }
else
{
+ StringBuilder sb = new StringBuilder();
+ sb.AppendLine($"Domains found matching common name {commonName}:");
+ foreach (var dom in matchedDomains)
+ {
+ sb.AppendLine($"Domain: {dom.DomainName}\tProfileID: {dom.MSSLProfileID}");
+ }
+ //Logger.LogTrace($"Multiple domains found matching common name {commonName}:\n{string.Join(',', matchedDomains.Select(d => d.DomainName))}.\nChecking for Profile ID.");
var profId = productInfo.ProductParameters["MSSLProfileID"];
- if (!string.IsNullOrEmpty(profId) )
+ if (!string.IsNullOrEmpty(profId))
{
+ sb.AppendLine($"Comparing ProfileID to provided MSSLProfileID: {profId}");
+ Logger.LogTrace(sb.ToString());
var tempDomain = matchedDomains.Where(d =>
d.MSSLProfileID.Equals(profId, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
if (tempDomain != null)
@@ -366,6 +387,11 @@ public async Task Enroll(string csr, string subject, Dictionar
throw new Exception($"No domain matching common name {commonName} has provided MSSLProfileID of {profId}. Check configuration.");
}
}
+ else
+ {
+ sb.AppendLine("No MSSLProfileID provided, unable to determine correct domain");
+ Logger.LogTrace(sb.ToString());
+ }
}
From 7c2d81ed449b17b10b9389558767e0bd2864360f Mon Sep 17 00:00:00 2001
From: David Galey
Date: Wed, 14 Oct 2026 05:17:49 -0400
Subject: [PATCH 3/6] dns validation support
---
CHANGELOG.md | 6 ++
docsource/configuration.md | 6 ++
globalsign-mssl-caplugin.sln | 7 +-
.../Api/GlobalSignRenewDomainRequest.cs | 41 ++++++++
.../Api/GlobalSignVerifyDomainRequest.cs | 40 ++++++++
.../Client/GlobalSignApiClient.cs | 42 ++++++++
globalsign-mssl-caplugin/Constants.cs | 1 +
.../GlobalSignCAConfig.cs | 3 +
.../GlobalSignCAPlugin.cs | 96 ++++++++++++++++---
.../GlobalSignCAPlugin.csproj | 13 +--
10 files changed, 230 insertions(+), 25 deletions(-)
create mode 100644 globalsign-mssl-caplugin/Api/GlobalSignRenewDomainRequest.cs
create mode 100644 globalsign-mssl-caplugin/Api/GlobalSignVerifyDomainRequest.cs
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d68ee8..1e56436 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,3 +9,9 @@ Change incremental sync to use GetModifiedOrders API call
1.1.2
Add 30 day window from expiration for doing renewals instead of reissues
+
+1.1.3
+Return EXTERNALVALIDATION status for all pending requests.
+
+2.0.0
+Add support for automated domain validation via DNS gateway plugins.
diff --git a/docsource/configuration.md b/docsource/configuration.md
index ea208a3..7153655 100644
--- a/docsource/configuration.md
+++ b/docsource/configuration.md
@@ -23,6 +23,12 @@ Each additional Root will require a separate CA setup.
GlobalSign supports specific combinations of SAN types with certain GlobalSign products. For example, a Private IP can only be used as a SAN with a `PV_INTRA` Certificate.
Please refer to the GlobalSign documentation for more information on SAN usage: [GlobalSign MSSL API User Guide (Section 2.2.5)](https://www.globalsign.com/en/repository/globalsign-mssl-api-user-guide.pdf)
+### Automated DNS Domain Validation
+This plugin integrates with the AnyCA Gateway **DNS provider plugin framework** (`KeyfactorAnyGateway.IAnyCAPlugin` 3.3.0+). DNS provider plugins (Azure DNS, AWS Route53, Cloudflare, Google Cloud DNS, etc.) are deployed and configured **separately** on the gateway; this CA plugin does not bundle any DNS provider SDKs. The gateway injects an `IDomainValidatorFactory` that resolves the correct provider for each domain at enrollment time.
+
+GlobalSign supports **TXT** records for DNS validation.
+
+`DnsValidationEnabled` determines whether to use the automated validation. Make sure you have the necessary DNS plugins installed and configured before enabling.
## Enrollment
diff --git a/globalsign-mssl-caplugin.sln b/globalsign-mssl-caplugin.sln
index 5949674..2dcf0cc 100644
--- a/globalsign-mssl-caplugin.sln
+++ b/globalsign-mssl-caplugin.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.11.35222.181
+# Visual Studio Version 18
+VisualStudioVersion = 18.9.12105.275 stable
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GlobalSignCAPlugin", "globalsign-mssl-caplugin\GlobalSignCAPlugin.csproj", "{E3B20C7A-1B3C-4FAE-A1C9-EA4CEC400D70}"
EndProject
@@ -21,7 +21,8 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E3B20C7A-1B3C-4FAE-A1C9-EA4CEC400D70}.Debug|Any CPU.ActiveCfg = DebugAndPush|Any CPU
+ {E3B20C7A-1B3C-4FAE-A1C9-EA4CEC400D70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E3B20C7A-1B3C-4FAE-A1C9-EA4CEC400D70}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3B20C7A-1B3C-4FAE-A1C9-EA4CEC400D70}.DebugAndPush|Any CPU.ActiveCfg = DebugAndPush|Any CPU
{E3B20C7A-1B3C-4FAE-A1C9-EA4CEC400D70}.DebugAndPush|Any CPU.Build.0 = DebugAndPush|Any CPU
{E3B20C7A-1B3C-4FAE-A1C9-EA4CEC400D70}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/globalsign-mssl-caplugin/Api/GlobalSignRenewDomainRequest.cs b/globalsign-mssl-caplugin/Api/GlobalSignRenewDomainRequest.cs
new file mode 100644
index 0000000..f8ba891
--- /dev/null
+++ b/globalsign-mssl-caplugin/Api/GlobalSignRenewDomainRequest.cs
@@ -0,0 +1,41 @@
+// Copyright 2021 Keyfactor
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+// and limitations under the License.
+
+using Order;
+
+namespace Keyfactor.Extensions.CAPlugin.GlobalSign.Api;
+
+public class GlobalSignRenewDomainRequest
+{
+ private readonly GlobalSignCAConfig Config;
+
+ public GlobalSignRenewDomainRequest(GlobalSignCAConfig config)
+ {
+ Config = config;
+ }
+
+ public string MsslProfileId { get; set; } = string.Empty;
+ public string DomainId { get; set; } = string.Empty;
+
+ public BmV1RenewalDomainRequest Request
+ {
+ get
+ {
+ var request = new BmV1RenewalDomainRequest();
+ var header = new OrderRequestHeader
+ {
+ AuthToken = Config.GetOrderAuthToken()
+ };
+ request.OrderRequestHeader = header;
+ request.MSSLProfileID = MsslProfileId;
+ request.DomainID = DomainId;
+ request.VettingLevel = "OV";
+ request.VettingType = "DNS";
+ return request;
+ }
+ }
+}
\ No newline at end of file
diff --git a/globalsign-mssl-caplugin/Api/GlobalSignVerifyDomainRequest.cs b/globalsign-mssl-caplugin/Api/GlobalSignVerifyDomainRequest.cs
new file mode 100644
index 0000000..8dea01e
--- /dev/null
+++ b/globalsign-mssl-caplugin/Api/GlobalSignVerifyDomainRequest.cs
@@ -0,0 +1,40 @@
+// Copyright 2021 Keyfactor
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+// and limitations under the License.
+
+using Order;
+
+namespace Keyfactor.Extensions.CAPlugin.GlobalSign.Api;
+
+public class GlobalSignVerifyDomainRequest
+{
+ private readonly GlobalSignCAConfig Config;
+
+ public GlobalSignVerifyDomainRequest(GlobalSignCAConfig config)
+ {
+ Config = config;
+ }
+
+ public string DomainName { get; set; } = string.Empty;
+ public string DomainId { get; set; } = string.Empty;
+
+ public BmV1VerifyMsslDomainRequest Request
+ {
+ get
+ {
+ var request = new BmV1VerifyMsslDomainRequest();
+ var header = new OrderRequestHeader
+ {
+ AuthToken = Config.GetOrderAuthToken()
+ };
+ request.OrderRequestHeader = header;
+ request.DomainID = DomainId;
+ request.TagLocation = DomainName;
+ request.VettingType = "DNS";
+ return request;
+ }
+ }
+}
\ No newline at end of file
diff --git a/globalsign-mssl-caplugin/Client/GlobalSignApiClient.cs b/globalsign-mssl-caplugin/Client/GlobalSignApiClient.cs
index f3e5036..6190e9d 100644
--- a/globalsign-mssl-caplugin/Client/GlobalSignApiClient.cs
+++ b/globalsign-mssl-caplugin/Client/GlobalSignApiClient.cs
@@ -325,6 +325,48 @@ public async Task> GetProfiles()
throw new Exception(gsError.Message);
}
+ public async Task RenewDomain(GlobalSignRenewDomainRequest request)
+ {
+ Logger.MethodEntry();
+ var rawRequest = request.Request;
+ Logger.LogTrace($"Renew Domain request details:");
+ Logger.LogTrace($"Profile ID: {rawRequest.MSSLProfileID}");
+ Logger.LogTrace($"Domain ID: {rawRequest.DomainID}");
+ var responsewrapper = await OrderService.RenewalDomainAsync(new RenewalDomain(rawRequest));
+ var response = responsewrapper.Response;
+ if (response.OrderResponseHeader.SuccessCode == 0)
+ {
+ Logger.LogDebug("Renewal domain request successfully submitted");
+ Logger.MethodExit();
+ return response.DnsTXT;
+ }
+ var errorCode = int.Parse(response.OrderResponseHeader.Errors[0].ErrorCode);
+ var err = GlobalSignErrorIndex.GetGlobalSignError(errorCode);
+ Logger.MethodExit();
+ throw new Exception($"Error while attempting to renew domain: {err.DetailedMessage}");
+ }
+
+ public async Task VerifyDomain(GlobalSignVerifyDomainRequest request)
+ {
+ Logger.MethodEntry();
+ var rawRequest = request.Request;
+ Logger.LogTrace($"Verify Domain request details:");
+ Logger.LogTrace($"Domain Name: {rawRequest.TagLocation}");
+ Logger.LogTrace($"Domain ID: {rawRequest.DomainID}");
+ var responsewrapper = await OrderService.VerifyMsslDomainAsync(new VerifyMsslDomain(rawRequest));
+ var response = responsewrapper.Response;
+ if (response.OrderResponseHeader.SuccessCode == 0)
+ {
+ Logger.LogDebug("Verify domain request successful");
+ Logger.MethodExit();
+ return true;
+ }
+ var errorCode = int.Parse(response.OrderResponseHeader.Errors[0].ErrorCode);
+ var err = GlobalSignErrorIndex.GetGlobalSignError(errorCode);
+ Logger.MethodExit();
+ throw new Exception($"Error while attempting to verify domain: {err.DetailedMessage}");
+ }
+
public async Task Enroll(GlobalSignEnrollRequest enrollRequest)
{
Logger.MethodEntry();
diff --git a/globalsign-mssl-caplugin/Constants.cs b/globalsign-mssl-caplugin/Constants.cs
index dbbcb43..8f20021 100644
--- a/globalsign-mssl-caplugin/Constants.cs
+++ b/globalsign-mssl-caplugin/Constants.cs
@@ -23,6 +23,7 @@ internal class Constants
public static string SYNCINTERNVALDAYS = "SyncIntervalDays";
public static string SYNCPRODUCTS = "SyncProducts";
public static string Enabled = "Enabled";
+ public static string DNS_VALIDATION_ENABLED = "DnsValidationEnabled";
}
public static class EnrollmentConfigConstants
diff --git a/globalsign-mssl-caplugin/GlobalSignCAConfig.cs b/globalsign-mssl-caplugin/GlobalSignCAConfig.cs
index ba52afe..467ceb0 100644
--- a/globalsign-mssl-caplugin/GlobalSignCAConfig.cs
+++ b/globalsign-mssl-caplugin/GlobalSignCAConfig.cs
@@ -36,6 +36,9 @@ public class GlobalSignCAConfig
public bool Enabled { get; set; } = true;
+ public bool DnsValidationEnabled { get; set; }
+
+
public string GetUrl(GlobalSignServiceType queryType)
{
switch (queryType)
diff --git a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
index ba38f6e..71f86d6 100644
--- a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
+++ b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
@@ -20,13 +20,20 @@ namespace Keyfactor.Extensions.CAPlugin.GlobalSign;
public class GlobalSignCAPlugin : IAnyCAPlugin
{
- private ICertificateDataReader? _certificateDataReader;
- private ILogger Logger;
+ private ICertificateDataReader? _certificateDataReader;
+ private ILogger Logger = LogHandler.GetClassLogger();
private GlobalSignCAConfig Config { get; set; } = new();
private bool _enabled = false;
+ private readonly IDomainValidatorFactory DomainValidatorFactory;
- public void Initialize(IAnyCAPluginConfigProvider configProvider, ICertificateDataReader certificateDataReader)
+ public GlobalSignCAPlugin(IDomainValidatorFactory domainValidatorFactory)
+ {
+ DomainValidatorFactory = domainValidatorFactory;
+ }
+
+
+ public void Initialize(IAnyCAPluginConfigProvider configProvider, ICertificateDataReader certificateDataReader)
{
Logger = LogHandler.GetClassLogger(GetType());
Logger.MethodEntry();
@@ -57,8 +64,9 @@ public void Initialize(IAnyCAPluginConfigProvider configProvider, ICertificateDa
SyncIntervalDays = configProvider.CAConnectionData.TryGetValue("SyncIntervalDays", out var val)
&& int.TryParse(val as string, out var parsed)
? parsed
- : 0
- };
+ : 0,
+ DnsValidationEnabled = bool.Parse((string)configProvider.CAConnectionData["DnsValidationEnabled"])
+ };
_certificateDataReader = certificateDataReader;
Logger.MethodExit();
}
@@ -238,9 +246,9 @@ public async Task Enroll(string csr, string subject, Dictionar
GetDomainsDomainDetail? domain = null;
var allDomains = await apiClient.GetDomains();
var validDomainStatus = new List { "3", "7", "9", "10" };
- var validDomains = allDomains.Where(d => validDomainStatus.Contains(d.DomainStatus)).ToList();
- if (validDomains.Count == 0 && !privateDomain)
- throw new Exception("No domains found that are valid for certificate enrollment");
+ //var validDomains = allDomains.Where(d => validDomainStatus.Contains(d.DomainStatus)).ToList();
+ //if (validDomains.Count == 0 && !privateDomain)
+ // throw new Exception("No domains found that are valid for certificate enrollment");
try
{
commonName = ParseSubject(subject, "CN=");
@@ -280,7 +288,7 @@ public async Task Enroll(string csr, string subject, Dictionar
if (string.IsNullOrWhiteSpace(ipSan))
continue;
- var tempDomains = validDomains
+ var tempDomains = allDomains
.Where(d =>
!string.IsNullOrEmpty(d?.DomainName) &&
ipSan.EndsWith($".{d.DomainName}", StringComparison.OrdinalIgnoreCase)
@@ -302,7 +310,7 @@ public async Task Enroll(string csr, string subject, Dictionar
if (string.IsNullOrWhiteSpace(dnsSan))
continue;
- var tempDomains = validDomains
+ var tempDomains = allDomains
.Where(d =>
!string.IsNullOrEmpty(d?.DomainName) &&
dnsSan.EndsWith(d.DomainName, StringComparison.OrdinalIgnoreCase)
@@ -341,7 +349,7 @@ public async Task Enroll(string csr, string subject, Dictionar
// 3) Fallback: if we did obtain a commonName (or it was already set), try matching it
else if (domain == null && !string.IsNullOrWhiteSpace(commonName))
{
- matchedDomains = validDomains
+ matchedDomains = allDomains
.Where(d =>
!string.IsNullOrEmpty(d?.DomainName) &&
commonName.EndsWith(d.DomainName, StringComparison.OrdinalIgnoreCase)
@@ -356,7 +364,7 @@ public async Task Enroll(string csr, string subject, Dictionar
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.AppendLine($"No domains found matching common name {commonName}\nAll domains:");
- foreach (var dm in validDomains)
+ foreach (var dm in allDomains)
{
stringBuilder.AppendLine($"Domain: {dm.DomainName}\tProfileID: {dm.MSSLProfileID}");
}
@@ -397,9 +405,59 @@ public async Task Enroll(string csr, string subject, Dictionar
if (domain == null) throw new Exception("Unable to determine GlobalSign domain");
-
+ if (!string.Equals(domain.DomainStatus, "3") && !privateDomain)
+ {
+ if (!Config.DnsValidationEnabled)
+ {
+ if (!validDomainStatus.Contains(domain.DomainStatus))
+ {
+ throw new Exception($"Domain {domain.DomainName} is not valid for certificate enrollment, and DNS validation is disabled");
+ }
+ else
+ {
+ // Domain is still valid for enrollment but is pending re-validation. Do nothing if DnsValidationEnabled is false.
+ }
+ }
+ else
+ {
+ var request = new GlobalSignRenewDomainRequest(Config)
+ {
+ MsslProfileId = domain.MSSLProfileID,
+ DomainId = domain.DomainID
+ };
+ var dnsTxt = await apiClient.RenewDomain(request);
- Logger.LogDebug(
+ IDomainValidator validator;
+ try
+ {
+ validator = DomainValidatorFactory.ResolveDomainValidator(domain.DomainName, "dns-01");
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"Failed to resolve domain validator for domain {domain.DomainName}: {ex.Message}");
+ throw new Exception($"Failed to resolve domain validator for domain {domain.DomainName}: {ex.Message}", ex);
+ }
+
+ DomainValidationResult domValResult = null;
+ domValResult = await validator.StageValidation(domain.DomainName, dnsTxt, CancellationToken.None);
+
+ if (domValResult == null || !domValResult.Success)
+ {
+ var msg = domValResult?.ErrorMessage ?? "unknown error";
+ Logger.LogError(msg);
+ throw new Exception(msg);
+ }
+
+ var verifyRequest = new GlobalSignVerifyDomainRequest(Config)
+ {
+ DomainId = domain.DomainID,
+ DomainName = domain.DomainName
+ };
+ var verifyResult = await apiClient.VerifyDomain(verifyRequest);
+ }
+ }
+
+ Logger.LogDebug(
$"Domain info:\nDomain Name: {domain?.DomainName}\nMsslDomainId: {domain?.DomainID}\nMsslProfileId: {domain?.MSSLProfileID}");
Logger.LogDebug($"Using common name: {commonName}");
var months = (int.Parse(productInfo.ProductParameters["CertificateValidityInYears"]) * 12).ToString();
@@ -713,6 +771,16 @@ public Dictionary GetCAConnectorAnnotations()
DefaultValue = null,
Type = "String"
},
+ [Constants.DNS_VALIDATION_ENABLED] = new()
+ {
+ Comments = "Enable automated DNS (TXT record) domain control validation. When enabled, the plugin " +
+ "requests TXT-based validation from GlobalSign 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.",
+ Hidden = false,
+ DefaultValue = false,
+ Type = "Boolean"
+ },
[Constants.Enabled] = new()
{
Comments = "Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available.",
diff --git a/globalsign-mssl-caplugin/GlobalSignCAPlugin.csproj b/globalsign-mssl-caplugin/GlobalSignCAPlugin.csproj
index 8230d1c..03ae1cd 100644
--- a/globalsign-mssl-caplugin/GlobalSignCAPlugin.csproj
+++ b/globalsign-mssl-caplugin/GlobalSignCAPlugin.csproj
@@ -3,7 +3,7 @@
true
- net6.0;net8.0
+ net8.0;net10.0
Keyfactor.Extensions.CAPlugin.GlobalSign
true
enable
@@ -14,15 +14,12 @@
-
-
-
-
+
+
+
+
-
-
-
From 62c7c10abcbb666c6c39e6ddfbf64847bcfeac0c Mon Sep 17 00:00:00 2001
From: Dave Galey <89407235+dgaley@users.noreply.github.com>
Date: Wed, 14 Oct 2026 05:19:19 -0400
Subject: [PATCH 4/6] Upgrade starter workflow to version 5
Updated the starter workflow version from v3 to v5.
---
.github/workflows/keyfactor-bootstrap-workflow.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/keyfactor-bootstrap-workflow.yml b/.github/workflows/keyfactor-bootstrap-workflow.yml
index 64919a4..45eec87 100644
--- a/.github/workflows/keyfactor-bootstrap-workflow.yml
+++ b/.github/workflows/keyfactor-bootstrap-workflow.yml
@@ -11,10 +11,9 @@ on:
jobs:
call-starter-workflow:
- uses: keyfactor/actions/.github/workflows/starter.yml@v3
+ uses: keyfactor/actions/.github/workflows/starter.yml@v5
secrets:
token: ${{ secrets.V2BUILDTOKEN}}
- APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
scan_token: ${{ secrets.SAST_TOKEN }}
From f62542428d9e79075a593559899be1567f2538db Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Wed, 14 Oct 2026 09:19:45 +0000
Subject: [PATCH 5/6] docs: auto-generate README and documentation [skip ci]
---
README.md | 60 +++++++++++++++++++++++++++++--------------------------
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/README.md b/README.md
index d0ce3a5..4a9f18a 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
Support
-
+
·
Requirements
@@ -33,7 +33,6 @@
-
The GlobalSign CAPlugin enables the Synchronization, Enrollment, and Revocation of TLS Certificates from the GlobalSign Certificate Center.
## Compatibility
@@ -41,7 +40,7 @@ The GlobalSign CAPlugin enables the Synchronization, Enrollment, and Revocation
The GlobalSign MSSL AnyCA Gateway REST plugin is compatible with the Keyfactor AnyCA Gateway REST 25.2.0 and later.
## Support
-The GlobalSign MSSL AnyCA Gateway REST plugin is supported by Keyfactor for Keyfactor customers. If you have a support issue, please open a support ticket with your Keyfactor representative. If you have a support issue, please open a support ticket via the Keyfactor Support Portal at https://support.keyfactor.com.
+The GlobalSign MSSL AnyCA Gateway REST plugin is supported by Keyfactor for Keyfactor customers. If you have a support issue, please open a support ticket via the Keyfactor Support Portal at https://support.keyfactor.com.
> To report a problem or suggest a new feature, use the **[Issues](../../issues)** tab. If you want to contribute actual bug fixes or proposed enhancements, use the **[Pull requests](../../pulls)** tab.
@@ -62,16 +61,16 @@ This extension uses the contact information of the GCC Domain point of contact f
2. On the server hosting the AnyCA Gateway REST, download and unzip the latest [GlobalSign MSSL AnyCA Gateway REST plugin](https://github.com/Keyfactor/globalsign-mssl-caplugin/releases/latest) from GitHub.
-3. Copy the unzipped directory (usually called `net6.0` or `net8.0`) to the Extensions directory:
+3. Copy the unzipped directory (usually called `net8.0` or `net10.0`) to the Extensions directory:
```shell
Depending on your AnyCA Gateway REST version, copy the unzipped directory to one of the following locations:
- Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net6.0\Extensions
Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net8.0\Extensions
+ Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net10.0\Extensions
```
- > The directory containing the GlobalSign MSSL AnyCA Gateway REST plugin DLLs (`net6.0` or `net8.0`) can be named anything, as long as it is unique within the `Extensions` directory.
+ > The directory containing the GlobalSign MSSL AnyCA Gateway REST plugin DLLs (`net8.0` or `net10.0`) can be named anything, as long as it is unique within the `Extensions` directory.
4. Restart the AnyCA Gateway REST service.
@@ -91,20 +90,20 @@ This extension uses the contact information of the GCC Domain point of contact f
Populate using the configuration fields collected in the [requirements](#requirements) section.
- * **GlobalSignUsername** - GlobalSign MSSL API Username
- * **GlobalSignPassword** - GlobalSign MSSL API Password
- * **DateFormatString** - Date format string. Default is yyyy-MM-ddTHH:mm:ss.fffZ
- * **OrderAPIProdURL** - MSSL Order Prod API URL. Default is https://system.globalsign.com/kb/ws/v2/ManagedSSLService
- * **OrderAPITestURL** - MSSL Order Test API URL. Default is https://test-gcc.globalsign.com/kb/ws/v2/ManagedSSLService
- * **QueryAPIProdURL** - MSSL Query Prod API URL. Default is https://system.globalsign.com/kb/ws/v1/GASService
- * **QueryAPITestURL** - MSSL Query Test API URL. Default is https://test-gcc.globalsign.com/kb/ws/v1/GASService
- * **TestAPI** - Enable the use of the test GlobalSign API endpoints. Default is false.
- * **DelayTime** - This is the number of seconds between retries when attempting to download a certificate. Default is 150.
- * **RetryCount** - This is the number of times the AnyGateway will attempt to pickup an new certificate before reporting an error. Default is 5.
- * **SyncIntervalDays** - OPTIONAL: Required if SyncStartDate is used. Specifies how to page the certificate sync. Should be a value such that no interval of that length contains > 500 certificate enrollments.
- * **SyncStartDate** - If provided, full syncs will start at the specified date.
- * **SyncProducts** - OPTIONAL: If provided as a comma-separated list of product IDs, will limit the certificate sync to only certificates of those products. If blank or not provided, will sync all certs.
- * **Enabled** - Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available.
+ * **GlobalSignUsername** - GlobalSign MSSL API Username
+ * **GlobalSignPassword** - GlobalSign MSSL API Password
+ * **DateFormatString** - Date format string. Default is yyyy-MM-ddTHH:mm:ss.fffZ
+ * **OrderAPIProdURL** - MSSL Order Prod API URL. Default is https://system.globalsign.com/kb/ws/v2/ManagedSSLService
+ * **OrderAPITestURL** - MSSL Order Test API URL. Default is https://test-gcc.globalsign.com/kb/ws/v2/ManagedSSLService
+ * **QueryAPIProdURL** - MSSL Query Prod API URL. Default is https://system.globalsign.com/kb/ws/v1/GASService
+ * **QueryAPITestURL** - MSSL Query Test API URL. Default is https://test-gcc.globalsign.com/kb/ws/v1/GASService
+ * **TestAPI** - Enable the use of the test GlobalSign API endpoints. Default is false.
+ * **DelayTime** - This is the number of seconds between retries when attempting to download a certificate. Default is 150.
+ * **RetryCount** - This is the number of times the AnyGateway will attempt to pickup an new certificate before reporting an error. Default is 5.
+ * **SyncIntervalDays** - OPTIONAL: Required if SyncStartDate is used. Specifies how to page the certificate sync. Should be a value such that no interval of that length contains > 500 certificate enrollments.
+ * **SyncStartDate** - If provided, full syncs will start at the specified date.
+ * **SyncProducts** - OPTIONAL: If provided as a comma-separated list of product IDs, will limit the certificate sync to only certificates of those products. If blank or not provided, will sync all certs.
+ * **Enabled** - Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available.
2. Define [Certificate Profiles](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCP-Gateway.htm) and [Certificate Templates](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCA-Gateway.htm) for the Certificate Authority as required. One Certificate Profile must be defined per Certificate Template. It's recommended that each Certificate Profile be named after the Product ID. The GlobalSign MSSL plugin supports the following product IDs:
@@ -122,17 +121,23 @@ This extension uses the contact information of the GCC Domain point of contact f
4. In Keyfactor Command (v12.3+), for each imported Certificate Template, follow the [official documentation](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/Configuring%20Template%20Options.htm) to define enrollment fields for each of the following parameters:
- * **CertificateValidityInYears** - Number of years the certificate will be valid for
- * **SlotSize** - Maximum number of SANs that a certificate may have - valid values are [FIVE, TEN, FIFTEEN, TWENTY, THIRTY, FOURTY, FIFTY, ONE_HUNDRED]
- * **RootCAType** - The certificate's root CA - Depending on certificate expiration date, SHA_1 not be allowed. Will default to SHA_2 if expiration date exceeds sha1 allowed date. Options are GlobalSign R certs.
- * **MSSLProfileId** - OPTIONAL: If specified, enrollments will use that profile ID for domain lookups. If not provided, domain lookup will be done based on the Common Name or first DNS SAN. Useful if your GlobalSign account has multiple domain objects with the same domain string, or subdomains (e.g. sub.test.com vs test.com).
- * **ContactName** - The name of the contact to use for enrollments. Can be specified here or via an Enrollment Field in Command. Enrollment Fields will override any value supplied here.
-
+ * **CertificateValidityInYears** - Number of years the certificate will be valid for
+ * **SlotSize** - Maximum number of SANs that a certificate may have - valid values are [FIVE, TEN, FIFTEEN, TWENTY, THIRTY, FOURTY, FIFTY, ONE_HUNDRED]
+ * **RootCAType** - The certificate's root CA - Depending on certificate expiration date, SHA_1 not be allowed. Will default to SHA_2 if expiration date exceeds sha1 allowed date. Options are GlobalSign R certs.
+ * **MSSLProfileId** - OPTIONAL: If specified, enrollments will use that profile ID for domain lookups. If not provided, domain lookup will be done based on the Common Name or first DNS SAN. Useful if your GlobalSign account has multiple domain objects with the same domain string, or subdomains (e.g. sub.test.com vs test.com).
+ * **ContactName** - The name of the contact to use for enrollments. Can be specified here or via an Enrollment Field in Command. Enrollment Fields will override any value supplied here.
## Valid GlobalSign SAN Usage
GlobalSign supports specific combinations of SAN types with certain GlobalSign products. For example, a Private IP can only be used as a SAN with a `PV_INTRA` Certificate.
Please refer to the GlobalSign documentation for more information on SAN usage: [GlobalSign MSSL API User Guide (Section 2.2.5)](https://www.globalsign.com/en/repository/globalsign-mssl-api-user-guide.pdf)
+### Automated DNS Domain Validation
+This plugin integrates with the AnyCA Gateway **DNS provider plugin framework** (`KeyfactorAnyGateway.IAnyCAPlugin` 3.3.0+). DNS provider plugins (Azure DNS, AWS Route53, Cloudflare, Google Cloud DNS, etc.) are deployed and configured **separately** on the gateway; this CA plugin does not bundle any DNS provider SDKs. The gateway injects an `IDomainValidatorFactory` that resolves the correct provider for each domain at enrollment time.
+
+GlobalSign supports **TXT** records for DNS validation.
+
+`DnsValidationEnabled` determines whether to use the automated validation. Make sure you have the necessary DNS plugins installed and configured before enabling.
+
## Enrollment
### Required Enrollment Fields
@@ -150,11 +155,10 @@ The following fields are available for use in the enrollment of `PV_INTRA` Certi
- **RequesterTel**: Set Data Type to 'string' when creating the field. The contact telephone number for the enrollment. Required by the GlobalSign API.
- **InternalIP**: Set Data Type to 'string' when creating the field. Set to `true` if an IP SAN attached during a `PV_INTRA` certificate enrollment is a private IP address (e.g., `10.x.x.x`, `192.168.x.x`, etc.).
-
## License
Apache License 2.0, see [LICENSE](LICENSE).
## Related Integrations
-See all [Keyfactor Any CA Gateways (REST)](https://github.com/orgs/Keyfactor/repositories?q=anycagateway).
\ No newline at end of file
+See all [Keyfactor Any CA Gateways (REST)](https://github.com/orgs/Keyfactor/repositories?q=anycagateway).
From 445005b368694196a70df42c24aeb307b2933209 Mon Sep 17 00:00:00 2001
From: David Galey
Date: Thu, 15 Oct 2026 09:22:27 -0400
Subject: [PATCH 6/6] domain check fix
---
.../GlobalSignCAPlugin.cs | 49 +++++++++++--------
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
index 71f86d6..6a6d3d6 100644
--- a/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
+++ b/globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
@@ -246,7 +246,7 @@ public async Task Enroll(string csr, string subject, Dictionar
GetDomainsDomainDetail? domain = null;
var allDomains = await apiClient.GetDomains();
var validDomainStatus = new List { "3", "7", "9", "10" };
- //var validDomains = allDomains.Where(d => validDomainStatus.Contains(d.DomainStatus)).ToList();
+ var validDomains = allDomains.Where(d => validDomainStatus.Contains(d.DomainStatus)).ToList();
//if (validDomains.Count == 0 && !privateDomain)
// throw new Exception("No domains found that are valid for certificate enrollment");
try
@@ -372,34 +372,43 @@ public async Task Enroll(string csr, string subject, Dictionar
}
else
{
- StringBuilder sb = new StringBuilder();
- sb.AppendLine($"Domains found matching common name {commonName}:");
- foreach (var dom in matchedDomains)
+ var validMatchedDomains = matchedDomains.FindAll(d => validDomains.Contains(d)).ToList();
+ matchedDomains = validMatchedDomains;
+ if (matchedDomains.Count == 1)
{
- sb.AppendLine($"Domain: {dom.DomainName}\tProfileID: {dom.MSSLProfileID}");
+ domain = matchedDomains[0];
}
- //Logger.LogTrace($"Multiple domains found matching common name {commonName}:\n{string.Join(',', matchedDomains.Select(d => d.DomainName))}.\nChecking for Profile ID.");
- var profId = productInfo.ProductParameters["MSSLProfileID"];
- if (!string.IsNullOrEmpty(profId))
+ else
{
- sb.AppendLine($"Comparing ProfileID to provided MSSLProfileID: {profId}");
- Logger.LogTrace(sb.ToString());
- var tempDomain = matchedDomains.Where(d =>
- d.MSSLProfileID.Equals(profId, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
- if (tempDomain != null)
+ StringBuilder sb = new StringBuilder();
+ sb.AppendLine($"Domains found matching common name {commonName}:");
+ foreach (var dom in matchedDomains)
+ {
+ sb.AppendLine($"Domain: {dom.DomainName}\tProfileID: {dom.MSSLProfileID}");
+ }
+ //Logger.LogTrace($"Multiple domains found matching common name {commonName}:\n{string.Join(',', matchedDomains.Select(d => d.DomainName))}.\nChecking for Profile ID.");
+ var profId = productInfo.ProductParameters["MSSLProfileID"];
+ if (!string.IsNullOrEmpty(profId))
{
- domain = tempDomain;
+ sb.AppendLine($"Comparing ProfileID to provided MSSLProfileID: {profId}");
+ Logger.LogTrace(sb.ToString());
+ var tempDomain = matchedDomains.Where(d =>
+ d.MSSLProfileID.Equals(profId, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
+ if (tempDomain != null)
+ {
+ domain = tempDomain;
+ }
+ else
+ {
+ throw new Exception($"No domain matching common name {commonName} has provided MSSLProfileID of {profId}. Check configuration.");
+ }
}
else
{
- throw new Exception($"No domain matching common name {commonName} has provided MSSLProfileID of {profId}. Check configuration.");
+ sb.AppendLine("No MSSLProfileID provided, unable to determine correct domain");
+ Logger.LogTrace(sb.ToString());
}
}
- else
- {
- sb.AppendLine("No MSSLProfileID provided, unable to determine correct domain");
- Logger.LogTrace(sb.ToString());
- }
}