Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@

### 2.3.0
* Add configuration flag to support adding KDC/SmartCardLogon EKU to ssl cert requests

### 2.4.0
* Add configuration flag to support Intel vPro EKU on ssl cert requests
* Add ability to filter sync by product ID
* Bug fix for SMIME cert renewal
* Bug fix for template validation
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ An API Key within your Digicert account that has the necessary permissions to en
* **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.
* **SyncProductFilter** - If you list one or more Product IDs here (comma-separated), the sync process will filter records to only return orders of those product types. Leave empty to sync all products.
* **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.
Expand All @@ -106,8 +107,9 @@ An API Key within your Digicert account that has the necessary permissions to en
* **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.
* **IncludeClientAuthEKU** - OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the Client Authentication EKU added to the request. NOTE: This feature is currently planned to be removed by DigiCert in March 2027.
* **IncludeKDCSmartCardLogonEKU** - OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the KDC/SmartCardLogon EKU added to the request.
* **IncludeClientAuthEKU** - OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the Client Authentication EKU added to the request. NOTE: Only one EKU option can be set for any given enrollment. NOTE: This feature is currently planned to be removed by DigiCert in March 2027.
* **IncludeKDCSmartCardLogonEKU** - OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the KDC/SmartCardLogon EKU added to the request. NOTE: Only one EKU option can be set for any given enrollment.
* **IncludeIntelvProEKU** - OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the Intel vPro EKU added to the request. NOTE: Only one EKU option can be set for any given enrollment.
* **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. Use 'multipurpose' if your cert includes any additional EKUs such as client auth. Default if not provided is dependent on product configuration within Digicert portal.
Expand Down
11 changes: 8 additions & 3 deletions digicert-certcentral-caplugin/API/ListCertificateOrders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public ListCertificateOrdersRequest(bool ignoreExpired = false)

public bool ignoreExpired { get; set; }
public int expiredWindow { get; set; } = 0;
public string divID { get; set; } = string.Empty;
public List<string> divIDs { get; set; } = new List<string>();
public List<string> productIDs { get; set; } = new List<string>();

