Skip to content

Commit f8d73eb

Browse files
rcpokornyBob PokornyKeyfactorspbsolublegithub-actions[bot]
authored
81018 adding jea support (#185)
* Initial JEA for WinCert * Update generated docs * Helper updates * Updated spelling of PowerShell script and fixed Information Messages from PW * Added JEA support for IIS * Fixed and updated IIS Components * Completed SQL Module and updated test projects * Testing * Removed WinCertScripts from extension. * changed way LocalHost and JEA are configured. * Fixed ODKG missing file error * Updated KF Import of Signed Certificates PowerShell Script * Fixed missing PowerShell script not being found. * Fix missing path * Updated documentation to include JEA information. * Update generated docs * chore(ci): Update build workflow to v5 * docs: auto-generate README and documentation [skip ci] * Update generated docs * docs: auto-generate README and documentation [skip ci] * docs: auto-generate README and documentation [skip ci] * Adding dotnet 10 support * modified: IISU/PowerShell/Build/KeyfactorWinCert.pssc modified: docsource/content.md * docs: auto-generate README and documentation [skip ci] * Updated packages to support dotnet 10 * Updating Unit Tests * Fixed timeout issue when migrating to dotnet 10 * modified: IISU/PSHelper.cs * Remove .net6 libraries and support * docs: auto-generate README and documentation [skip ci] * #86137 Cleaned up messages returned to Command * Updated language for WinSQL binding concerns * docs: auto-generate README and documentation [skip ci] * Updated JEA Documentation Fixed SQL Restart issue * docs: auto-generate README and documentation [skip ci] * Added diagnostic cmdlet * Updated the JEA documentation. Added the get-keyfactordiagnostics cmdlet for troubleshooting. * docs: auto-generate README and documentation [skip ci] * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Updated error reporting when bad CSP * Updated PS scripts to get CSPs from registry not certutil. * docs: auto-generate README and documentation [skip ci] * Fixed formatting issue in CHANGELOG * Updated the Get-KeyfactorIISBoundCertificates.ps1 script to include support for JEA (Just Enough Administration) environments. Added a new documentation file for setting up an SSH development environment. * docs: auto-generate README and documentation [skip ci] * Changes to be committed: modified: IISU/ImplementedStoreTypes/WinIIS/Management.cs modified: IISU/PowerShell/Keyfactor.WinCert.Common/Keyfactor.WinCert.Common.psm1 new file: IISU/PowerShell/Keyfactor.WinCert.Common/Private/Test-KeyfactorAdminRights.ps1 modified: IISU/PowerShell/Keyfactor.WinCert.Common/Public/New-KeyfactorResult.ps1 modified: IISU/PowerShell/Keyfactor.WinCert.Common/RoleCapabilities/Keyfactor.WinCert.Common.psrc modified: IISU/PowerShell/Keyfactor.WinCert.IIS/Public/Get-KeyfactorIISBoundCertificates.ps1 modified: IISU/PowerShell/Keyfactor.WinCert.IIS/Public/New-KeyfactorIISSiteBinding.ps1 modified: IISU/PowerShell/Keyfactor.WinCert.IIS/Public/Remove-KeyfactorIISCertificateIfUnused.ps1 modified: IISU/PowerShell/Keyfactor.WinCert.IIS/Public/Remove-KeyfactorIISSiteBinding.ps1 * Updated PowerShell initialization to check for appropriate permissions when running IIS jobs. * Fixed null error when testing for admin Fixed tempfile left behind when using ssh * added more logging to chase Ssh issue when running in docker containers. * Updating logging * logging * chasing issue with ssh * Moved try/catch * Fixed issue with test-admin check function not being found in IIS/SQL * docs: auto-generate README and documentation [skip ci] --------- Co-authored-by: Bob Pokorny <bpokorny@keyfactor.com> Co-authored-by: Keyfactor <keyfactor@keyfactor.github.io> Co-authored-by: spbsoluble <1661003+spbsoluble@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 7605b71 commit f8d73eb

163 files changed

Lines changed: 11133 additions & 3294 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/keyfactor-starter-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
call-starter-workflow:
14-
uses: keyfactor/actions/.github/workflows/starter.yml@v4
14+
uses: keyfactor/actions/.github/workflows/starter.yml@v5
1515
with:
1616
command_token_url: ${{ vars.COMMAND_TOKEN_URL }} # Only required for doctool generated screenshots
1717
command_hostname: ${{ vars.COMMAND_HOSTNAME }} # Only required for doctool generated screenshots

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
##
44
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
55

6+
# Local test credentials (never commit)
7+
local.runsettings
8+
69
# User-specific files
710
*.rsuser
811
*.suo

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "PowerShell: Launch Script",
9+
"type": "PowerShell",
10+
"request": "launch",
11+
"script": "${file}",
12+
"args": []
13+
}
14+
]
15+
}

