Skip to content

Commit c6b9415

Browse files
authored
Merge pull request #151 from Keyfactor/75657-Update_Documentation_For_Container_Use
75657 update documentation for container use & Fixed Null error
2 parents 2e4ac59 + 6eb5830 commit c6b9415

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Fixed an issue with complex PFX passwords that contained special characters such as '@' or '$', etc.
66
* Fixed an issue when adding certificate to store, sometimes the wrong thumbprint was returned, thus breaking web site binding.
77
* 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.
8+
* Fixed an issue with (remote) ODKG jobs that caused an error when the CSP was not specified.
89

910
2.6.2
1011
* Fixed error when attempting to connect to remote computer using UO service account

IISU/PSHelper.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public Collection<PSObject> ExecutePowerShellScript(string script)
386386
}
387387

388388
// Add Parameters if provided
389-
if (parameters != null)
389+
if (parameters != null && parameters.Count > 0)
390390
{
391391
if (isLocalMachine || isScript)
392392
{
@@ -398,13 +398,18 @@ public Collection<PSObject> ExecutePowerShellScript(string script)
398398
else
399399
{
400400
// Remote execution: Use ArgumentList for parameters
401-
var paramBlock = string.Join(", ", parameters.Select(p => $"[{p.Value.GetType().Name}] ${p.Key}"));
401+
var paramBlock = string.Join(", ", parameters.Select(p =>
402+
{
403+
string typeName = p.Value?.GetType().Name ?? "object";
404+
return $"[{typeName}] ${p.Key}";
405+
}));
406+
402407
var paramUsage = string.Join(" ", parameters.Select(p => $"-{p.Key} ${p.Key}"));
403408

404409
string scriptBlockWithParams = $@"
405-
param({paramBlock})
406-
{commandOrScript} {paramUsage}
407-
";
410+
param({paramBlock})
411+
{commandOrScript} {paramUsage}
412+
";
408413

409414
PS.Commands.Clear(); // Clear previous commands
410415
PS.AddCommand("Invoke-Command")

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,19 @@ Before installing the Windows Certificate Universal Orchestrator extension, we r
9292

9393

9494
<details>
95-
<summary><b>Using the WinCert Extension on Linux servers:</b></summary>
95+
<summary><b>Using the WinCert Extension on Linux servers and/or with Docker Containers:</b></summary>
9696

9797
1. General SSH Setup Information: PowerShell 6 or higher and SSH must be installed on all computers. Install SSH, including ssh server, that's appropriate for your platform. You also need to install PowerShell from GitHub to get the SSH remoting feature. The SSH server must be configured to create a SSH subsysten to host a PowerShell process on the remote computer. It is suggested to turn off password authentication as this extension uses key-based authentication.
9898

9999
2. SSH Authentication: When creating a Keyfactor certificate store for the WinCert orchestrator extension, the only protocol supported to communicate with Windows servers is ssh. When providing the user id and password, the connection is attempted by creating a temporary private key file using the contents in the Password textbox. Therefore, the password field must contain the full SSH Private key.
100100

101+
3. If you choose to run this extension in a containerized environment, the container image must include PowerShell version 7.5 or later, along with either OpenSSH clients (for SSH-based connections) or OpenSSL (if SSL/TLS operations are required). Additionally, the PWSMan PowerShell module must be installed to support management tasks and remote session functionality. These dependencies are required to ensure full compatibility when connecting from the container to remote Windows servers. Below is an example Docker file snippet:
102+
```
103+
dnf install https://github.com/PowerShell/PowerShell/releases/download/v7.5.2/powershell-7.5.2-1.rh.x86_64.rpm
104+
pwsh -Command 'Install-Module -Name PSWSMan'
105+
dnf install openssh-clients openssl
106+
```
107+
101108
</details>
102109

103110
<details>

docsource/content.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,19 @@ In version 2.0 of the IIS Orchestrator, the certificate store type has been rena
3939
## Requirements
4040

4141
<details>
42-
<summary><b>Using the WinCert Extension on Linux servers:</b></summary>
42+
<summary><b>Using the WinCert Extension on Linux servers and/or with Docker Containers:</b></summary>
4343

4444
1. General SSH Setup Information: PowerShell 6 or higher and SSH must be installed on all computers. Install SSH, including ssh server, that's appropriate for your platform. You also need to install PowerShell from GitHub to get the SSH remoting feature. The SSH server must be configured to create a SSH subsysten to host a PowerShell process on the remote computer. It is suggested to turn off password authentication as this extension uses key-based authentication.
4545

4646
2. SSH Authentication: When creating a Keyfactor certificate store for the WinCert orchestrator extension, the only protocol supported to communicate with Windows servers is ssh. When providing the user id and password, the connection is attempted by creating a temporary private key file using the contents in the Password textbox. Therefore, the password field must contain the full SSH Private key.
4747

48+
3. If you choose to run this extension in a containerized environment, the container image must include PowerShell version 7.5 or later, along with either OpenSSH clients (for SSH-based connections) or OpenSSL (if SSL/TLS operations are required). Additionally, the PWSMan PowerShell module must be installed to support management tasks and remote session functionality. These dependencies are required to ensure full compatibility when connecting from the container to remote Windows servers. Below is an example Docker file snippet:
49+
```
50+
dnf install https://github.com/PowerShell/PowerShell/releases/download/v7.5.2/powershell-7.5.2-1.rh.x86_64.rpm
51+
pwsh -Command 'Install-Module -Name PSWSMan'
52+
dnf install openssh-clients openssl
53+
```
54+
4855
</details>
4956

5057
<details>

0 commit comments

Comments
 (0)