Skip to content

Commit 0d3aa2a

Browse files
authored
Release 1.1 (#6)
* Update integration-manifest.json * Update integration-manifest.json
1 parent 636a279 commit 0d3aa2a

File tree

9 files changed

+48
-34
lines changed

9 files changed

+48
-34
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
v1.1
2-
- Add support for IBM Key Database (KDB) files
2+
- Added support for IBM Key Database (KDB) files
3+
- Extended error messaging for SSH/SFTP/SCP connection issues
34

45
v1.0
56
- Initial Version

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ The Remote File Orchestrator allows for the remote management of file-based cert
66

77
## About the Keyfactor Universal Orchestrator Capability
88

9-
This repository contains a Universal Orchestrator Extension which is a plugin to the Keyfactor Universal Orchestrator. Within the Keyfactor Platform, Orchestrators are used to manage “certificate stores” — collections of certificates and roots of trust that are found within and used by various applications.
9+
This repository contains a Universal Orchestrator Capability which is a plugin to the Keyfactor Universal Orchestrator. Within the Keyfactor Platform, Orchestrators are used to manage “certificate stores” — collections of certificates and roots of trust that are found within and used by various applications.
1010

1111
The Universal Orchestrator is part of the Keyfactor software distribution and is available via the Keyfactor customer portal. For general instructions on installing Capabilities, see the “Keyfactor Command Orchestrator Installation and Configuration Guide” section of the Keyfactor documentation. For configuration details of this specific Capability, see below in this readme.
1212

1313
The Universal Orchestrator is the successor to the Windows Orchestrator. This Capability plugin only works with the Universal Orchestrator and does not work with the Windows Orchestrator.
1414

15-
---
1615

1716

1817

18+
---
19+
20+
1921

2022
## Platform Specific Notes
2123

@@ -33,7 +35,8 @@ The Keyfactor Universal Orchestrator may be installed on either Windows or Linux
3335

3436
---
3537

36-
<!-- add integration specific information below -->
38+
39+
<!-- add integration specific information below -->
3740
## Overview
3841
The Remote File Orchestrator Extension is a multi-purpose integration that can remotely manage a variety of file-based certificate stores and can easily be extended to manage others. The certificate store types that can be managed in the current version are:
3942
- Java Keystores of type JKS
@@ -54,12 +57,12 @@ This orchestrator extension makes use of an SSH connection to communicate remote
5457
&nbsp;
5558
## Versioning
5659

57-
The version number of a the Remote File Orchestrator Extension can be verified by right clicking on the n the Extensions/RemoteFile installation folder, selecting Properties, and then clicking on the Details tab.
60+
The version number of a the Remote File Orchestrator Extension can be verified by right clicking on the RemoteFile.dll file in the Extensions/RemoteFile installation folder, selecting Properties, and then clicking on the Details tab.
5861
&nbsp;
5962
&nbsp;
6063
## Keyfactor Version Supported
6164

62-
The Remote File Orchestrator Extension has been tested against Keyfactor Universal Orchestrator version 9.5, but should work against earlier or later versions of the Keyfactor Universal Orchestrator.
65+
The Remote File Orchestrator Extension has been tested against Keyfactor Universal Orchestrator version 9.9, but should work against earlier or later versions of the Keyfactor Universal Orchestrator.
6366
&nbsp;
6467
&nbsp;
6568
## Security Considerations
@@ -80,6 +83,8 @@ The Remote File Orchestrator Extension has been tested against Keyfactor Univers
8083

8184
2. When creating/configuring a certificate store in Keyfactor Command, you will see a "Change Credentials" link after entering in the destination client machine (IP or DNS). This link **must** be clicked on to present the credentials dialog. However, it is not required that you enter separate credentials. Simply click SAVE in the resulting dialog without entering in credentials to use the credentials that the Keyfactor Orchestrator Service is running under. Alternatively, you may enter separate credentials into this dialog and use those to connect to the orchestrated server.
8285

86+
Please consult with your company's system administrator for more information on configuring SSH/SFTP/SCP or WinRM in your environment.
87+
8388
**SSH Key-Based Authentiation**
8489
1. When creating a Keyfactor certificate store for the remote file orchestrator extension (see "Creating Certificate Stores" later in this README, you may supply either a user id and password for the certificate store credentials (directly or through one of Keyfactor Command's PAM integrations), or a user id and SSH private key. Both PKCS#1 (BEGIN RSA PRIVATE KEY) and PKCS#8 (BEGIN PRIVATE KEY) formats are supported for the SSH private key. If using the normal Keyfactor Command credentials dialog without PAM integration, just copy and paste the full SSH private key into the Password textbox.
8590
&nbsp;
@@ -171,7 +176,7 @@ Entry Parameters Tab:
171176
- no additional entry parameters
172177

173178
&nbsp;
174-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/PKCS12.curl)
179+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/PKCS12.curl)
175180

176181
&nbsp;
177182
&nbsp;
@@ -201,7 +206,7 @@ Entry Parameters Tab:
201206
- no additional entry parameters
202207

203208
&nbsp;
204-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/JKS.curl)
209+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/JKS.curl)
205210