CHANGELOG.md

Lines changed: 81 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,70 @@
1+
4.0.0
2+
3+
* As of this version of the extension, SANs will be handled through the ODKG Enrollment page in Command and will no longer use the SAN Entry Parameter. This version, we are removing all support for the SAN Entry Parameter. If you are still using the SAN Entry Parameter, you will need to remove it from your store types and re-run inventory to remove it from your database.
4+
* Adding JEA Support for local PowerShell execution. This will allow for more secure execution of the extension when running in a local PowerShell Runspace. To utilize this feature, you will need to create a JEA endpoint on the target server and specify the endpoint name as a new parameter in the specific Cert Store definition. Refer to the README for more details.
5+
* .NET6 assemblies are no longer supported.
6+
* Fixed a problem when passing a bad CSP, the job was reporting successful, but did not actually add/bind the certificate.
7+
* Enhanced Crypto Service Provider (CSP) discovery and validation to work correctly on localized Windows installations. Customers running Traditional Chinese Windows (zh-TW / CP950) reported that certificate add jobs were failing with "Crypto Service Provider ... is either invalid or not found on this system." even when the requested CSP was installed. The root cause was that `Get-CryptoProviders` parsed `certutil -csplist` output and matched on the literal English label "Provider Name:", which is translated on non en-US Windows, causing the enumerated provider list to come back empty and every CSP name to fail validation. Provider enumeration now reads from the culture-invariant registry hive `HKLM:\SOFTWARE\Microsoft\Cryptography\Defaults\Provider` (with a code-page-safe `certutil` fallback for hardened systems where the registry hive is unavailable), and CSP name matching in `Validate-CryptoProvider` now uses ordinal, case-insensitive comparison so results are unaffected by the current thread culture (Turkish-I folding, full-/half-width character folding, etc.).
8+
* Since adding JEA, lower privileged users can now run the extension in a local PowerShell Runspace without needing to be a member of the Administrators group. This is a security improvement, but it does require that the user has been granted access to the JEA endpoint on the target server. When running IIS jobs without JEA endpoints, the credentials entered will still need Administrative permissions. If you are running into permission issues, please check your JEA configuration and ensure that the user has been granted access to the endpoint.
9+
* Fixed IIS Inventory error propagation across all connection types (Local, WinRM, JEA, SSH). Previously, when the cmdlet encountered errors (e.g., insufficient admin rights), it used Write-Warning/Write-Information which didn't signal failure to the orchestrator. Over remote sessions, PS.HadErrors remained false and jobs returned 0 certificates with no indication of failure, making it impossible to distinguish between "no certificates found" vs "access denied". The cmdlet now returns structured KeyfactorResult JSON objects for all error scenarios, which the orchestrator detects and reports in JobResult.FailureMessage. This ensures reliable error detection and reporting regardless of connection type (Local PowerShell, WinRM HTTP/HTTPS, JEA endpoints, SSH sessions).
10+
* Fixed a potential issue where temporary files created during a remote ssh connection could be left behind if the job failed before cleanup. The cmdlet now uses a try/finally block to ensure that temporary files are deleted even if an error occurs during execution.
11+
12+
3.0.2
13+
14+
* Fixed SQL service restart behavior: previously the extension could stop multiple SQL services and fail to start all of them. It now restarts only the SQL service associated with the certificate being renewed.
15+
116
3.0.1
2-
* Fixed an issues when renewing ECC Certificates
17+
18+
* Fixed an issues when renewing ECC Certificates
319

