Skip to content

Commit 94d1c20

Browse files
Merge pull request #14 from Keyfactor/sslportfixes
Sslportfixes
2 parents 2a1e69b + 52f3f9d commit 94d1c20

File tree

9 files changed

+27
-7
lines changed

9 files changed

+27
-7
lines changed

IISWithBindings/Jobs/Inventory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private JobResult PerformInventory(InventoryJobConfiguration config, SubmitInven
2828

2929
_logger.LogTrace($"Begin Inventory for Cert Store {$@"\\{config.CertificateStoreDetails.ClientMachine}\{config.CertificateStoreDetails.StorePath}"}");
3030

31-
WSManConnectionInfo connInfo = new WSManConnectionInfo(new Uri($"http://{config.CertificateStoreDetails.ClientMachine}:5985/wsman"));
31+
WSManConnectionInfo connInfo = new WSManConnectionInfo(new Uri($"{storePath.WinRmProtocol}://{config.CertificateStoreDetails.ClientMachine}:{storePath.WinRmPort}/wsman"));
3232
if (storePath != null)
3333
{
3434
SecureString pw = new NetworkCredential(config.ServerUsername, config.ServerPassword)

IISWithBindings/Jobs/Management.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private JobResult PerformRemoval(ManagementJobConfiguration config)
6969

7070
var connInfo =
7171
new WSManConnectionInfo(
72-
new Uri($"http://{config.CertificateStoreDetails.ClientMachine}:5985/wsman"));
72+
new Uri($"{storePath.WinRmProtocol}://{config.CertificateStoreDetails.ClientMachine}:{storePath.WinRmPort}/wsman"));
7373
if (storePath != null)
7474
{
7575
connInfo.IncludePortInSPN = storePath.SpnPortFlag;
@@ -166,7 +166,7 @@ private JobResult PerformAddition(ManagementJobConfiguration config,string thump
166166

167167
var connInfo =
168168
new WSManConnectionInfo(
169-
new Uri($"http://{config.CertificateStoreDetails.ClientMachine}:5985/wsman"));
169+
new Uri($"{storePath.WinRmProtocol}://{config.CertificateStoreDetails.ClientMachine}:{storePath.WinRmPort}/wsman"));
170170
if (storePath != null)
171171
{
172172
connInfo.IncludePortInSPN = storePath.SpnPortFlag;

IISWithBindings/StorePath.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ public StorePath()
1414
[DefaultValue(false)]
1515
public bool SpnPortFlag { get; set; }
1616

17+
[JsonProperty("WinRm Protocol")]
18+
[DefaultValue("http")]
19+
public string WinRmProtocol { get; set; }
20+
21+
[JsonProperty("WinRm Port")]
22+
[DefaultValue("5985")]
23+
public string WinRmPort { get; set; }
24+
1725
[JsonProperty("sniflag")]
1826
[DefaultValue(SniFlag.None)]
1927
public SniFlag SniFlag { get; set; }

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ Job Types |Inventory, Add, and Remove are the supported job types.
6262

6363
- **SPN With Port** – Defaults to false but some customers need for remote PowerShell Access
6464

65-
Parameter Name|Parameter Type|Default Value|Required
65+
Parameter Name|Display Name|Parameter Type|Default Value|Required|Description
6666
---|---|---|---
67-
spnwithport|Boolean|false|No
67+
spnwithport|SPN With Port?|Boolean|false|No|An SPN is the name by which a client uniquely identifies an instance of a service
68+
WinRm Protocol|WinRm Protocol|Multiple Choice|http|Yes|Protocol that WinRM Runs on
69+
WinRm Port|WinRm Port|String|5985|Yes|Port that WinRM Runs on
6870

6971
![](images/screen1-b.gif)
7072

@@ -103,13 +105,17 @@ See Keyfactor InstallingKeyfactorOrchestrators.pdf Documentation. Get from your
103105
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 "Create the New Certificate Store Type for the New IIS-With-Bindings AnyAgent".
104106

105107
![](images/screen2.gif)
108+
![](images/screen2-a.gif)
106109

107110
#### STORE CONFIGURATION
108111
CONFIG ELEMENT |DESCRIPTION
109112
----------------|---------------
110113
Category |The type of certificate store to be configured. Select category based on the display name configured above.
111114
Container |This is a logical grouping of like stores. This configuration is optional and does not impact the functionality of the store.
112115
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.
116+
Credentials |Local or domain admin account that has permissions to manage iis (Has to be admin)
113117
Store Path |My or WebHosting
118+
WinRm Protocol|http or https
119+
WinRm Port |Port to run WinRm on Default for http is 5985
114120
Orchestrator |This is the orchestrator server registered with the appropriate capabilities to manage this certificate store type.
115121
Inventory Schedule |The interval that the system will use to report on what certificates are currently in the store.

images/screen1-b.gif

2.45 KB
Loading

images/screen1-c.gif

356 Bytes
Loading

images/screen2-a.gif

12.8 KB
Loading

images/screen2.gif

1.1 KB
Loading

readme_source.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ Job Types |Inventory, Add, and Remove are the supported job types.
4646

4747
- **SPN With Port** – Defaults to false but some customers need for remote PowerShell Access
4848

49-
Parameter Name|Parameter Type|Default Value|Required
49+
Parameter Name|Display Name|Parameter Type|Default Value|Required|Description
5050
---|---|---|---
51-
spnwithport|Boolean|false|No
51+
spnwithport|SPN With Port?|Boolean|false|No|An SPN is the name by which a client uniquely identifies an instance of a service
52+
WinRm Protocol|WinRm Protocol|Multiple Choice|http|Yes|Protocol that WinRM Runs on
53+
WinRm Port|WinRm Port|String|5985|Yes|Port that WinRM Runs on
5254

5355
![](images/screen1-b.gif)
5456

@@ -87,13 +89,17 @@ See Keyfactor InstallingKeyfactorOrchestrators.pdf Documentation. Get from your
8789
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 "Create the New Certificate Store Type for the New IIS-With-Bindings AnyAgent".
8890

8991
![](images/screen2.gif)
92+
![](images/screen2-a.gif)
9093

9194
#### STORE CONFIGURATION
9295
CONFIG ELEMENT |DESCRIPTION
9396
----------------|---------------
9497
Category |The type of certificate store to be configured. Select category based on the display name configured above.
9598
Container |This is a logical grouping of like stores. This configuration is optional and does not impact the functionality of the store.
9699
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.
100+
Credentials |Local or domain admin account that has permissions to manage iis (Has to be admin)
97101
Store Path |My or WebHosting
102+
WinRm Protocol|http or https
103+
WinRm Port |Port to run WinRm on Default for http is 5985
98104
Orchestrator |This is the orchestrator server registered with the appropriate capabilities to manage this certificate store type.
99105
Inventory Schedule |The interval that the system will use to report on what certificates are currently in the store.

0 commit comments

Comments
 (0)