Skip to content

Commit 296ec34

Browse files
rcpokornyBob PokornyKeyfactor
authored
Doc updates (#26)
* Updated ReadMe. Updated images in ReadMe for IISU version 2.0. Added additional debug and trace info. Co-authored-by: Bob Pokorny <[email protected]> Co-authored-by: Keyfactor <[email protected]>
1 parent 00b8b6f commit 296ec34

File tree

7 files changed

+109
-72
lines changed

7 files changed

+109
-72
lines changed

IISU.sln

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.2.32616.157
5-
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IISU", "IISU\IISU.csproj", "{33FBC5A1-3466-4F10-B9A6-7186F804A65A}"
7-
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1A6C93E7-24FD-47FD-883D-EDABF5CEE4C6}"
9-
ProjectSection(SolutionItems) = preProject
10-
CHANGELOG.md = CHANGELOG.md
11-
integration-manifest.json = integration-manifest.json
12-
.github\workflows\keyfactor-extension-release.yml = .github\workflows\keyfactor-extension-release.yml
13-
readme_source.md = readme_source.md
14-
EndProjectSection
15-
EndProject
16-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{6302034E-DF8C-4B65-AC36-CED24C068999}"
17-
ProjectSection(SolutionItems) = preProject
18-
images\ReEnrollment1.png = images\ReEnrollment1.png
19-
images\ReEnrollment1a.png = images\ReEnrollment1a.png
20-
images\ReEnrollment1b.png = images\ReEnrollment1b.png
21-
images\Screen1.png = images\Screen1.png
22-
images\Screen2.png = images\Screen2.png
23-
EndProjectSection
24-
EndProject
25-
Global
26-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
27-
Debug|Any CPU = Debug|Any CPU
28-
Release|Any CPU = Release|Any CPU
29-
EndGlobalSection
30-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
31-
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32-
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Debug|Any CPU.Build.0 = Debug|Any CPU
33-
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Release|Any CPU.ActiveCfg = Release|Any CPU
34-
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Release|Any CPU.Build.0 = Release|Any CPU
35-
EndGlobalSection
36-
GlobalSection(SolutionProperties) = preSolution
37-
HideSolutionNode = FALSE
38-
EndGlobalSection
39-
GlobalSection(NestedProjects) = preSolution
40-
{6302034E-DF8C-4B65-AC36-CED24C068999} = {1A6C93E7-24FD-47FD-883D-EDABF5CEE4C6}
41-
EndGlobalSection
42-
GlobalSection(ExtensibilityGlobals) = postSolution
43-
SolutionGuid = {E0FA12DA-6B82-4E64-928A-BB9965E636C1}
44-
EndGlobalSection
45-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.32929.386
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IISU", "IISU\IISU.csproj", "{33FBC5A1-3466-4F10-B9A6-7186F804A65A}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1A6C93E7-24FD-47FD-883D-EDABF5CEE4C6}"
9+
ProjectSection(SolutionItems) = preProject
10+
CHANGELOG.md = CHANGELOG.md
11+
integration-manifest.json = integration-manifest.json
12+
.github\workflows\keyfactor-extension-release.yml = .github\workflows\keyfactor-extension-release.yml
13+
readme_source.md = readme_source.md
14+
EndProjectSection
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{6302034E-DF8C-4B65-AC36-CED24C068999}"
17+
ProjectSection(SolutionItems) = preProject
18+
images\AddCertStore.png = images\AddCertStore.png
19+
images\CertStoreType-c.png = images\CertStoreType-c.png
20+
images\CertStoreType.png = images\CertStoreType.png
21+
images\ReEnrollment1.png = images\ReEnrollment1.png
22+
images\ReEnrollment1a.png = images\ReEnrollment1a.png
23+
images\ReEnrollment1b.png = images\ReEnrollment1b.png
24+
images\Screen1.png = images\Screen1.png
25+
images\Screen2.png = images\Screen2.png
26+
EndProjectSection
27+
EndProject
28+
Global
29+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
30+
Debug|Any CPU = Debug|Any CPU
31+
Release|Any CPU = Release|Any CPU
32+
EndGlobalSection
33+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
34+
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{33FBC5A1-3466-4F10-B9A6-7186F804A65A}.Release|Any CPU.Build.0 = Release|Any CPU
38+
EndGlobalSection
39+
GlobalSection(SolutionProperties) = preSolution
40+
HideSolutionNode = FALSE
41+
EndGlobalSection
42+
GlobalSection(NestedProjects) = preSolution
43+
{6302034E-DF8C-4B65-AC36-CED24C068999} = {1A6C93E7-24FD-47FD-883D-EDABF5CEE4C6}
44+
EndGlobalSection
45+
GlobalSection(ExtensibilityGlobals) = postSolution
46+
SolutionGuid = {E0FA12DA-6B82-4E64-928A-BB9965E636C1}
47+
EndGlobalSection
48+
EndGlobal