420
3.0.0
21+
522
* As of this version of the extension, SANs will be handled through the ODKG Enrollment page in Command, and will no longer use the SAN Entry Parameter. This version, we are removing the Entry Parameter "SAN" from the integration-manifest.json, but will still support previous versions of Command in the event the SAN Entry Parameter is passed. The next major version (4.0) will remove all support for the SAN Entry Parameter.
623
* Added WinADFS Store Type for rotating certificates in ADFS environments. Please note, only the service-communications certificate is rotated throughout your farm.
724
* Internal only: Added Integration Tests to aid in future development and testing.
825
* Improved messaging in the event an Entry Parameter is missing (or does not meet the casing requirements)
926
* Fixed the SNI/SSL flag being returned during inventory, now returns extended SSL flags
1027
* Fixed the SNI/SSL flag when binding the certificate to allow for extended SSL flags
1128
* Added SSL Flag validation to make sure the bit flag is correct. These are the valid bit flags for the version of Windows:
12-
### Windows Server 2012 R2 / Windows 8.1 and earlier (IIS 8.5):
13-
* 0 No SNI
14-
* 1 Use SNI
15-
* 2 Use Centralized SSL certificate store.
16-
17-
### Windows Server 2016 (IIS 10.0):
18-
* 0 No SNI
19-
* 1 Use SNI
20-
* 4 Disable HTTP/2.
21-
22-
### Windows Server 2019 (IIS 10.0.17763)
23-
* 0 No SNI
24-
* 1 Use SNI
25-
* 4 Disable HTTP/2.
26-
* 8 Disable OCSP Stapling.
27-
28-
### Windows Server 2022+ (IIS 10.0.20348+)
29-
* 0 No SNI
30-
* 1 Use SNI
31-
* 4 Disable HTTP/2.
32-
* 8 Disable OCSP Stapling.
33-
* 16 Disable QUIC.
34-
* 32 Disable TLS 1.3 over TCP.
35-
* 64 Disable Legacy TLS.
29+
30+
### Windows Server 2012 R2 / Windows 8.1 and earlier (IIS 8.5)
31+
32+
* 0 No SNI
33+
* 1 Use SNI
34+
* 2 Use Centralized SSL certificate store.
35+
36+
### Windows Server 2016 (IIS 10.0)
37+
38+
* 0 No SNI
39+
* 1 Use SNI
40+
* 4 Disable HTTP/2.
41+
42+
### Windows Server 2019 (IIS 10.0.17763)
43+
44+
* 0 No SNI
45+
* 1 Use SNI
46+
* 4 Disable HTTP/2.
47+
* 8 Disable OCSP Stapling.
48+
49+
### Windows Server 2022+ (IIS 10.0.20348+)
50+
51+
* 0 No SNI
52+
* 1 Use SNI
53+
* 4 Disable HTTP/2.
54+
* 8 Disable OCSP Stapling.
55+
* 16 Disable QUIC.
56+
* 32 Disable TLS 1.3 over TCP.
57+
* 64 Disable Legacy TLS.
3658

3759
2.6.4
60+
3861
* Fixed an issue with SSL Flags greater than 3 were not being applied correctly to newer IIS servers.
3962
* Fixed an issue when formatting private RSA keys when connecting using the ssh protocol.
4063
* When using ssh protocol in containers, the SQL ACL on private keys was not being updating correctly. This has been fixed.
4164
* Updated documentation to indicate that the username and password fields on the Cert Store are automatically added by Command.
4265

4366
2.6.3
67+
4468
* Fixed re-enrollment or ODKG job when RDN Components contained escaped commas.
4569
* Updated renewal job for IIS Certs to delete the old cert if not bound or used by other web sites.
4670
* Improved Inventory reporting of CSP when cert uses newer CNG Keys.
@@ -51,23 +75,25 @@
5175
* Fixed an issue with (remote) ODKG jobs that caused an error when the CSP was not specified that did not require binding.
5276

