Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3c7d747
client cert support
dgaley May 15, 2025
65aacba
Merge pull request #20 from Keyfactor/clientcerts
dgaley May 15, 2025
4da801f
add logging for enrollments
dgaley May 15, 2025
ac1a562
Merge pull request #22 from Keyfactor/tracelogs
dgaley May 15, 2025
1977c8d
readme
dgaley May 21, 2025
048a7d5
Merge branch 'dev-2.1' of https://github.com/Keyfactor/digicert-certc…
dgaley May 21, 2025
18512ca
Update generated README
May 21, 2025
de0a9ba
Make Division a string instead of a number
dgaley Jun 25, 2025
65f6abd
Option to filter sync by division ID
dgaley Jun 27, 2025
540dccd
typo
dgaley Jun 27, 2025
eb060e0
Merge pull request #25 from Keyfactor/syncfilter
dgaley Jun 27, 2025
7126e4c
add support for division id on enroll
dgaley Jul 25, 2025
e137012
Merge branch 'dev-2.1' of https://github.com/Keyfactor/digicert-certc…
dgaley Jul 25, 2025
9597ab8
annotation, changelog and readme
dgaley Jul 25, 2025
b36d7dd
fix duplicate serial num check
dgaley Aug 4, 2025
9f7708e
fix for duplicate certs retrieval
dgaley Aug 7, 2025
956a2e8
Support for secure_email_* product types
dgaley Sep 18, 2025
a9e4417
better error message
dgaley Sep 18, 2025
6a844b0
update integration manifest
dgaley Sep 18, 2025
8c50c1b
workflow update
dgaley Sep 18, 2025
6acba7f
Merge pull request #26 from Keyfactor/smime
dgaley Sep 18, 2025
40a6600
fix workflow
dgaley Sep 18, 2025
27450ed
workflow
dgaley Sep 18, 2025
5bd5736
workflow
dgaley Sep 18, 2025
e44a3a0
workflow
dgaley Sep 18, 2025
737de65
manifest
dgaley Sep 18, 2025
d030398
Update generated docs
Sep 18, 2025
d868511
Merge pull request #28 from Keyfactor/smime
dgaley Sep 18, 2025
cd58a73
doc configuration
dgaley Sep 24, 2025
04e47cd
Update generated docs
Sep 24, 2025
f2b6927
Update CertCentralCAPlugin.cs
dgaley Sep 25, 2025
6f02ad1
Update CertCentralCAPlugin.cs
dgaley Sep 25, 2025
11614e0
Update CertCentralCAPlugin.cs
dgaley Sep 25, 2025
01ed1b3
Update CertCentralCAPlugin.cs
dgaley Sep 25, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/keyfactor-bootstrap-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:

jobs:
call-starter-workflow:
uses: keyfactor/actions/.github/workflows/starter.yml@v2
uses: keyfactor/actions/.github/workflows/starter.yml@v4
secrets:
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
scan_token: ${{ secrets.SAST_TOKEN }}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
16 changes: 11 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
### 2.0.0
* Initial Public Release
### 2.0.0
* Initial Public Release

### 2.0.1
* Add configuration fields to support sync filtering
* Bug fixes around SAN processing
### 2.0.1
* Add configuration fields to support sync filtering
* Bug fixes around SAN processing

### 2.1.0
* Add support for enrolling for client certs
* Option to filter sync by division ID
* Option to provide division ID for enrollment
* Add support for secure_email_* SMIME product types
160 changes: 99 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,125 @@
<h1 align="center" style="border-bottom: none">
DigiCert CertCentral Gateway AnyCA Gateway REST Plugin
</h1>

<p align="center">
<!-- Badges -->
<img src="https://img.shields.io/badge/integration_status-production-3D1973?style=flat-square" alt="Integration Status: production" />
<a href="https://github.com/Keyfactor/digicert-certcentral-caplugin/releases"><img src="https://img.shields.io/github/v/release/Keyfactor/digicert-certcentral-caplugin?style=flat-square" alt="Release" /></a>
<img src="https://img.shields.io/github/issues/Keyfactor/digicert-certcentral-caplugin?style=flat-square" alt="Issues" />
<img src="https://img.shields.io/github/downloads/Keyfactor/digicert-certcentral-caplugin/total?style=flat-square&label=downloads&color=28B905" alt="GitHub Downloads (all assets, all releases)" />
</p>

