Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
57548f9
Doc updates (#27)
rcpokorny Dec 1, 2022
3ceb462
Update CHANGELOG.md
bhillkeyfactor Dec 1, 2022
55b45ab
Update CHANGELOG.md
rcpokorny Dec 1, 2022
bb63cd6
Update CHANGELOG.md
RexWheeler Dec 1, 2022
cef4e49
Merge pull request #28 from Keyfactor/Changelog-updates
RexWheeler Dec 1, 2022
0d628f7
Add files via upload
rcpokorny Dec 1, 2022
c3b1ff8
Moved sql scripts to new folder
Dec 1, 2022
103df76
Merge branch 'release-2.0' into main
fiddlermikey Dec 1, 2022
f5e8c20
update release_dir (#30)
fiddlermikey Dec 1, 2022
382633c
Add more context to Provider Name and SAN parms
RexWheeler Dec 2, 2022
9cec5e3
Update generated README
Dec 2, 2022
d0f228f
Fixed Remove Bug Found after ReEnrollment Refactoring
bhillkeyfactor Dec 2, 2022
d25e873
Merge pull request #31 from Keyfactor/readme-updates
rcpokorny Dec 2, 2022
327cfc6
Update IIS-Conversion.sql
rcpokorny Dec 2, 2022
9f9d709
Updated ReadMe documenation
rcpokorny Dec 2, 2022
c40e3c5
Update generated README
Dec 2, 2022
6a728d6
Fixed Removal Bug and Updated Readme
bhillkeyfactor Dec 5, 2022
3595bcf
Update generated README
Dec 5, 2022
afd7b35
Update to migration script
bhillkeyfactor Dec 5, 2022
2996d2c
Merge branch 'removefix' of https://github.com/Keyfactor/iis-orchestr…
bhillkeyfactor Dec 5, 2022
04e32df
Merge pull request #32 from Keyfactor/rcpokorny-patch-1
rcpokorny Dec 5, 2022
73b1049
Merge branch 'main' into removefix
rcpokorny Dec 5, 2022
b4e266a
Merge pull request #33 from Keyfactor/removefix
rcpokorny Dec 5, 2022
5afbc83
Pam Documentation Updates
bhillkeyfactor Dec 7, 2022
048f70c
Doc Updates
bhillkeyfactor Dec 7, 2022
6c949f0
Merge pull request #35 from Keyfactor/pamdocs
bhillkeyfactor Dec 7, 2022
93b705f
fix formatting in manifest (#36)
fiddlermikey Dec 7, 2022
757624a
Merge cleaup-docs (#37)
fiddlermikey Dec 7, 2022
c806000
replace tab with spaces (#38)
fiddlermikey Dec 7, 2022
eaa0b28
Update readme-pam-support.md
bhillkeyfactor Dec 7, 2022
8e139e0
Update generated README
Dec 7, 2022
b08fc36
Null host name (#39)
bhillkeyfactor Dec 9, 2022
c85b3d1
Fixed Null entry errors when Hostname and SAN is empty. (#40)
rcpokorny Dec 13, 2022
406c84d
v2.0 Readme Updates (#41)
joynerar Dec 14, 2022
a6a8a40
Update generated README
Dec 14, 2022
3ec8a05
Update v2.0 readme source (#42)
joynerar Dec 14, 2022
15385dd
Update generated README
Dec 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/keyfactor-starter-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }}
release_url: ${{ needs.call-create-github-release-workflow.outputs.release_url }}
release_dir: IISWithBindings/bin/Release/netcoreapp3.1 # output directory to upload as a release, relative to checkout workspace
release_dir: IISU/bin/Release/netcoreapp3.1
secrets:
token: ${{ secrets.PRIVATE_PACKAGE_ACCESS }}

Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2.0.0
* PAM Support added (requires Univesal Orchestrator Framework version 10.1)
* Add support for reenrollment jobs (On Device Key Generation) with the ability to specify a cryptographic provider. Specification of cryptographic provider allows HSM (Hardware Security Module) use.
* Local PAM Support added (requires Univesal Orchestrator Framework version 10.1)
* Certificate store type changed from IISBin to IISU. See readme for migration notes.


1.1.3
* Made WinRM port a store parameter
Expand Down
20 changes: 17 additions & 3 deletions IISU/IISManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
Expand Down Expand Up @@ -50,7 +64,7 @@ public IISManager(ReenrollmentJobConfiguration config,string serverUserName,stri
{
SiteName = config.JobProperties["SiteName"].ToString();
Port = config.JobProperties["Port"].ToString();
HostName = config.JobProperties["HostName"].ToString();
HostName = config.JobProperties["HostName"]?.ToString();
Protocol = config.JobProperties["Protocol"].ToString();
SniFlag = config.JobProperties["SniFlag"].ToString()?.Substring(0, 1);
IpAddress = config.JobProperties["IPAddress"].ToString();
Expand Down Expand Up @@ -89,7 +103,7 @@ public IISManager(ManagementJobConfiguration config, string serverUserName, stri
{
SiteName = config.JobProperties["SiteName"].ToString();
Port = config.JobProperties["Port"].ToString();
HostName = config.JobProperties["HostName"].ToString();
HostName = config.JobProperties["HostName"]?.ToString();
Protocol = config.JobProperties["Protocol"].ToString();
SniFlag = config.JobProperties["SniFlag"].ToString()?.Substring(0, 1);
IpAddress = config.JobProperties["IPAddress"].ToString();
Expand Down
16 changes: 15 additions & 1 deletion IISU/JobProperties.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System.ComponentModel;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System.ComponentModel;
using Newtonsoft.Json;

namespace Keyfactor.Extensions.Orchestrator.IISU
Expand Down
14 changes: 14 additions & 0 deletions IISU/Jobs/Inventory.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
22 changes: 19 additions & 3 deletions IISU/Jobs/Management.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
Expand Down Expand Up @@ -78,10 +92,11 @@ private JobResult PerformRemoval(ManagementJobConfiguration config)
try
{
_logger.MethodEntry();
var siteName = config.JobProperties["Site Name"];
var siteName = config.JobProperties["SiteName"];
var port = config.JobProperties["Port"];
var hostName = config.JobProperties["Host Name"];
var hostName = config.JobProperties["HostName"];
var protocol = config.JobProperties["Protocol"];
var ipAddress = config.JobProperties["IPAddress"].ToString();
_logger.LogTrace($"Removing Site: {siteName}, Port:{port}, hostName:{hostName}, protocol:{protocol}");

var storePath = JsonConvert.DeserializeObject<JobProperties>(config.CertificateStoreDetails.Properties,
Expand Down Expand Up @@ -127,6 +142,7 @@ private JobResult PerformRemoval(ManagementJobConfiguration config)
.AddParameter("Name", siteName)
.AddParameter("Port", port)
.AddParameter("HostHeader", hostName)
.AddParameter("IPAddress",ipAddress)
.AddStatement();


Expand Down
31 changes: 23 additions & 8 deletions IISU/Jobs/ReEnrollment.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Management.Automation;
Expand Down Expand Up @@ -36,7 +50,6 @@ private string ResolvePamField(string name, string value)

public JobResult ProcessJob(ReenrollmentJobConfiguration config, SubmitReenrollmentCSR submitReEnrollmentUpdate)
{
_logger.MethodEntry();
_logger = LogHandler.GetClassLogger<ReEnrollment>();
_logger.LogTrace($"Job Configuration: {JsonConvert.SerializeObject(config)}");
var storePath = JsonConvert.DeserializeObject<JobProperties>(config.CertificateStoreDetails.Properties, new JsonSerializerSettings { DefaultValueHandling = DefaultValueHandling.Populate });
Expand Down Expand Up @@ -105,13 +118,15 @@ private JobResult PerformReEnrollment(ReenrollmentJobConfiguration config, Submi
ps.AddScript($"Add-Content $infFilename 'KeyLength={keySize}'");
ps.AddScript($"Add-Content $infFilename 'KeySpec = 0'");

ps.AddScript($"Add-Content $infFilename '[Extensions]'");
ps.AddScript(@"Add-Content $infFilename '2.5.29.17 = ""{text}""'");

// Todo: Parse SAN by '&' and add the below entry for each DSN
foreach (string s in SAN.ToString().Split("&"))
if(SAN != null)
{
ps.AddScript($"Add-Content $infFilename '_continue_ = \"{s + "&"}\"'");
ps.AddScript($"Add-Content $infFilename '[Extensions]'");
ps.AddScript(@"Add-Content $infFilename '2.5.29.17 = ""{text}""'");

foreach (string s in SAN.ToString().Split("&"))
{
ps.AddScript($"Add-Content $infFilename '_continue_ = \"{s + "&"}\"'");
}
}

// Execute the -new command
Expand Down
16 changes: 15 additions & 1 deletion IISU/PSCertStoreException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Runtime.Serialization;

namespace Keyfactor.Extensions.Orchestrator.IISU
Expand Down
16 changes: 15 additions & 1 deletion IISU/PSCertificate.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;

namespace Keyfactor.Extensions.Orchestrator.IISU
{
Expand Down
16 changes: 15 additions & 1 deletion IISU/PowerShellCertException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
Expand Down
18 changes: 16 additions & 2 deletions IISU/PowerShellCertStore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2022 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
Expand Down Expand Up @@ -50,7 +64,7 @@ private void Initalize()
{
using var ps = PowerShell.Create();
ps.Runspace = RunSpace;
//todo: accept StoreType and Store Name enum for which to open

var certStoreScript = $@"
$certStore = New-Object System.Security.Cryptography.X509Certificates.X509Store('{StorePath}','LocalMachine')
$certStore.Open('ReadOnly')
Expand Down
Loading