5377
2.6.2
78+
5479
* Fixed error when attempting to connect to remote computer using UO service account
5580
* Fixed error when connecting to remote computer using HTTPS; was defaulting to HTTP
5681
* Fixed the creation of a certificate when the Cryptographic Service Provider was changed by the user
5782
* Updated logic when getting the CSP. Now supports modern CHG and legacy CAPI APIs. This will allow the CSP to show in the stores inventory.
5883
* Re-factored code to eliminate warnings
5984
* Bumped up he following packages to eliminate .net vulnerabilities and obsolete packages:
60-
* Keyfactor.Orchestrators.IOrchestratorJobExtensions" Version="1.0.0"
85+
* Keyfactor.Orchestrators.IOrchestratorJobExtensions" Version="1.0.0"
6186
* Microsoft.PowerShell.SDK" Version="7.4.10" Condition="'$(TargetFramework)' == 'net8.0'"
6287
* runtime.linux-arm64.runtime.native.System.IO.Ports" Version="9.0.5"
6388
* runtime.osx-arm64.runtime.native.System.IO.Ports" Version="9.0.5"
6489
* System.Formats.Asn1" Version="8.0.2" Condition="'$(TargetFramework)' == 'net6.0'"
65-
* System.Formats.Asn1" Version="9.0.0" Condition="'$(TargetFramework)' == 'net8.0'"
90+
* System.Formats.Asn1" Version="9.0.0" Condition="'$(TargetFramework)' == 'net8.0'"
6691
* System.IO.Packaging" Version="6.0.2" Condition="'$(TargetFramework)' == 'net6.0'"
6792
* System.IO.Packaging" Version="8.0.1" Condition="'$(TargetFramework)' == 'net8.0'"
6893
* System.Text.Json" Version="8.0.5"
6994

7095
2.6.1
96+
7197
* Documentation updates for the 2.6 release
7298
* Fix a naming typo in the 2.5 migration SQL script
7399
* Update integration-manifest.json
@@ -77,16 +103,19 @@
77103
* Bumped System.IO.Packaging to 6.0.2 & 8.0.1 for .Net vulnerabilities.
78104

79105
2.6.0
106+
80107
* Added the ability to run the extension in a Linux environment. To utilize this change, for each Cert Store Types (WinCert/WinIIS/WinSQL), add ssh to the Custom Field <b>WinRM Protocol</b>. When using ssh as a protocol, make sure to enter the appropriate ssh port number under WinRM Port.
81108
* NOTE: For legacy purposes the Display names WinRM Protocol and WinRM Port are maintained although the type of protocols now includes ssh.
82109
* Moved all inventory and management jobs to external PowerShell script file .\PowerShellScripts\WinCertScripts.ps1
83110
* Changed how IIS Bound certificates are deleted; Certificates are only deleted from the certificate store when the certificate is NOT BOUND to any other sites.
84111
* NOTE: This version was not publicly released.
85112

86113
2.5.1
114+
87115
* Fixed WinSQL service name when InstanceID differs from InstanceName
88116

89117
2.5.0
118+
90119
* Added the Bindings to the end of the thumbprint to make the alias unique.
91120
* Using new IISWebBindings cmdlet to use additional SSL flags when binding certificate to website.
92121
* NOTE: The property SNIFlag has changed from a multi-select to a string with default of "0". To properly use the new SNI/SSL flags you can delete the SNIFlag from the store type and re-add the field as described in the ReadMe. If you have several existing cert stores, you may can execute the SQL script (IISU Sni Flag 2.5 upgrade script) to update the field type. Consult your Keyfactor Rep for help.
@@ -96,89 +125,107 @@
96125
* Removed renewal thumbprint logic to update multiple website; each job now updates its own specific certificate.
97126

98127
2.4.4
128+
99129
* Fix an issue with WinRM parameters when migrating Legacy IIS Stores to the WinCert type
100130
* Fix an issue with "Delete" script in the Legacy IIS Migration that did not remove some records from dependent tables
101131

102132
2.4.3
133+
103134
* Adding Legacy IIS Migration scripting and ReadMe guide
104135

105136
2.4.2
137+
106138
* Correct false positive error when completing an IIS inventory job.
107139
* Revert to specifying the version of PowerShell to use when establishing a local PowerShell Runspace.
108140
* Fixed typo in error message.
109141

110142
2.4.1
143+
111144
* Modified the CertUtil logic to use the -addstore argument when no password is sent with the certificate information.
112145
* Added additional error trapping and trace logs
113146