<p align="center">
<!-- TOC -->
<a href="#support">
<b>Support</b>
</a>
·
<a href="#requirements">
<b>Requirements</b>
</a>
·
<a href="#installation">
<b>Installation</b>
</a>
·
<a href="#license">
<b>License</b>
</a>
·
<a href="https://github.com/orgs/Keyfactor/repositories?q=anycagateway">
<b>Related Integrations</b>
</a>
</p>


The Digicert CertCentral AnyCA REST plugin extends the capabilities of Digicert's CertCentral product to Keyfactor Command via the Keyfactor AnyCA Gateway REST. The plugin represents a fully featured AnyCA REST Plugin with the following capabilies:
* SSL Certificate Synchronization
* SSL Certificate Enrollment
* SSL Certificate Revocation

## Compatibility

The DigiCert CertCentral Gateway AnyCA Gateway REST plugin is compatible with the Keyfactor AnyCA Gateway REST 24.2.0 and later.

## Support
The DigiCert CertCentral Gateway 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.

> 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.

## Requirements

An API Key within your Digicert account that has the necessary permissions to enroll, approve, and revoke certificates.

# DigiCert CertCentral AnyCA REST Gateway Plugin

DigiCert CertCentral plugin for the AnyCA REST Gateway framework

#### Integration status: Production - Ready for use in production environments.

## About the Keyfactor



## Support for DigiCert CertCentral AnyCA REST Gateway Plugin
## Installation

DigiCert CertCentral AnyCA REST Gateway 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
1. Install the AnyCA Gateway REST per the [official Keyfactor documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/InstallIntroduction.htm).

