Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0.1 #19

Merged
merged 71 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0101f52
add comments
dgaley Jun 30, 2023
f2b8ea9
package reference
dgaley Jun 30, 2023
23a2c5e
Merge pull request #4 from Keyfactor/main
dgaley Jun 30, 2023
c94f7d9
Change status codes to EndEntityStatus codes
dgaley Jul 11, 2023
813a0a8
If digicert returns multiple identical certs (same order/cert ID pair…
dgaley Jul 11, 2023
1b3ceb0
Renew/reissue check added, parameter data types specified
dgaley Jul 26, 2023
4f08099
Don't throw exceptions when unable to retreive product IDs
dgaley Aug 22, 2023
94a7cb2
Prevent duplicate certs from syncing
dgaley Aug 23, 2023
4008aee
Update generated README
Aug 23, 2023
ab2e402
Error update
dgaley Oct 16, 2023
c363177
Merge branch 'renewcheck' of https://github.com/Keyfactor/digicert-ce…
dgaley Oct 16, 2023
a9d979b
update package reference and object names
dgaley Nov 16, 2023
8c59dae
Remove unused cert-store-merge step
fiddlermikey Nov 16, 2023
bf52f55
readme update
dgaley Jan 2, 2024
98ad090
Update generated README
Jan 2, 2024
768ab96
fix unit conversion
dgaley Jan 2, 2024
cfb4979
Merge branch 'renewcheck' of https://github.com/Keyfactor/digicert-ce…
dgaley Jan 2, 2024
6730074
Merge pull request #3 from Keyfactor/renewcheck
dgaley Jan 4, 2024
48a3fe7
Add Enabled config flag
dgaley Mar 11, 2024
61fd7e0
Update CertCentralCAConnector.cs
dgaley Mar 11, 2024
33ab07c
Merge pull request #6 from Keyfactor/skipvalidation
dgaley Mar 11, 2024
ac791a7
Port sync CA filter from DCOM gateway
dgaley Apr 19, 2024
f4bd0b7
Merge pull request #7 from Keyfactor/syncfilter
dgaley Apr 19, 2024
5bd813c
Project rename
dgaley Apr 19, 2024
eaf1549
Merge pull request #8 from Keyfactor/rename
dgaley Apr 19, 2024
b2e4493
Directory/solution rename
dgaley Apr 19, 2024
96d6b23
Update generated README
Apr 19, 2024
fc1cfb8
Merge pull request #9 from Keyfactor/rename
dgaley Apr 19, 2024
222f5fa
readme fixes
dgaley May 8, 2024
805fe93
Update generated README
May 8, 2024
ed77ae2
Readme updates
dgaley May 30, 2024
efa4d62
Merge branch '2.0' of https://github.com/Keyfactor/digicert-certcentr…
dgaley May 30, 2024
6f96cdb
readme fix
dgaley May 30, 2024
91922a4
Update generated README
May 30, 2024
48c12bf
package updates
dgaley May 30, 2024
92785c2
Merge branch '2.0' of https://github.com/Keyfactor/digicert-certcentr…
dgaley May 30, 2024
6d113d0
update manifest
dgaley May 30, 2024
726f581
Update generated README
May 30, 2024
24a2761
Update CHANGELOG.md
fiddlermikey May 30, 2024
d1b8e47
update workflow to bootstrap
May 30, 2024
57e83a4
Update generated README
May 30, 2024
9e2667a
update type, prep for catalog update
Jun 3, 2024
37737c8
Update generated README
Jun 3, 2024
a9b9e32
minor update to integration name
Jun 3, 2024
e0ada65
Merge branch '2.0' of https://github.com/Keyfactor/digicert-certcentr…
Jun 3, 2024
c019e4c
Update generated README
Jun 3, 2024
fa61e0b
Fix md rendering (#10)
fiddlermikey Jun 4, 2024
8ff0de5
update readme
dgaley Jun 6, 2024
a8b3f0b
Update generated README
Jun 6, 2024
1b36df1
Merge pull request #11 from Keyfactor/readme
dgaley Jun 6, 2024
98de45a
readme updates
dgaley Jun 6, 2024
0c2383f
Merge branch 'readme' of https://github.com/Keyfactor/digicert-certce…
dgaley Jun 6, 2024
bd0041e
Update generated README
Jun 6, 2024
b58f803
Merge pull request #12 from Keyfactor/readme
dgaley Jun 6, 2024
4eeac33
2.0 release (#5)
dgaley Jun 12, 2024
697ba54
nuget package reference version rollback
dgaley Jun 12, 2024
eb4978e
Merge branch 'release-2.0' into 2.0
fiddlermikey Jun 12, 2024
23d5c82
2.0.0 Initial Release (#14)
fiddlermikey Jun 12, 2024
f72904c
Fix merge conflict to main
Jun 12, 2024
eff9de9
clean up merge, remove old package reference
Jun 12, 2024
30a8f8e
add syncfilter config options to annotations
dgaley Aug 28, 2024
3362b99
Merge pull request #15 from Keyfactor/syncfilter-config
dgaley Aug 28, 2024
ed28ee0
Merge branch 'release-2.0' into 2.0
dgaley Aug 28, 2024
a662443
log subject and sans on enroll call
dgaley Dec 20, 2024
4c1e853
Merge pull request #17 from Keyfactor/logging
dgaley Dec 20, 2024
d565d2f
add check for "dnsname" type SANs
dgaley Jan 16, 2025
6e02da8
Merge pull request #18 from Keyfactor/sanfix
dgaley Jan 16, 2025
d091629
Update CHANGELOG.md
dgaley Jan 23, 2025
c4bc256
Update CHANGELOG.md
doebrowsk Jan 23, 2025
7dd3e56
Merge pull request #16 for release 2.0.1
doebrowsk Jan 23, 2025
69211ee
Merge branch 'main' into release-2.0
doebrowsk Jan 23, 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: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
### 2.0.0
* Initial Public Release

### 2.0.1
* Add configuration fields to support sync filtering
* Bug fixes around SAN processing
40 changes: 38 additions & 2 deletions digicert-certcentral-caplugin/CertCentralCAPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@
public async Task<EnrollmentResult> Enroll(string csr, string subject, Dictionary<string, string[]> san, EnrollmentProductInfo productInfo, RequestFormat requestFormat, EnrollmentType enrollmentType)
{
_logger.MethodEntry(LogLevel.Trace);

_logger.LogDebug($"Enrolling for certificate with subject {subject}");
foreach (var sanlist in san)
{
string sans = string.Join(",", sanlist.Value);
_logger.LogDebug($"SANs type \"{sanlist.Key}\": {sans}");
}

OrderResponse orderResponse = new OrderResponse();
CertCentralCertType certType = CertCentralCertType.GetAllTypes(_config).FirstOrDefault(x => x.ProductCode.Equals(productInfo.ProductID));
OrderRequest orderRequest = new OrderRequest(certType);
Expand Down Expand Up @@ -88,6 +96,11 @@
dnsNames = new List<string>(san["Dns"]);
}

if (san.ContainsKey("dnsname"))
{
dnsNames = new List<string>(san["dnsname"]);
}

X509Name subjectParsed = null;
string commonName = null, organization = null, orgUnit = null;
try
Expand Down Expand Up @@ -356,6 +369,28 @@
DefaultValue = false,
Type = "Boolean"
},

[CertCentralConstants.Config.SYNC_CA_FILTER] = new PropertyConfigInfo()
{
Comments = "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.",
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.",
Hidden = false,
DefaultValue = false,
Type = "Boolean"
},
[CertCentralConstants.Config.SYNC_EXPIRATION_DAYS] = new PropertyConfigInfo()
{
Comments = "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.",
Hidden = false,
DefaultValue = 30,
Type = "Number"
},
[CertCentralConstants.Config.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.",
Expand Down Expand Up @@ -404,7 +439,7 @@
/// </summary>
/// <param name="caRequestID">The gateway request ID of the record to retrieve, in the format 'orderID-certID'</param>
/// <returns></returns>
public async Task<AnyCAPluginCertificate> GetSingleRecord(string caRequestID)

Check warning on line 442 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 442 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 442 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 442 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
_logger.MethodEntry(LogLevel.Trace);
// Split ca request id into order and cert id
Expand Down Expand Up @@ -498,7 +533,7 @@
/// </summary>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public async Task Ping()

Check warning on line 536 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 536 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 536 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 536 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
_logger.MethodEntry(LogLevel.Trace);
if (!_config.Enabled)
Expand Down Expand Up @@ -540,7 +575,7 @@
/// <returns></returns>
/// <exception cref="COMException"></exception>
/// <exception cref="Exception"></exception>
public async Task<int> Revoke(string caRequestID, string hexSerialNumber, uint revocationReason)

Check warning on line 578 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 578 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 578 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 578 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
_logger.MethodEntry(LogLevel.Trace);
int orderId = Int32.Parse(caRequestID.Substring(0, caRequestID.IndexOf('-')));
Expand Down Expand Up @@ -600,7 +635,7 @@
/// <param name="cancelToken"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public async Task Synchronize(BlockingCollection<AnyCAPluginCertificate> blockingBuffer, DateTime? lastSync, bool fullSync, CancellationToken cancelToken)

Check warning on line 638 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 638 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 638 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 638 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
_logger.MethodEntry(LogLevel.Trace);

Expand All @@ -618,9 +653,10 @@
List<string> skippedOrders = new List<string>();
int certCount = 0;

string syncCAstring = string.Join(",", _config.SyncCAFilter ?? new List<string>());
string syncCAstring = _config.SyncCAFilter ?? string.Empty;
_logger.LogTrace($"Sync CAs: {syncCAstring}");
List<string> caList = _config.SyncCAFilter ?? new List<string>();
List<string> caList = _config.SyncCAs;

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


Expand Down Expand Up @@ -740,7 +776,7 @@
/// </summary>
/// <param name="connectionInfo"></param>
/// <returns></returns>
public async Task ValidateCAConnectionInfo(Dictionary<string, object> connectionInfo)

Check warning on line 779 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 779 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 779 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 779 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
_logger.MethodEntry(LogLevel.Trace);
try
Expand Down Expand Up @@ -811,7 +847,7 @@
/// <param name="connectionInfo"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public async Task ValidateProductInfo(EnrollmentProductInfo productInfo, Dictionary<string, object> connectionInfo)

Check warning on line 850 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 850 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 850 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 850 in digicert-certcentral-caplugin/CertCentralCAPlugin.cs

View workflow job for this annotation

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

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
_logger.MethodEntry(LogLevel.Trace);
// Set up.
Expand Down
19 changes: 17 additions & 2 deletions digicert-certcentral-caplugin/CertCentralConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,29 @@ public class CertCentralConfig

public CertCentralConfig()
{
SyncCAFilter = new List<string>();

}
public string APIKey { get; set; }
public string Region { get; set; } = "US";
public int? DivisionId { get; set; }
public bool? RevokeCertificateOnly { get; set; }
public bool Enabled { get; set; } = true;
public List<string> SyncCAFilter { get; set; }
public string SyncCAFilter { get; set; }
public List<string> SyncCAs
{
get
{
if (!string.IsNullOrEmpty(SyncCAFilter))
{
return SyncCAFilter.Split(',').ToList();
}
else
{
return new List<string>();
}
}
}

public bool? FilterExpiredOrders { get; set; }
public int? SyncExpirationDays { get; set; }
}
Expand Down
3 changes: 3 additions & 0 deletions digicert-certcentral-caplugin/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class Config
public const string RENEWAL_WINDOW = "RenewalWindowDays";
public const string REVOKE_CERT = "RevokeCertificateOnly";
public const string ENABLED = "Enabled";
public const string SYNC_CA_FILTER = "SyncCAFilter";
public const string FILTER_EXPIRED = "FilterExpiredOrders";
public const string SYNC_EXPIRATION_DAYS = "SyncExpirationDays";
}

public class RequestAttributes
Expand Down
Loading