Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
08ae924
merge release 2.6.1 to main
doebrowsk May 30, 2025
813133f
merge 2.6.2 to main
doebrowsk Jun 20, 2025
c0c5207
Update generated docs
Jul 8, 2025
56127b1
#ab73289 Resolved issues parsing Distinguished Name subject string an…
Jul 8, 2025
8523458
Update generated docs
Jul 8, 2025
632a51c
Merge pull request #143 from Keyfactor/73289-Reenrollment_fails_using…
rcpokorny Jul 8, 2025
8d0d83f
#ab64674 - Added logic to remove old certs when not bound to any IIS …
Aug 5, 2025
62d6846
Update CSP Documentation
Aug 6, 2025
5c593e9
Update generated docs
Aug 6, 2025
ee3ee82
Merge pull request #145 from Keyfactor/64674-Remove_Old_Certs_On_Renewal
rcpokorny Aug 6, 2025
4d73691
#ab74699 - Fixed an error with complex PFX passwords
Aug 15, 2025
fb520aa
Merge pull request #146 from Keyfactor/74699-Fix_Error_When_PFX_Passw…
rcpokorny Aug 15, 2025
4793ccd
Fixed a null error and a binding context in the PowerShell script.
Aug 27, 2025
22c36a2
testing
Aug 28, 2025
0701ddb
test
Aug 28, 2025
5f8fffc
testing
Aug 28, 2025
26aea08
Fixed a problem returning thumbprints and binding to wrong websites.
Aug 29, 2025
2e4ac59
Merge pull request #148 from Keyfactor/75552-IIS_Binding_Issues
rcpokorny Aug 29, 2025
fb598c4
Updated documentation to note the dependencies when using containers.
Sep 5, 2025
4afa25b
Update generated docs
Sep 5, 2025
4158972
chore: Fixed an issue with null values when performing a remote ODKG …
Sep 8, 2025
6eb5830
Merge branch '75657-Update_Documentation_For_Container_Use' of https:…
Sep 8, 2025
c6b9415
Merge pull request #151 from Keyfactor/75657-Update_Documentation_For…
rcpokorny Sep 8, 2025
b868ecb
Update keyfactor-starter-workflow.yml
rcpokorny Sep 11, 2025
b5e9446
Update generated docs
Sep 11, 2025
f3a8a03
ab#76007 Updated the Get CSP function to support hybrid certificates.
Sep 17, 2025
0976981
Update generated docs
Sep 17, 2025
16c4d5f
Merge pull request #152 from Keyfactor/76007-CSP_formatted_wrong_when…
rcpokorny Sep 17, 2025
90213e5
Update generated docs
Sep 17, 2025
89e39ae
Fixed an error for OSKG jobs that contained no bindings.
Sep 19, 2025
1a15a12
Update generated docs
Sep 19, 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
19 changes: 13 additions & 6 deletions .github/workflows/keyfactor-starter-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,17 @@ on:

jobs:
call-starter-workflow:
uses: keyfactor/actions/.github/workflows/[email protected]
uses: keyfactor/actions/.github/workflows/starter.yml@v4
with:
command_token_url: ${{ vars.COMMAND_TOKEN_URL }} # Only required for doctool generated screenshots
command_hostname: ${{ vars.COMMAND_HOSTNAME }} # Only required for doctool generated screenshots
command_base_api_path: ${{ vars.COMMAND_API_PATH }} # Only required for doctool generated screenshots
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 }}
token: ${{ secrets.V2BUILDTOKEN}} # REQUIRED
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }} # Only required for golang builds
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }} # Only required for golang builds
scan_token: ${{ secrets.SAST_TOKEN }} # REQUIRED
entra_username: ${{ secrets.DOCTOOL_ENTRA_USERNAME }} # Only required for doctool generated screenshots
entra_password: ${{ secrets.DOCTOOL_ENTRA_PASSWD }} # Only required for doctool generated screenshots
command_client_id: ${{ secrets.COMMAND_CLIENT_ID }} # Only required for doctool generated screenshots
command_client_secret: ${{ secrets.COMMAND_CLIENT_SECRET }} # Only required for doctool generated screenshots
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2.6.3
* Fixed re-enrollment or ODKG job when RDN Components contained escaped commas.
* Updated renewal job for IIS Certs to delete the old cert if not bound or used by other web sites.
* Improved Inventory reporting of CSP when cert uses newer CNG Keys.
* Fixed an issue with complex PFX passwords that contained special characters such as '@' or '$', etc.
* Fixed an issue when adding certificate to store, sometimes the wrong thumbprint was returned, thus breaking web site binding.
* Removed the IIS bindings check. Now bindings are handled similar to IIS - if you bind a cert to a site using the same bindings, you risk the possibility of one of the duplicate sites to stop working and the certificate being bound to either site. Refer to IIS Documentation pertaining to HTTPS binding.
* Fixed an issue with (remote) ODKG jobs that caused an error when the CSP was not specified that included bindings.
* Fixed an issue with (remote) ODKG jobs that caused an error when the CSP was not specified that did not require binding.