114147
2.4.0
148+
115149
* Changed the way certificates are added to cert stores. CertUtil is now used to import the PFX certificate into the associated store. The CSP is now considered when maintaining certificates, empty CSP values will result in using the machines default CSP.
116150
* Added the Crypto Service Provider and SAN Entry Parameters to be used on Inventory queries, Adding and ReEnrollments for the WinCert, WinSQL and IISU extensions.
117151
* Changed how Client Machine Names are handled when a 'localhost' connection is desired. The new naming convention is: {machineName}|localmachine. This will eliminate the issue of unique naming conflicts.
118152
* Updated the manifest.json to now include WinSQL ReEnrollment.
119153
* Updated the integration-manifest.json file for new fields in cert store types.
120154

121155
2.3.2
156+
122157
* Changed the Open Cert Store access level from a '5' to 'MaxAllowed'
123158

124159
2.3.1
160+
125161
* Added additional error trapping for WinRM connections to allow actual error on failure.
126162

127163
2.3.0
164+
128165
* Added Sql Server Binding Support
129166
* Modified WinCert Advanced PrivateKeyAllowed setting from Required to Optional
130167

131168
2.2.2
169+
132170
* Removed empty constructor to resolve PAM provider error when using WinCert store types
133171

134172
2.2.1
173+
135174
* Fixed issue where https binding without cert was causing an error
136175

137176
2.2.0
138-
* Added Support for GMSA Account by using no value for ServerUsernanme and ServerPassword. KF Command version 10.2 or later is required to specify empty credentials.
177+
178+
* Added Support for GMSA Account by using no value for ServerUsernanme and ServerPassword. KF Command version 10.2 or later is required to specify empty credentials.
179+
139180
* Added local PowerShell support, triggered when specifying 'localhost' as the client machine while using the IISU or WinCert Orchestrator. This change was tested using KF Command 10.3
140181
* Moved to .NET 6
141182

142183
2.1.1
184+
143185
* Fixed the missing site name error when issuing a WinCert job when writing trace log settings to the log file.
144186
* Several display names changed in the documented certificate store type definitions. There are no changes to the internal type or parameter names, so no migration is necessary for currently configured stores.
145-
* Display name for IISU changed to "IIS Bound Certificate".
146-
* Display name for WinCert changed to "Windows Certificate".
147-
* Display names for several Store and Entry parameters changed to be more descriptive and UI friendly.
187+
* Display name for IISU changed to "IIS Bound Certificate".
188+
* Display name for WinCert changed to "Windows Certificate".
189+
* Display names for several Store and Entry parameters changed to be more descriptive and UI friendly.
148190
* Significant ReadMe cleanup
149191

150192
2.1.0
193+
151194
* Fixed issue that was occurring during renewal when there were bindings outside of http and https like net.tcp
152195
* Added PAM registration/initialization documentation in README.md
153-
* Resolved Null HostName error
196+
* Resolved Null HostName error
154197
* Added WinCert Cert Store Type
155198
* Added custom property parser to not show any passwords
156199
* Removed any password references in trace logs and output settings in JSON format
157200

158201
2.0.0
202+
159203
* Add support for re-enrollment jobs (On Device Key Generation) with the ability to specify a cryptographic provider. Specification of cryptographic provider allows HSM (Hardware Security Module) use.
160204
* Local PAM Support added (requires Universal Orchestrator Framework version 10.1)
161205
* Certificate store type changed from IISBin to IISU. See README for migration notes.
162206

163-
164207
1.1.3
208+
165209
* Made WinRM port a store parameter
166210
* Made WinRM protocol a store parameter
167211
* IISWBin 1.1.3 upgrade script.sql added to upgrade from 1.1.2
168212

169213
1.1.0
214+
170215
* Migrate to Universal Orchestrator (KF9 / .NET Core)
171216
* Perform Renewals using RenewalThumbprint
172217

173218
1.0.3
219+
174220
* Add support for the SNI Flags when creating new bindings. Supported flags include:
175-
* 0 No SNI
221+
* 0 No SNI
176222
* 1 SNI Enabled
177223
* 2 Non SNI binding which uses Central Certificate Store
178224
* 3 SNI binding which uses Central Certificate Store
179225
* Last release to support Windows Orchestrator (KF8)
180226

181227
1.0.2
228+
182229
* Remove dependence on Windows.Web.Administration on the orchestrator server. The agent will now use the local version on the managed server via remote PowerShell
183230
* add support for the IncludePortInSPN flag
184231
* add support to use credentials from Keyfactor for Add/Remove/Inventory jobs.

0 commit comments

Comments
 (0)