IISU/Jobs/ReEnrollment.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,13 @@ private JobResult PerformReEnrollment(ReenrollmentJobConfiguration config, Submi
116116

117117
// Execute the -new command
118118
ps.AddScript($"certreq -new -q $infFilename $csrFilename");
119+
_logger.LogDebug($"Subject Text: {subjectText}");
120+
_logger.LogDebug($"SAN: {SAN}");
121+
_logger.LogDebug($"Provider Name: {providerName}");
122+
_logger.LogDebug($"Key Type: {keyType}");
123+
_logger.LogDebug($"Key Size: {keySize}");
119124
_logger.LogTrace("Attempting to create the CSR by Invoking the script.");
125+
120126
Collection<PSObject> results = ps.Invoke();
121127
_logger.LogTrace("Completed the attempt in creating the CSR.");
122128
ps.Commands.Clear();
@@ -126,9 +132,9 @@ private JobResult PerformReEnrollment(ReenrollmentJobConfiguration config, Submi
126132
ps.AddScript($"$CSR = Get-Content $csrFilename");
127133
_logger.LogTrace("Attempting to get the contents of the CSR file.");
128134
results = ps.Invoke();
129-
_logger.LogTrace("Completet getting the CSR Contents.");
135+
_logger.LogTrace("Finished getting the CSR Contents.");
130136
}
131-
catch (Exception e)
137+
catch (Exception)
132138
{
133139
var psError = ps.Streams.Error.ReadAll().Aggregate(String.Empty, (current, error) => current + error.ErrorDetails.Message);
134140
throw new PowerShellCertException($"Error creating CSR File. {psError}");
@@ -174,7 +180,7 @@ private JobResult PerformReEnrollment(ReenrollmentJobConfiguration config, Submi
174180
_logger.LogTrace("Attempting to accept or bind the certificate to the HSM.");
175181
ps.AddScript("certreq -accept $cerFilename");
176182
ps.Invoke();
177-
_logger.LogTrace("Successfully bind the certificate to the HSM.");
183+
_logger.LogTrace("Successfully bound the certificate to the HSM.");
178184
ps.Commands.Clear();
179185

180186
// Delete the temp files

README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ This agent implements four job types – Inventory, Management Add, Remove and R
5656
WinRM is used to remotely manage the certificate stores and IIS bindings. WinRM must be properly configured to allow
5757
the server running the orchestrator to manage the server running IIS.
5858

59-
**Note if you are upgrading from version 1.1.2 you must run the IISWBin 1.1.3 upgrade script.sql SQL Script**
59+
**Note:**
60+
In version 2.0 of the IIS Orchestrator, the certificate store type has been renamed and additional parameters have been added. Prior to 2.0 the certificate store type was called “IISBin” and as of 2.0 it is called “IISU”. If you have existing certificate stores of type “IISBin”, you have three options:
61+
1. Leave them as is and continue to manage them with a pre 2.0 IIS Orchestrator Extension. Create the new IISU certificate store type and create any new IIS stores using the new type.
62+
1. Delete existing IIS stores. Delete the IISBin store type. Create the new IISU store type. Recreate the IIS stores using the new IISU store type.
63+
1. Convert existing IISBin certificate stores to IISU certificate stores. There is not currently a way to do this via the Keyfactor API, so direct updates to the underlying Keyfactor SQL database is required. A SQL script (IIS-Conversion.sql) is available in the repository to do this. Hosted customers, which do not have access to the underlying database, will need to work Keyfactor support to run the conversion. On-premises customers can run the script themselves, but are strongly encouraged to ensure that a SQL backup is taken prior running the script (and also be confident that they have a tested database restoration process.)
64+
65+
**Note: There is an additional certificate store type of “IIS” that ships with the Keyfactor platform. Migration of certificate stores from the “IIS” type to either the “IISBin” or “IISU” types is not currently supported.**
6066

6167
**1. Create the New Certificate Store Type for the IIS Orchestrator**
6268

@@ -66,8 +72,8 @@ In Keyfactor Command create a new Certificate Store Type similar to the one belo
6672
CONFIG ELEMENT | DESCRIPTION
6773
------------------|------------------
6874
Name |Descriptive name for the Store Type
69-
Short Name |The short name that identifies the registered functionality of the orchestrator. Must be IISWBin
70-
Custom Capability|Store type name orchestrator will register with. Must be "IISBindings".
75+
Short Name |The short name that identifies the registered functionality of the orchestrator. Must be IISU
76+
Custom Capability|Store type name orchestrator will register with. Must be "IISU".
7177
Needs Server |Must be checked
7278
Blueprint Allowed |Unchecked
7379
Requires Store Password |Determines if a store password is required when configuring an individual store. This must be unchecked.
@@ -80,7 +86,7 @@ Private Keys |This determines if Keyfactor can send the private key associated w
8086
PFX Password Style |This determines how the platform generate passwords to protect a PFX enrollment job that is delivered to the store. This can be either Default (system generated) or Custom (user determined).
8187
Job Types |Inventory, Add, and Remove are the supported job types.
8288

83-
![](images/screen1.gif)
89+
![](images/certstoretype.png)
8490

8591
**Advanced Settings:**
8692
- **Custom Alias** – Forbidden
@@ -97,8 +103,12 @@ Parameter Name|Display Name|Parameter Type|Default Value|Required|Description
97103
spnwithport|SPN With Port?|Boolean|false|No|An SPN is the name by which a client uniquely identifies an instance of a service
98104
WinRm Protocol|WinRm Protocol|Multiple Choice|http|Yes|Protocol that WinRM Runs on
99105
WinRm Port|WinRm Port|String|5985|Yes|Port that WinRM Runs on
106+
ServerUsername|Server Username|Secret||No|The username to log into the IIS Server
107+
ServerPassword|Server Password|Secret||No|The password that matches the username to log into the IIS Server
108+
ServerUseSsl|Use SSL|Bool|True|Yes|Determine whether the server uses SSL or not
109+
100110

101-
![](images/screen1-b.gif)
111+
![](images/certstoretype-c.png)
102112

103113
**Entry Parameters:**
104114
This section must be configured with binding fields. The parameters will be populated with the appropriate data when creating a new certificate store.<br/>
@@ -115,7 +125,7 @@ This section must be configured with binding fields. The parameters will be popu
115125
- 1 - SNI Enabled
116126
- 2 - Non SNI Binding
117127
- 3 - SNI Binding
118-
- **Prover Name** - Optional. To get a list of Crypto Providers, open PowerShell and issue the 'certutil -csplist' command. If no Provider Name is provided, the 'Microsoft Strong Cryptographic Provider' will be used.
128+
- **Provider Name** - Optional. To get a list of Crypto Providers, open PowerShell and issue the 'certutil -csplist' command. If no Provider Name is provided, the 'Microsoft Strong Cryptographic Provider' will be used.
119129
- **SAN** - Required. The SAN must have one entry that matches the Subject Name when using ReEnrollment. Multiple SANs maybe chained together using '&'. Example: dns=www.mysite.com&dns=www.mysite2.com.
120130

121131
Parameter Name|Parameter Type|Default Value|Required
@@ -129,17 +139,16 @@ Protocol |Multiple Choice|https|Yes
129139
Provider Name |String||No
130140
SAN |String||Yes
131141

132-
![](images/screen1-c.gif)
142+
![](images/screen2.png)
133143

134-
**2. Register the IIS Binding Orchestrator with Keyfactor**
144+
**2. Register the IIS Universal Orchestrator with Keyfactor**
135145
See Keyfactor InstallingKeyfactorOrchestrators.pdf Documentation. Get from your Keyfactor contact/representative.
136146

137147
**3. Create an IIS Binding Certificate Store within Keyfactor Command**
138148

139-
In Keyfactor Command create a new Certificate Store similar to the one below, selecting IIS With Binding as the Category and the parameters as described in &quot;Create the New Certificate Store Type for the New IIS-With-Bindings AnyAgent&quot;.
149+
In Keyfactor Command create a new Certificate Store similar to the one below, selecting "IISU" as the Category and the parameters as described in &quot;Create the New Certificate Store Type for the New IIS AnyAgent&quot;.<br>
140150

141-
![](images/screen2.gif)
142-
![](images/screen2-a.gif)
151+
![](images/AddCertStore.png)
143152

144153
#### STORE CONFIGURATION
145154
CONFIG ELEMENT |DESCRIPTION
@@ -149,9 +158,14 @@ Container |This is a logical grouping of like stores. This configuration is opti
149158
Client Machine |The hostname of the server to be managed. The Change Credentials option must be clicked to provide a username and password. This account will be used to manage the remote server via PowerShell.
150159
Credentials |Local or domain admin account that has permissions to manage iis (Has to be admin)
151160
Store Path |My or WebHosting
161+
Orchestrator |This is the orchestrator server registered with the appropriate capabilities to manage this certificate store type.
162+
SPN with Port?|
152163
WinRm Protocol|http or https
153164
WinRm Port |Port to run WinRm on Default for http is 5985
154-
Orchestrator |This is the orchestrator server registered with the appropriate capabilities to manage this certificate store type.
165+
Server Username|Username to log into the IIS Server
166+
Server Password|Password for the username required to log into the IIS Server
167+
Use SSL|Determines whether SSL is used ot not
168+
155169
Inventory Schedule |The interval that the system will use to report on what certificates are currently in the store.
156170

157171

images/AddCertStore.png

24.2 KB
Loading

images/CertStoreType-c.png

22 KB
Loading

images/CertStoreType.png

24.4 KB
Loading

0 commit comments

Comments
 (0)