public new string BuildParameters()
{
Expand All @@ -38,9 +39,13 @@ 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))
foreach (string divID in this.divIDs)
{
sbParamters.Append("&filters[container_id]=").Append(this.divID);
sbParamters.Append("&filters[container_id]=").Append(divID);
}
foreach (string productID in productIDs)
{
sbParamters.Append("&filters[product_name_id]=").Append(productID);
}
if (ignoreExpired)
{
Expand Down
97 changes: 57 additions & 40 deletions digicert-certcentral-caplugin/CertCentralCAPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,10 @@ public async Task<EnrollmentResult> Enroll(string csr, string subject, Dictionar
{
bool clientAuth = Convert.ToBoolean(productInfo.ProductParameters[CertCentralConstants.Config.INCLUDE_CLIENT_AUTH]);
bool kdc = Convert.ToBoolean(productInfo.ProductParameters[CertCentralConstants.Config.INCLUDE_KDC]);
if (clientAuth && kdc)
bool intel = Convert.ToBoolean(productInfo.ProductParameters[CertCentralConstants.Config.INCLUDE_INTEL]);
if ((clientAuth ? 1 : 0) + (kdc ? 1 : 0) + (intel ? 1 : 0) >= 2) //If more than one EKU option is selected
{
throw new Exception($"Cannot enroll for cert with both Client Auth and KDC/SmartCardLogon EKU set to 'true'");
throw new Exception($"Cannot enroll for cert with more than one EKU option selected");
}
if (clientAuth)
{
Expand All @@ -316,6 +317,10 @@ public async Task<EnrollmentResult> Enroll(string csr, string subject, Dictionar
{
orderRequest.Certificate.ProfileOption = "kdc_smart_card";
}
else if (intel)
{
orderRequest.Certificate.ProfileOption = "intel_vpro_eku";
}
}

bool dupe = false;
Expand Down Expand Up @@ -476,6 +481,13 @@ public Dictionary<string, PropertyConfigInfo> GetCAConnectorAnnotations()
DefaultValue = "",
Type = "String"
},
[CertCentralConstants.Config.SYNC_PROD_FILTER] = new PropertyConfigInfo()
{
Comments = "If you list one or more Product IDs here (comma-separated), the sync process will filter records to only return orders of those product types. Leave empty to sync all products.",
Hidden = false,
DefaultValue = "",
Type = "String"
},
[CertCentralConstants.Config.FILTER_EXPIRED] = new PropertyConfigInfo()
{
Comments = "If set to 'true', syncing will apply a filter to not return orders that are expired for longer than specified in SyncExpirationDays.",
Expand Down Expand Up @@ -633,14 +645,21 @@ public Dictionary<string, PropertyConfigInfo> GetTemplateParameterAnnotations()
},
[CertCentralConstants.Config.INCLUDE_CLIENT_AUTH] = new PropertyConfigInfo()
{
Comments = "OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the Client Authentication EKU added to the request. NOTE: This feature is currently planned to be removed by DigiCert in March 2027.",
Comments = "OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the Client Authentication EKU added to the request. NOTE: Only one EKU option can be set for any given enrollment. NOTE: This feature is currently planned to be removed by DigiCert in March 2027.",
Hidden = false,
DefaultValue = false,
Type = "Boolean"
},
[CertCentralConstants.Config.INCLUDE_KDC] = new PropertyConfigInfo()
{
Comments = "OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the KDC/SmartCardLogon EKU added to the request.",
Comments = "OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the KDC/SmartCardLogon EKU added to the request. NOTE: Only one EKU option can be set for any given enrollment.",
Hidden = false,
DefaultValue = false,
Type = "Boolean"
},
[CertCentralConstants.Config.INCLUDE_INTEL] = new PropertyConfigInfo()
{
Comments = "OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the Intel vPro EKU added to the request. NOTE: Only one EKU option can be set for any given enrollment.",
Hidden = false,
DefaultValue = false,
Type = "Boolean"
Expand Down Expand Up @@ -834,12 +853,17 @@ public async Task Synchronize(BlockingCollection<AnyCAPluginCertificate> blockin

caList.ForEach(c => c.ToUpper());

List<string> divFilters = null;
List<string> divFilters = new List<string>();
if (!string.IsNullOrEmpty(_config.SyncDivisionFilter))
{
divFilters = new List<string>();
divFilters.AddRange(_config.SyncDivisionFilter.Split(','));
}
List<string> productFilters = new List<string>();
if (!string.IsNullOrEmpty(_config.SyncProductFilter))
{
_logger.LogTrace($"Sync Products: {_config.SyncProductFilter}");
productFilters = _config.SyncProducts;
}

if (fullSync)
{
Expand All @@ -857,37 +881,20 @@ public async Task Synchronize(BlockingCollection<AnyCAPluginCertificate> blockin
long starttime = time;
_logger.LogDebug($"SYNC: Starting sync at time {time}");
List<Order> allOrders = new List<Order>();
if (divFilters != null)

ListCertificateOrdersResponse ordersResponse = client.ListAllCertificateOrders(ignoreExpired, expiredWindow, divFilters, productFilters);
if (ordersResponse.Status == CertCentralBaseResponse.StatusType.ERROR)
{
foreach (string div in divFilters)
{
ListCertificateOrdersResponse ordersResponse = client.ListAllCertificateOrders(ignoreExpired, expiredWindow, div);
if (ordersResponse.Status == CertCentralBaseResponse.StatusType.ERROR)
{
Error error = ordersResponse.Errors[0];
_logger.LogError("Error in listing all certificate orders");
throw new Exception($"DigiCert CertCentral web service returned {error.code} - {error.message} when retrieving all rows");
}
else
{
allOrders.AddRange(ordersResponse.orders);
}
}
Error error = ordersResponse.Errors[0];
_logger.LogError("Error in listing all certificate orders");
throw new Exception($"DigiCert CertCentral web service returned {error.code} - {error.message} when retrieving all rows");
}
else
{
ListCertificateOrdersResponse ordersResponse = client.ListAllCertificateOrders(ignoreExpired, expiredWindow, null);
if (ordersResponse.Status == CertCentralBaseResponse.StatusType.ERROR)
{
Error error = ordersResponse.Errors[0];
_logger.LogError("Error in listing all certificate orders");
throw new Exception($"DigiCert CertCentral web service returned {error.code} - {error.message} when retrieving all rows");
}
else
{
allOrders.AddRange(ordersResponse.orders);
}
allOrders.AddRange(ordersResponse.orders);
}


_logger.LogDebug($"SYNC: Found {allOrders.Count} records");
foreach (var orderDetails in allOrders)
{
Expand All @@ -897,7 +904,7 @@ public async Task Synchronize(BlockingCollection<AnyCAPluginCertificate> blockin
cancelToken.ThrowIfCancellationRequested();
string caReqId = orderDetails.id + "-" + orderDetails.certificate.id;
_logger.LogDebug($"SYNC: Retrieving certs for order id {orderDetails.id}");
orderCerts = GetAllConnectorCertsForOrder(caReqId, caList, divFilters);
orderCerts = GetAllConnectorCertsForOrder(caReqId, caList, divFilters, productFilters);
if (orderCerts == null || orderCerts.Count == 0)
{
continue;
Expand Down Expand Up @@ -939,7 +946,7 @@ public async Task Synchronize(BlockingCollection<AnyCAPluginCertificate> blockin
{
cancelToken.ThrowIfCancellationRequested();
string caReqId = order.order_id + "-" + order.certificate_id;
orderCerts = GetAllConnectorCertsForOrder(caReqId, caList, divFilters);
orderCerts = GetAllConnectorCertsForOrder(caReqId, caList, divFilters, productFilters);
if (orderCerts == null || orderCerts.Count > 0)
{
continue;
Expand Down Expand Up @@ -1087,10 +1094,11 @@ public async Task ValidateProductInfo(EnrollmentProductInfo productInfo, Diction
// Get product ID details.
CertificateTypeDetailsRequest detailsRequest = new CertificateTypeDetailsRequest(product.NameId);

// For pulling product ID details, we use the Connection-level Division ID rather than the enrollment-level one.
detailsRequest.ContainerId = null;
if (productInfo.ProductParameters.ContainsKey(CertCentralConstants.Config.ENROLL_DIVISION_ID))
if (connectionInfo.ContainsKey(CertCentralConstants.Config.DIVISION_ID))
{
string div = productInfo.ProductParameters[CertCentralConstants.Config.ENROLL_DIVISION_ID].ToString();
string div = connectionInfo[CertCentralConstants.Config.DIVISION_ID].ToString();
if (!string.IsNullOrWhiteSpace(div))
{
if (int.TryParse($"{div}", out int divId))
Expand Down Expand Up @@ -1122,7 +1130,7 @@ public async Task ValidateProductInfo(EnrollmentProductInfo productInfo, Diction
}
}

bool clientAuth = false, kdc = false;
bool clientAuth = false, kdc = false, intel = false;
if (productInfo.ProductParameters.ContainsKey(CertCentralConstants.Config.INCLUDE_CLIENT_AUTH))
{
clientAuth = Convert.ToBoolean(productInfo.ProductParameters[CertCentralConstants.Config.INCLUDE_CLIENT_AUTH]);
Expand All @@ -1131,9 +1139,13 @@ public async Task ValidateProductInfo(EnrollmentProductInfo productInfo, Diction
{
kdc = Convert.ToBoolean(productInfo.ProductParameters[CertCentralConstants.Config.INCLUDE_KDC]);
}
if (clientAuth && kdc)
if (productInfo.ProductParameters.ContainsKey(CertCentralConstants.Config.INCLUDE_INTEL))
{
intel = Convert.ToBoolean(productInfo.ProductParameters[CertCentralConstants.Config.INCLUDE_INTEL]);
}
if ((clientAuth ? 1 : 0) + (kdc ? 1 : 0) + (intel ? 1 : 0) >= 2) // If more than one EKU option is selected
{
throw new AnyCAValidationException($"Unable to use both {CertCentralConstants.Config.INCLUDE_CLIENT_AUTH} and {CertCentralConstants.Config.INCLUDE_KDC} in the same certificate.");
throw new AnyCAValidationException($"Unable to use more than one of: {CertCentralConstants.Config.INCLUDE_CLIENT_AUTH}, {CertCentralConstants.Config.INCLUDE_KDC}, or {CertCentralConstants.Config.INCLUDE_INTEL} in the same certificate.");
}

_logger.MethodExit(LogLevel.Trace);
Expand Down Expand Up @@ -1639,7 +1651,7 @@ string FormatSyncDate(DateTime? syncTime)
/// </summary>
/// <param name="caRequestID"></param>
/// <returns></returns>
private List<AnyCAPluginCertificate> GetAllConnectorCertsForOrder(string caRequestID, List<string> caFilterIds, List<string> divIds)
private List<AnyCAPluginCertificate> GetAllConnectorCertsForOrder(string caRequestID, List<string> caFilterIds, List<string> divIds, List<string> productIds)
{
_logger.MethodEntry(LogLevel.Trace);
// Split ca request id into order and cert id
Expand All @@ -1662,6 +1674,10 @@ private List<AnyCAPluginCertificate> GetAllConnectorCertsForOrder(string caReque
_logger.LogTrace($"Found order ID {orderId} that does not match Division filter. Division ID: {orderResponse.container.Id.ToString()} Skipping...");
return null;
}
if (productIds != null && productIds.Count > 0 && !productIds.Contains(orderResponse.product.name_id.ToString()))
{
_logger.LogTrace($"Found order ID {orderId} that does not match Product filter. Product ID: {orderResponse.product.name_id.ToString()} Skipping...");
}

var orderCerts = GetAllCertsForOrder(orderId);

Expand Down Expand Up @@ -2063,6 +2079,7 @@ private EnrollmentResult EnrollForSmimeCert(string csr, string subject, Dictiona

if (enrollmentType == EnrollmentType.Renew)
{
priorCertSnString = productInfo.ProductParameters["PriorCertSN"];
priorCertReqID = _certificateDataReader.GetRequestIDBySerialNumber(priorCertSnString).Result;
if (string.IsNullOrEmpty(priorCertReqID))
{
Expand Down
15 changes: 15 additions & 0 deletions digicert-certcentral-caplugin/CertCentralConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ public List<string> SyncCAs
}
}
}
public string SyncProductFilter { get; set; }
public List<string> SyncProducts
{
get
{
if (!string.IsNullOrEmpty(SyncProductFilter))
{
return SyncProductFilter.Split(",").ToList();
}
else
{
return new List<string>();
}
}
}

public bool? FilterExpiredOrders { get; set; }
public int? SyncExpirationDays { get; set; }
Expand Down
5 changes: 3 additions & 2 deletions digicert-certcentral-caplugin/Client/CertCentralClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

Logger.LogTrace($"Entered CertCentral Request (ID: {reqID}) Method: {request.Method} - URL: {targetURI}");

HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(targetURI);

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)

Check warning on line 100 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

'WebRequest.Create(string)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.' (https://aka.ms/dotnet-warnings/SYSLIB0014)
objRequest.Method = request.Method;
objRequest.Headers.Add("X-DC-DEVKEY", this.CertCentralCreds.APIKey);

Expand Down Expand Up @@ -148,13 +148,13 @@
}
else
{
Logger.LogDebug("CertCentral Response Error", wex);

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 151 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)
throw new Exception("Unable to establish connection to CertCentral web service", wex);
}
}
catch (Exception ex)
{
Logger.LogError("CertCentral Response Error", ex);

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)

Check warning on line 157 in digicert-certcentral-caplugin/Client/CertCentralClient.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)
throw new Exception("Unable to establish connection to CertCentral web service", ex);
}

Expand Down Expand Up @@ -523,7 +523,7 @@
return dlCertificateRequestResponse;
}

public ListCertificateOrdersResponse ListAllCertificateOrders(bool ignoreExpired = false, int expiredWindow = 0, string divId = "")
public ListCertificateOrdersResponse ListAllCertificateOrders(bool ignoreExpired, int expiredWindow, List<string> divIds, List<string> productIds)
{
int batch = 1000;
ListCertificateOrdersResponse totalResponse = new ListCertificateOrdersResponse();
Expand All @@ -536,7 +536,8 @@
offset = totalResponse.orders.Count,
ignoreExpired = ignoreExpired,
expiredWindow = expiredWindow,
divID = divId
divIDs = divIds,
productIDs = productIds
};

CertCentralResponse response = Request(request, request.BuildParameters());
Expand Down
2 changes: 2 additions & 0 deletions digicert-certcentral-caplugin/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ public class Config
public const string ENABLED = "Enabled";
public const string SYNC_CA_FILTER = "SyncCAFilter";
public const string SYNC_DIV_FILTER = "SyncDivisionFilter";
public const string SYNC_PROD_FILTER = "SyncProductFilter";
public const string FILTER_EXPIRED = "FilterExpiredOrders";
public const string SYNC_EXPIRATION_DAYS = "SyncExpirationDays";
public const string CERT_TYPE = "CertType";
public const string INCLUDE_CLIENT_AUTH = "IncludeClientAuthEKU";
public const string INCLUDE_KDC = "IncludeKDCSmartCardLogonEKU";
public const string INCLUDE_INTEL = "IncludeIntelvProEKU";
public const string ENROLL_DIVISION_ID = "EnrollDivisionId";
public const string COMMON_NAME_INDICATOR = "CommonNameIndicator";
public const string PROFILE_TYPE = "ProfileType";
Expand Down
Loading
Loading