From ab0692439cde07f34d39d61830b949266ead7b05 Mon Sep 17 00:00:00 2001 From: Keyfactor Date: Tue, 30 Sep 2025 20:02:57 +0000 Subject: [PATCH 1/9] Update generated docs --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f74493d..d456be3 100644 --- a/README.md +++ b/README.md @@ -146,13 +146,16 @@ Enrollment Format Specifications Located [here](https://pki-ws-rest.symauth.com/ 2. On the server hosting the AnyCA Gateway REST, download and unzip the latest [Digicert Mpki Gateway AnyCA Gateway REST plugin](https://github.com/Keyfactor/digicert-mpki-caplugin/releases/latest) from GitHub. -3. Copy the unzipped directory (usually called `net6.0`) to the Extensions directory: +3. Copy the unzipped directory (usually called `net6.0` or `net8.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 ``` - > The directory containing the Digicert Mpki Gateway AnyCA Gateway REST plugin DLLs (`net6.0`) can be named anything, as long as it is unique within the `Extensions` directory. + > The directory containing the Digicert Mpki Gateway AnyCA Gateway REST plugin DLLs (`net6.0` or `net8.0`) can be named anything, as long as it is unique within the `Extensions` directory. 4. Restart the AnyCA Gateway REST service. From cdb4ee8f7662458f8be0c2a6cbdadb12dc1eaf67 Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:03:08 -0400 Subject: [PATCH 2/9] Update integration-manifest.json --- integration-manifest.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/integration-manifest.json b/integration-manifest.json index 30076cc..63d4ce5 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -1,5 +1,5 @@ { - "$schema": "https://keyfactor.github.io/integration-manifest-schema.json", + "$schema": "https://keyfactor.github.io/v2/integration-manifest-schema.json", "integration_type": "anyca-plugin", "name": "Digicert Mpki AnyCA REST Gateway Plugin", "status": "pilot", @@ -8,7 +8,8 @@ "update_catalog": true, "description": "Digicert Mpki plugin for the AnyCA REST Gateway framework", "gateway_framework": "24.2.0", - "release_dir": "digicert-mpki-caplugin/bin/Release/net6.0", + "release_dir": "digicert-mpki-caplugin/bin/Release", + "release_project": "digicert-mpki-caplugin/digicert-mpki-caplugin.csproj", "about": { "carest": { "ca_plugin_config": [ @@ -37,4 +38,4 @@ "product_ids": [] } } -} \ No newline at end of file +} From 6780abd5e07cc6de68d145096733d3b9a3e9abea Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:03:51 -0400 Subject: [PATCH 3/9] Update digicert-mpki-caplugin.csproj --- digicert-mpki-caplugin/digicert-mpki-caplugin.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/digicert-mpki-caplugin/digicert-mpki-caplugin.csproj b/digicert-mpki-caplugin/digicert-mpki-caplugin.csproj index 02e9eda..6711599 100644 --- a/digicert-mpki-caplugin/digicert-mpki-caplugin.csproj +++ b/digicert-mpki-caplugin/digicert-mpki-caplugin.csproj @@ -1,7 +1,7 @@  - net6.0 + net6.0;net8.0 Keyfactor.Extensions.CAPlugin.DigicertMpki disable disable From 0c8a4604c5bfe25ab88012d0262829123a2b48ea Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:04:58 -0400 Subject: [PATCH 4/9] Update Constants.cs --- digicert-mpki-caplugin/Constants.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/digicert-mpki-caplugin/Constants.cs b/digicert-mpki-caplugin/Constants.cs index 71a2954..e045953 100644 --- a/digicert-mpki-caplugin/Constants.cs +++ b/digicert-mpki-caplugin/Constants.cs @@ -1,4 +1,4 @@ -namespace Keyfactor.Extensions.CAPlugin.DigicertMpki +namespace Keyfactor.Extensions.CAPlugin.DigicertMpki { public class Constants { @@ -13,5 +13,6 @@ public class Constants public static string EmailConstName = "EmailConstName"; public static string UpnConstName = "UpnConstName"; public static string OuStartPoint = "OuStartPoint"; + public static string Enabled = "Enabled"; } } From d548c9c62afe14ba199568df6fef533f81ab6b1b Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:05:20 -0400 Subject: [PATCH 5/9] Update DigicertMpkiCAPlugin.cs --- .../DigicertMpkiCAPlugin.cs | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/digicert-mpki-caplugin/DigicertMpkiCAPlugin.cs b/digicert-mpki-caplugin/DigicertMpkiCAPlugin.cs index c375855..d371011 100644 --- a/digicert-mpki-caplugin/DigicertMpkiCAPlugin.cs +++ b/digicert-mpki-caplugin/DigicertMpkiCAPlugin.cs @@ -1,4 +1,4 @@ -using DigicertMpkiSoap; +using DigicertMpkiSoap; using Keyfactor.AnyGateway.DigicertMpki; using Keyfactor.AnyGateway.DigicertMpki.Client.Models; using Keyfactor.AnyGateway.Extensions; @@ -43,6 +43,13 @@ public void Initialize(IAnyCAPluginConfigProvider configProvider, ICertificateDa _config = DeserializeConfig(configProvider.CAConnectionData); _logger.MethodEntry(); + if (!_config.Enabled) + { + _logger.LogWarning($"The CA is currently in the Disabled state. It must be Enabled to perform operations."); + _logger.MethodExit(LogLevel.Trace); + return; + } + _requestManager = new RequestManager(_logger, _config); _client = new DigiCertSymClient(_config, _logger); @@ -297,6 +304,19 @@ private async Task ProcessRenewEnrollment(string csr, Enrollme public async Task ValidateCAConnectionInfo(Dictionary connectionInfo) { + try + { + if (!(bool)connectionInfo[Constants.Enabled]) + { + _logger.LogWarning($"The CA is currently in the Disabled state. It must be Enabled to perform operations. Skipping validation..."); + _logger.MethodExit(LogLevel.Trace); + return; + } + } + catch (Exception ex) + { + _logger.LogError($"Exception: {LogHandler.FlattenException(ex)}"); + } List errors = ValidateConnectionInfo(connectionInfo); if (errors.Any()) ThrowValidationException(errors); @@ -372,6 +392,13 @@ public Dictionary GetCAConnectorAnnotations() Hidden = false, DefaultValue = "", Type = "String" + }, + [Constants.Enabled] = new PropertyConfigInfo() + { + Comments = "Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available.", + Hidden = false, + DefaultValue = true, + Type = "Boolean" } }; } From 9ef61577b3a1680b0b0423ad7053c824f36805bf Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:05:43 -0400 Subject: [PATCH 6/9] Update DigicertMpkiConfig.cs --- digicert-mpki-caplugin/DigicertMpkiConfig.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/digicert-mpki-caplugin/DigicertMpkiConfig.cs b/digicert-mpki-caplugin/DigicertMpkiConfig.cs index 440ced4..5544c09 100644 --- a/digicert-mpki-caplugin/DigicertMpkiConfig.cs +++ b/digicert-mpki-caplugin/DigicertMpkiConfig.cs @@ -1,4 +1,4 @@ -namespace Keyfactor.Extensions.CAPlugin.DigicertMpki +namespace Keyfactor.Extensions.CAPlugin.DigicertMpki { public class DigicertMpkiConfig { @@ -17,5 +17,6 @@ public DigicertMpkiConfig() public string EmailConstName { get; set; } public string UpnConstName { get; set; } public int OuStartPoint { get; set; } + public bool Enabled { get; set; } = true; } } From c31c19b12610009f185d726216a8a7faa12535bd Mon Sep 17 00:00:00 2001 From: Keyfactor Date: Tue, 30 Sep 2025 20:07:59 +0000 Subject: [PATCH 7/9] Update generated docs --- README.md | 1 + integration-manifest.json | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d456be3..dac0fe5 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ Enrollment Format Specifications Located [here](https://pki-ws-rest.symauth.com/ * **ClientCertLocation** - Location on the Gateway Server File System of Client Certificate sample: C:\temp\myclientcert.pfx * **ClientCertPassword** - Password for the SOAP Client Certificate. * **EndpointAddress** - Endpoint address for SOAP Service sample: https://someurl/pki-ws/certificateManagementService. + * **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. TODO Certificate Template Creation Step is a required section diff --git a/integration-manifest.json b/integration-manifest.json index 63d4ce5..4f559d3 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -32,10 +32,14 @@ { "name": "EndpointAddress", "description": "Endpoint address for SOAP Service sample: https://someurl/pki-ws/certificateManagementService." + }, + { + "name": "Enabled", + "description": "Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available." } ], "enrollment_config": [], "product_ids": [] } } -} +} \ No newline at end of file From aadca623bf02cc3d2f89c2291d972790e8e19369 Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:16:54 -0400 Subject: [PATCH 8/9] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..2204491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +- 1.1.0 + - Enabled Flag For Gateway +- 1.0.0 + - Conversion to REST Framework From c08a852dc09087a6e8f2eb4727200652244f21c7 Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:51:18 -0400 Subject: [PATCH 9/9] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2204491..099826f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ - 1.1.0 - Enabled Flag For Gateway + - Dual Build Support - 1.0.0 - Conversion to REST Framework +