2.6.2
* Fixed error when attempting to connect to remote computer using UO service account
* Fixed error when connecting to remote computer using HTTPS; was defaulting to HTTP
Expand Down
11 changes: 11 additions & 0 deletions IISU/ClientPSCertStoreReEnrollment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ public JobResult PerformReEnrollment(ReenrollmentJobConfiguration config, Submit
FailureMessage = ""
};

break;

case CertStoreBindingTypeENUM.None:

jobResult = new JobResult
{
Result = OrchestratorJobStatusJobResult.Success,
JobHistoryId = config.JobHistoryId,
FailureMessage = ""
};

break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion IISU/ImplementedStoreTypes/Win/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public JobResult ProcessJob(InventoryJobConfiguration jobConfiguration, SubmitIn
{
Result = OrchestratorJobStatusJobResult.Success,
JobHistoryId = jobConfiguration.JobHistoryId,
FailureMessage = ""
FailureMessage = $"Inventory completed returning {inventoryItems.Count} Items."
};
}

Expand Down
2 changes: 1 addition & 1 deletion IISU/ImplementedStoreTypes/WinIIS/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public JobResult ProcessJob(InventoryJobConfiguration jobConfiguration, SubmitIn
{
Result = OrchestratorJobStatusJobResult.Success,
JobHistoryId = jobConfiguration.JobHistoryId,
FailureMessage = ""
FailureMessage = $"Inventory completed returning {inventoryItems.Count} Items."
};
}

Expand Down
10 changes: 10 additions & 0 deletions IISU/ImplementedStoreTypes/WinIIS/Management.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Management.Automation;
using Keyfactor.Extensions.Orchestrator.WindowsCertStore.Models;
using Keyfactor.Logging;
Expand Down Expand Up @@ -89,6 +90,7 @@ public JobResult ProcessJob(ManagementJobConfiguration config)
string protocol = jobProperties?.WinRmProtocol;
string port = jobProperties?.WinRmPort;
bool includePortInSPN = (bool)jobProperties?.SpnPortFlag;
string alias = config.JobCertificate?.Alias?.Split(':').FirstOrDefault() ?? string.Empty; // Thumbprint is first part of the alias

_psHelper = new(protocol, port, includePortInSPN, _clientMachineName, serverUserName, serverPassword);

Expand Down Expand Up @@ -171,6 +173,14 @@ public JobResult ProcessJob(ManagementJobConfiguration config)
psResult = OrchestratorJobStatusJobResult.Unknown;
}

// Only is the binding returns successful, check of original cert is still bound to any site, if not remove it from the store
if (psResult == OrchestratorJobStatusJobResult.Success && !string.IsNullOrEmpty(alias))
{
_logger.LogTrace("Attempting to remove original certificate from store if it is no longer bound to any site.");
RemoveIISCertificate(alias);
_logger.LogTrace("Returned from removing cert if not used.");
}

complete = new JobResult
{
Result = psResult,
Expand Down
2 changes: 1 addition & 1 deletion IISU/ImplementedStoreTypes/WinSQL/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public JobResult ProcessJob(InventoryJobConfiguration jobConfiguration, SubmitIn
{
Result = OrchestratorJobStatusJobResult.Success,
JobHistoryId = jobConfiguration.JobHistoryId,
FailureMessage = ""
FailureMessage = $"Inventory completed returning {inventoryItems.Count} Items."
};
}

Expand Down
15 changes: 10 additions & 5 deletions IISU/PSHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public Collection<PSObject> ExecutePowerShellScript(string script)
}

// Add Parameters if provided
if (parameters != null)
if (parameters != null && parameters.Count > 0)
{
if (isLocalMachine || isScript)
{
Expand All @@ -398,13 +398,18 @@ public Collection<PSObject> ExecutePowerShellScript(string script)
else
{
// Remote execution: Use ArgumentList for parameters
var paramBlock = string.Join(", ", parameters.Select(p => $"[{p.Value.GetType().Name}] ${p.Key}"));
var paramBlock = string.Join(", ", parameters.Select(p =>
{
string typeName = p.Value?.GetType().Name ?? "object";
return $"[{typeName}] ${p.Key}";
}));

var paramUsage = string.Join(" ", parameters.Select(p => $"-{p.Key} ${p.Key}"));

string scriptBlockWithParams = $@"
param({paramBlock})
{commandOrScript} {paramUsage}
";
param({paramBlock})
{commandOrScript} {paramUsage}
";

PS.Commands.Clear(); // Clear previous commands
PS.AddCommand("Invoke-Command")
Expand Down
Loading
Loading