206211
&nbsp;
207212
&nbsp;
@@ -235,7 +240,7 @@ Entry Parameters Tab:
235240
- no additional entry parameters
236241

237242
&nbsp;
238-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/PEM.curl)
243+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/PEM.curl)
239244

240245
&nbsp;
241246
&nbsp;
@@ -265,7 +270,7 @@ Entry Parameters Tab:
265270
- no additional entry parameters
266271

267272
&nbsp;
268-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/KDB.curl)
273+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/KDB.curl)
269274

270275
&nbsp;
271276
&nbsp;

RemoteFile/ApplicationSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Keyfactor.Logging;
88

99

10-
namespace Keyfactor.Extensions.Orchestrator.RemoteFile
10+
namespace Keyfactor.Extensions.Orchestrator.RemoteFile
1111
{
1212
class ApplicationSettings
1313
{

RemoteFile/Discovery.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public JobResult ProcessJob(DiscoveryJobConfiguration config, SubmitDiscoveryUpd
3232
logger.LogDebug($" {keyValue.Key}: {keyValue.Value}");
3333
}
3434

35-
string[] directoriesToSearch = config.JobProperties["dirs"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
35+
string[] directoriesToSearch = config.JobProperties["dirs"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
3636
string[] extensionsToSearch = config.JobProperties["extensions"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
3737
string[] ignoredDirs = config.JobProperties["ignoreddirs"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
3838
string[] filesTosearch = config.JobProperties["patterns"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -44,6 +44,7 @@ public JobResult ProcessJob(DiscoveryJobConfiguration config, SubmitDiscoveryUpd
4444

4545
try
4646
{
47+
certificateStore.Initialize();
4748
ApplicationSettings.Initialize(this.GetType().Assembly.Location);
4849

4950
if (directoriesToSearch.Length == 0)

RemoteFile/InventoryBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public JobResult ProcessJob(InventoryJobConfiguration config, SubmitInventoryUpd
3838
{
3939
ApplicationSettings.Initialize(this.GetType().Assembly.Location);
4040
certificateStore = new RemoteCertificateStore(config.CertificateStoreDetails.ClientMachine, config.ServerUsername, config.ServerPassword, config.CertificateStoreDetails.StorePath, config.CertificateStoreDetails.StorePassword, config.JobProperties);
41+
certificateStore.Initialize();
4142
certificateStore.LoadCertificateStore(certificateStoreSerializer, config.CertificateStoreDetails.Properties);
4243

4344
List<X509Certificate2Collection> collections = certificateStore.GetCertificateChains();

RemoteFile/ManagementBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public JobResult ProcessJob(ManagementJobConfiguration config)
4848

4949
ApplicationSettings.Initialize(this.GetType().Assembly.Location);
5050
certificateStore = new RemoteCertificateStore(config.CertificateStoreDetails.ClientMachine, config.ServerUsername, config.ServerPassword, config.CertificateStoreDetails.StorePath, config.CertificateStoreDetails.StorePassword, config.JobProperties);
51+
certificateStore.Initialize();
5152

5253
PathFile storePathFile = RemoteCertificateStore.SplitStorePathFile(config.CertificateStoreDetails.StorePath);
5354

@@ -128,4 +129,4 @@ private void CreateStore(ManagementJobConfiguration config)
128129
certificateStore.CreateCertificateStore(config.CertificateStoreDetails.StorePath, linuxFilePermissions);
129130
}
130131
}
131-
}
132+
}

RemoteFile/RemoteCertificateStore.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ internal RemoteCertificateStore(string server, string serverId, string serverPas
7979
}
8080
logger.LogDebug("Store path valid");
8181

82-
Initialize();
83-
8482
logger.MethodExit(LogLevel.Debug);
8583
}
8684

@@ -94,8 +92,6 @@ internal RemoteCertificateStore(string server, string serverId, string serverPas
9492
ServerPassword = serverPassword ?? string.Empty;
9593
ServerType = serverType;
9694

97-
Initialize();
98-
9995
logger.MethodExit(LogLevel.Debug);
10096
}
10197

@@ -326,7 +322,7 @@ internal static PathFile SplitStorePathFile(string pathFileName)
326322
}
327323
}
328324

329-
private void Initialize()
325+
internal void Initialize()
330326
{
331327
logger.MethodEntry(LogLevel.Debug);
332328

RemoteFile/RemoteHandlers/SSHHandler.cs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,16 @@ internal SSHHandler(string server, string serverLogin, string serverPassword)
6767
public override void Initialize()
6868
{
6969
_logger.MethodEntry(LogLevel.Debug);
70-
71-
sshClient = new SshClient(Connection);
72-
sshClient.Connect();
70+
71+
try
72+
{
73+
sshClient = new SshClient(Connection);
74+
sshClient.Connect();
75+
}
76+
catch (Exception ex)
77+
{
78+
throw new RemoteFileException($"Error making a SSH connection to remote server {Connection.Host}, for user {Connection.Username}. Please contact your company's system administrator to verify connection and permission settings.", ex);
79+
}
7380

7481
_logger.MethodExit(LogLevel.Debug);
7582
}
@@ -163,7 +170,7 @@ public override void UploadCertificateFile(string path, string fileName, byte[]
163170
if (ApplicationSettings.FileTransferProtocol == ApplicationSettings.FileTransferProtocolEnum.Both)
164171
_logger.LogDebug($"SCP upload failed. Attempting with SFTP protocol...");
165172
else
166-
throw ex;
173+
throw new RemoteFileException("Error attempting SCP file transfer to {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}. Please contact your company's system administrator to verify connection and permission settings.", ex);
167174
}
168175
finally
169176
{
@@ -190,7 +197,7 @@ public override void UploadCertificateFile(string path, string fileName, byte[]
190197
{
191198
_logger.LogError("Exception during SFTP upload...");
192199
_logger.LogError($"Upload Exception: {RemoteFileException.FlattenExceptionMessages(ex, ex.Message)}");
193-
throw ex;
200+
throw new RemoteFileException("Error attempting SFTP file transfer to {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}. Please contact your company's system administrator to verify connection and permission settings.", ex);
194201
}
195202
finally
196203
{
@@ -235,7 +242,7 @@ public override byte[] DownloadCertificateFile(string path)
235242
{
236243
try
237244
{
238-
_logger.LogDebug($"SCP connection attempt to {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
245+
_logger.LogDebug($"SCP connection attempt from {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
239246
client.Connect();
240247

241248
using (MemoryStream stream = new MemoryStream())
@@ -252,7 +259,7 @@ public override byte[] DownloadCertificateFile(string path)
252259
if (ApplicationSettings.FileTransferProtocol == ApplicationSettings.FileTransferProtocolEnum.Both)
253260
_logger.LogDebug($"SCP download failed. Attempting with SFTP protocol...");
254261
else
255-
throw ex;
262+
throw new RemoteFileException($"Error attempting SCP file transfer from {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}. Please contact your company's system administrator to verify connection and permission settings.", ex);
256263
}
257264
finally
258265
{
@@ -267,7 +274,7 @@ public override byte[] DownloadCertificateFile(string path)
267274
{
268275
try
269276
{
270-
_logger.LogDebug($"SFTP connection attempt to {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
277+
_logger.LogDebug($"SFTP connection attempt from {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
271278
client.Connect();
272279

273280
using (MemoryStream stream = new MemoryStream())
@@ -280,7 +287,7 @@ public override byte[] DownloadCertificateFile(string path)
280287
{
281288
_logger.LogError("Exception during SFTP download...");
282289
_logger.LogError($"Download Exception: {RemoteFileException.FlattenExceptionMessages(ex, ex.Message)}");
283-
throw ex;
290+
throw new RemoteFileException($"Error attempting SFTP file transfer from {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}. Please contact your company's system administrator to verify connection and permission settings.", ex);
284291
}
285292
finally
286293
{

readme_source.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- add integration specific information below -->
1+
<!-- add integration specific information below -->
22
## Overview
33
The Remote File Orchestrator Extension is a multi-purpose integration that can remotely manage a variety of file-based certificate stores and can easily be extended to manage others. The certificate store types that can be managed in the current version are:
44
- Java Keystores of type JKS
@@ -19,12 +19,12 @@ This orchestrator extension makes use of an SSH connection to communicate remote
1919
&nbsp;
2020
## Versioning
2121

22-
The version number of a the Remote File Orchestrator Extension can be verified by right clicking on the n the Extensions/RemoteFile installation folder, selecting Properties, and then clicking on the Details tab.
22+
The version number of a the Remote File Orchestrator Extension can be verified by right clicking on the RemoteFile.dll file in the Extensions/RemoteFile installation folder, selecting Properties, and then clicking on the Details tab.
2323
&nbsp;
2424
&nbsp;
2525
## Keyfactor Version Supported
2626

27-
The Remote File Orchestrator Extension has been tested against Keyfactor Universal Orchestrator version 9.5, but should work against earlier or later versions of the Keyfactor Universal Orchestrator.
27+
The Remote File Orchestrator Extension has been tested against Keyfactor Universal Orchestrator version 9.9, but should work against earlier or later versions of the Keyfactor Universal Orchestrator.
2828
&nbsp;
2929
&nbsp;
3030
## Security Considerations
@@ -45,6 +45,8 @@ The Remote File Orchestrator Extension has been tested against Keyfactor Univers
4545

4646
2. When creating/configuring a certificate store in Keyfactor Command, you will see a "Change Credentials" link after entering in the destination client machine (IP or DNS). This link **must** be clicked on to present the credentials dialog. However, it is not required that you enter separate credentials. Simply click SAVE in the resulting dialog without entering in credentials to use the credentials that the Keyfactor Orchestrator Service is running under. Alternatively, you may enter separate credentials into this dialog and use those to connect to the orchestrated server.
4747

48+
Please consult with your company's system administrator for more information on configuring SSH/SFTP/SCP or WinRM in your environment.
49+
4850
**SSH Key-Based Authentiation**
4951
1. When creating a Keyfactor certificate store for the remote file orchestrator extension (see "Creating Certificate Stores" later in this README, you may supply either a user id and password for the certificate store credentials (directly or through one of Keyfactor Command's PAM integrations), or a user id and SSH private key. Both PKCS#1 (BEGIN RSA PRIVATE KEY) and PKCS#8 (BEGIN PRIVATE KEY) formats are supported for the SSH private key. If using the normal Keyfactor Command credentials dialog without PAM integration, just copy and paste the full SSH private key into the Password textbox.
5052
&nbsp;
@@ -136,7 +138,7 @@ Entry Parameters Tab:
136138
- no additional entry parameters
137139

138140
&nbsp;
139-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/PKCS12.curl)
141+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/PKCS12.curl)
140142

141143
&nbsp;
142144
&nbsp;
@@ -166,7 +168,7 @@ Entry Parameters Tab:
166168
- no additional entry parameters
167169

168170
&nbsp;
169-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/JKS.curl)
171+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/JKS.curl)
170172

171173
&nbsp;
172174
&nbsp;
@@ -200,7 +202,7 @@ Entry Parameters Tab:
200202
- no additional entry parameters
201203

202204
&nbsp;
203-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/PEM.curl)
205+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/PEM.curl)
204206

205207
&nbsp;
206208
&nbsp;
@@ -230,7 +232,7 @@ Entry Parameters Tab:
230232
- no additional entry parameters
231233

232234
&nbsp;
233-
CURL script to automate certificate store type creation can be found [here](https://github.com/Keyfactor/remote-file-orchestrator/blob/initial-version/Certificate%20Store%20Type%20CURL%20Scripts/KDB.curl)
235+
CURL script to automate certificate store type creation can be found [here](Certificate%20Store%20Type%20CURL%20Scripts/KDB.curl)
234236

235237
&nbsp;
236238
&nbsp;

0 commit comments

Comments
 (0)