Skip to content

Commit

Permalink
Merge pull request #14 from Keyfactor/sslportfixes
Browse files Browse the repository at this point in the history
Sslportfixes
  • Loading branch information
bhillkeyfactor authored Apr 5, 2022
2 parents 2a1e69b + 52f3f9d commit 94d1c20
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion IISWithBindings/Jobs/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private JobResult PerformInventory(InventoryJobConfiguration config, SubmitInven

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

WSManConnectionInfo connInfo = new WSManConnectionInfo(new Uri($"http://{config.CertificateStoreDetails.ClientMachine}:5985/wsman"));
WSManConnectionInfo connInfo = new WSManConnectionInfo(new Uri($"{storePath.WinRmProtocol}://{config.CertificateStoreDetails.ClientMachine}:{storePath.WinRmPort}/wsman"));
if (storePath != null)
{
SecureString pw = new NetworkCredential(config.ServerUsername, config.ServerPassword)
Expand Down
4 changes: 2 additions & 2 deletions IISWithBindings/Jobs/Management.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private JobResult PerformRemoval(ManagementJobConfiguration config)

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

var connInfo =
new WSManConnectionInfo(
new Uri($"http://{config.CertificateStoreDetails.ClientMachine}:5985/wsman"));
new Uri($"{storePath.WinRmProtocol}://{config.CertificateStoreDetails.ClientMachine}:{storePath.WinRmPort}/wsman"));
if (storePath != null)
{
connInfo.IncludePortInSPN = storePath.SpnPortFlag;
Expand Down
8 changes: 8 additions & 0 deletions IISWithBindings/StorePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ public StorePath()
[DefaultValue(false)]
public bool SpnPortFlag { get; set; }

[JsonProperty("WinRm Protocol")]
[DefaultValue("http")]
public string WinRmProtocol { get; set; }

[JsonProperty("WinRm Port")]
[DefaultValue("5985")]
public string WinRmPort { get; set; }

[JsonProperty("sniflag")]
[DefaultValue(SniFlag.None)]
public SniFlag SniFlag { get; set; }
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ Job Types |Inventory, Add, and Remove are the supported job types.

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

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

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

Expand Down Expand Up @@ -103,13 +105,17 @@ See Keyfactor InstallingKeyfactorOrchestrators.pdf Documentation. Get from your
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".

![](images/screen2.gif)
![](images/screen2-a.gif)

#### STORE CONFIGURATION
CONFIG ELEMENT |DESCRIPTION
----------------|---------------
Category |The type of certificate store to be configured. Select category based on the display name configured above.
Container |This is a logical grouping of like stores. This configuration is optional and does not impact the functionality of the store.
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.
Credentials |Local or domain admin account that has permissions to manage iis (Has to be admin)
Store Path |My or WebHosting
WinRm Protocol|http or https
WinRm Port |Port to run WinRm on Default for http is 5985
Orchestrator |This is the orchestrator server registered with the appropriate capabilities to manage this certificate store type.
Inventory Schedule |The interval that the system will use to report on what certificates are currently in the store.
Binary file modified images/screen1-b.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/screen1-c.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/screen2-a.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/screen2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions readme_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ Job Types |Inventory, Add, and Remove are the supported job types.

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

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

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

Expand Down Expand Up @@ -87,13 +89,17 @@ See Keyfactor InstallingKeyfactorOrchestrators.pdf Documentation. Get from your
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".

![](images/screen2.gif)
![](images/screen2-a.gif)

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

0 comments on commit 94d1c20

Please sign in to comment.