###### 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.
2. On the server hosting the AnyCA Gateway REST, download and unzip the latest [DigiCert CertCentral Gateway AnyCA Gateway REST plugin](https://github.com/Keyfactor/digicert-certcentral-caplugin/releases/latest) from GitHub.

---
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 CertCentral 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.


# Introduction
5. Navigate to the AnyCA Gateway REST portal and verify that the Gateway recognizes the DigiCert CertCentral Gateway plugin by hovering over the ⓘ symbol to the right of the Gateway on the top left of the portal.

This AnyCA REST Gateway plug-in enables issuance, revocation, and synchronization of certificates from DigiCert's CertCentral offering.
# Prerequisites
## Configuration

## Prerequisite: Certificate Chain
1. Follow the [official AnyCA Gateway REST documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCA-Gateway.htm) to define a new Certificate Authority, and use the notes below to configure the **Gateway Registration** and **CA Connection** tabs:

In order to request certificates from the Keyfactor AnyGateway, the Keyfactor Command server must trust the certificate chain of trust. To ensure trust is established, download your Root and/or Subordinate CA certificates from DigiCert and import them into the appropriate local certificate stores on the Keyfactor AnyGateway and Command servers. More information can be found in the [AnyCA Gateway REST Install Guide](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/Preparing.htm)
* **Gateway Registration**

## Installation
1. Download latest successful build from [GitHub Releases](../../releases/latest)
In order to enroll for certificates the Keyfactor Command server must trust the trust chain. Once you identify your Root and/or Subordinate CA in your Digicert account, make sure to download and import the certificate chain into the Command Server certificate store

2. Extract the .zip file, and from it, copy DigicertCAPlugin.dll and DigicertCAPlugin.deps.json to the 'C:\Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net6.0\Extensions' directory
* **CA Connection**

3. Within the 'C:\Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net6.0\Extensions\Connectors' folder, update the manifest.json file to contain the following:
Populate using the configuration fields collected in the [requirements](#requirements) section.

```json
{
"extensions": {
"Keyfactor.AnyGateway.Extensions.IAnyCAPlugin": {
"CertCentralCAPlugin": {
"assemblypath": "../DigicertCAPlugin.dll",
"TypeFullName": "Keyfactor.Extensions.CAPlugin.DigiCert.CertCentralCAPlugin"
}
}
}
}
```
* **APIKey** - API Key for connecting to DigiCert
* **DivisionId** - Division ID to use for retrieving product details (only if account is configured with per-divison product settings)
* **Region** - The geographic region that your DigiCert CertCentral account is in. Valid options are US and EU.
* **RevokeCertificateOnly** - Default DigiCert behavior on revocation requests is to revoke the entire order. If this value is changed to 'true', revocation requests will instead just revoke the individual certificate.
* **SyncCAFilter** - If you list one or more CA IDs here (comma-separated), the sync process will only sync records from those CAs. If you want to sync all CA IDs, leave this field empty.
* **SyncDivisionFilter** - If you list one or more Divison IDs (also known as Container IDs) here (comma-separated), the sync process will filter records to only return orders from those divisions. If you want to sync all divisions, leave this field empty. Note that this has no relationship to the value of the DivisionId config field.
* **FilterExpiredOrders** - If set to 'true', syncing will apply a filter to not return orders that are expired for longer than specified in SyncExpirationDays.
* **SyncExpirationDays** - If FilterExpiredOrders is set to true, this setting determines how many days in the past to still return expired orders. For example, a value of 30 means the sync will return any certs that expired within the past 30 days. A value of 0 means the sync will not return any certs that expired before the current day. This value is ignored if FilterExpiredOrders is false.
* **Enabled** - Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available.

NOTE: If the Connectors folder and/or the manifest.json file do not exist, they must be manually created
2. Note for SMIME product types (Secure Email types): The template configuration fields provided for those are not required to be filled out in the gateway config. Many of those values would change on a per-enrollment basis. The way to handle that is to create Enrollment fields in Command with the same name (for example: CommonNameIndicator) and then any values populated in those fields will override any static values provided in the configuration.

4. Restart the AnyCA Gateway service
3. Follow the [official Keyfactor documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCA-Keyfactor.htm) to add each defined Certificate Authority to Keyfactor Command and import the newly defined Certificate Templates.

5. Navigate to the AnyCA Gateway REST portal and verify that the Gateway recognizes the DigiCert plugin by hovering over the ⓘ symbol to the right of the Gateway on the top left of the portal. CAPlugin Type should now be listed as CertCentralCA.
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:

* **LifetimeDays** - OPTIONAL: The number of days of validity to use when requesting certs. If not provided, default is 365.
* **CACertId** - OPTIONAL: ID of issuing CA to use by DigiCert. If not provided, the default for your account will be used.
* **Organization-Name** - OPTIONAL: For requests that will not have a subject (such as ACME) you can use this field to provide the organization name. Value supplied here will override any CSR values, so do not include this field if you want the organization from the CSR to be used.
* **RenewalWindowDays** - OPTIONAL: The number of days from certificate expiration that the gateway should do a renewal rather than a reissue. If not provided, default is 90.
* **CertType** - OPTIONAL: The type of cert to enroll for. Valid values are 'ssl' and 'client'. The value provided here must be consistant with the ProductID. If not provided, default is 'ssl'. Ignored for secure_email_* product types.
* **EnrollDivisionId** - OPTIONAL: The division (container) ID to use for enrollments against this template.
* **CommonNameIndicator** - Required for secure_email_sponsor and secure_email_organization products, ignored otherwise. Defines the source of the common name. Valid values are: email_address, given_name_surname, pseudonym, organization_name
* **ProfileType** - Optional for secure_email_* types, ignored otherwise. Valid values are: strict, multipurpose. Default value is strict.
* **FirstName** - Required for secure_email_* types if CommonNameIndicator is given_name_surname, ignored otherwise.
* **LastName** - Required for secure_email_* types if CommonNameIndicator is given_name_surname, ignored otherwise.
* **Pseudonym** - Required for secure_email_* types if CommonNameIndicator is pseudonym, ignored otherwise.
* **UsageDesignation** - Required for secure_email_* types, ignored otherwise. The primary usage of the certificate. Valid values are: signing, key_management, dual_use

## Configuration

1. Follow the [official Keyfactor AnyCA Gateway REST documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCA-Gateway.htm#Add_or_Edit_a_Certificate_Authority) to define a new Certificate Authority, using the following information to configure the CA Connection section:

SETTING | REQUIRED? | DESCRIPTION
--|--|--
Enabled | Yes | Enables the DigiCert gateway functionality. Should almost always be set to 'true'
APIKey | Yes | The API key the Gateway should use to communicate with the DigiCert API. Can be generated from the DigiCert portal.
Region | No | The geographic region associated with your DigiCert account. Valid values are US and EU. Default if not provided is US.
DivisionId | No | If your CertCentral account has multiple divisions AND uses any custom per-division product settings, provide a division ID for the gateway to use for product type lookups.
RevokeCertificateOnly | No | If set to 'true', revoke operations will only revoke the individual certificate in question rather than the entire DigiCert order. Default if not provided is 'false'.
SyncCAFilter | No | If you list one or more DigiCert issuing CA IDs here (comma-separated if more than one), the sync process will only return certs issued by one of those CAs. Leave this option empty to sync all certs from all CAs.
FilterExpiredOrders | No | If set to 'true', syncing will not return certs that are expired more than a specified number of days. The number of days is specified by the SyncExpirationDays config option. Default value is 'false'.
SyncExpirationDays | No | Only used if FilterExpiredOrders is 'true', otherwise ignored. Sets the number of days a cert has to be expired for the sync process to no longer sync it. For example, a value of 30 means sync will continue to return certs that have expired within the past 30 days, but not ones older than that. Default value is 0, meaning sync would not return any certs expired before the current day.

2. After saving the CA configuration, Follow the [official AnyCA Gateway REST documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCP-Gateway.htm#Certificate_Profile) to define one or more Certificate Profiles.
3. Edit your newly configured CA, and you should now be able to modify the Templates tab. You need at least one template for each product type you wish to be able to enroll for. It is recommended to include the product type in the template name to make them easier to identify. Use the following information to configure the parameters for each template:
## License

SETTING | REQUIRED? | DESCRIPTION
--|--|--
LifetimeDays | No | The number of days of validity to use when requesting certs. Default if not provided is 365. NOTE FOR RENEWALS: If the value of LifetimeDays is evenly divisible by 365, the expiration day and month of the new cert will be set to the same values as the old cert if possible, to avoid renewal date drift.
CACertId | No | The ID of the issuing CA to be used by DigiCert. If not specified, the default for your account will be used.
Organization-Name | No | If specified, this value will override any organization name provided in the subject of the cert request on enrollment. Useful for requests (such as ACME) that contain no subject.
RenewalWindowDays | No | The number of days from expiration that the gateway should do a reissue rather than a renewal. Default if not provided is 90, meaning any renewal request for certs that expire in more than 90 days will be treated as a reissue request.
Apache License 2.0, see [LICENSE](LICENSE).

## Related Integrations

See all [Keyfactor Any CA Gateways (REST)](https://github.com/orgs/Keyfactor/repositories?q=anycagateway).
2 changes: 2 additions & 0 deletions digicert-certcentral-caplugin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A6058317-1B5E-4E7C-9669-B3A6C0E605BB}"
ProjectSection(SolutionItems) = preProject
CHANGELOG.md = CHANGELOG.md
docsource\configuration.md = docsource\configuration.md
integration-manifest.json = integration-manifest.json
.github\workflows\keyfactor-bootstrap-workflow.yml = .github\workflows\keyfactor-bootstrap-workflow.yml
readme_source.md = readme_source.md
EndProjectSection
EndProject
Expand Down
5 changes: 5 additions & 0 deletions digicert-certcentral-caplugin/API/ListCertificateOrders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public ListCertificateOrdersRequest(bool ignoreExpired = false)

public bool ignoreExpired { get; set; }
public int expiredWindow { get; set; } = 0;
public string divID { get; set; } = string.Empty;

public new string BuildParameters()
{
Expand All @@ -37,6 +38,10 @@ public ListCertificateOrdersRequest(bool ignoreExpired = false)
sbParamters.Append("limit=").Append(this.limit.ToString());
sbParamters.Append("&offset=").Append(HttpUtility.UrlEncode(this.offset.ToString()));

if (!string.IsNullOrEmpty(divID))
{
sbParamters.Append("&filters[container_id]=").Append(this.divID);
}
if (ignoreExpired)
{
DateTime cutoffDate = DateTime.Today.AddDays(-1 - expiredWindow);
Expand Down
3 changes: 3 additions & 0 deletions digicert-certcentral-caplugin/API/OrderCertificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public class CertificateRequest
[JsonProperty("dns_names")]
public List<string> DNSNames { get; set; }

[JsonProperty("emails")]
public List<String> Emails { get; set; }

[JsonProperty("csr")]
public string CSR { get; set; }

Expand Down
Loading
Loading