Skip to content

Docs update #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: release-2.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
224 changes: 187 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Please reference [Post Installation](#post-installation) for more information on
Please consult with your company's system administrator for more information on configuring SSH/SFTP/SCP or WinRM in your environment.


## Create Certificate Store Types
## Certificate Store Types

To use the Remote File Universal Orchestrator extension, you **must** create the Certificate Store Types required for your usecase. This only needs to happen _once_ per Keyfactor Command instance.

Expand All @@ -203,12 +203,38 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store
<details><summary>RFJKS (RFJKS)</summary>


* **Create RFJKS using kfutil**:

```shell
# RFJKS
kfutil store-types create RFJKS
```
### Supported Operations

| Operation | Is Supported |
|--------------|------------------------------------------------------------------------------------------------------------------------|
| Add | ✅ Checked |
| Remove | ✅ Checked |
| Discovery | ✅ Checked |
| Reenrollment | 🔲 Unchecked |
| Create | ✅ Checked |

### Creation Using kfutil:
`kfutil` is a custom CLI for the Keyfactor Command API and can be used to created certificate store types.
For more information on [kfutil](https://github.com/Keyfactor/kfutil) check out the [docs](https://github.com/Keyfactor/kfutil?tab=readme-ov-file#quickstart)

#### Using online definition from GitHub:
This will reach out to GitHub and pull the latest store-type definition
```shell
# RFJKS
kfutil store-types create RFJKS
```

#### Offline creation using integration-manifest file:
If required, it is possible to create store types from the [integration-manifest.json](./integration-manifest.json) included in this repo.
You would first download the [integration-manifest.json](./integration-manifest.json) and then run the following command
in your offline environment.
```shell
kfutil store-types create --from-file integration-manifest.json
```

### Manual Creation
If you do not wish to use the `kfutil` CLI then certificate store types can be creating in the web UI as described below.

* **Create RFJKS manually in the Command UI**:
<details><summary>Create RFJKS manually in the Command UI</summary>
Expand Down Expand Up @@ -270,18 +296,43 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store




</details>

<details><summary>RFPEM (RFPEM)</summary>


* **Create RFPEM using kfutil**:

```shell
# RFPEM
kfutil store-types create RFPEM
```
### Supported Operations

| Operation | Is Supported |
|--------------|------------------------------------------------------------------------------------------------------------------------|
| Add | ✅ Checked |
| Remove | ✅ Checked |
| Discovery | ✅ Checked |
| Reenrollment | 🔲 Unchecked |
| Create | ✅ Checked |

### Creation Using kfutil:
`kfutil` is a custom CLI for the Keyfactor Command API and can be used to created certificate store types.
For more information on [kfutil](https://github.com/Keyfactor/kfutil) check out the [docs](https://github.com/Keyfactor/kfutil?tab=readme-ov-file#quickstart)

#### Using online definition from GitHub:
This will reach out to GitHub and pull the latest store-type definition
```shell
# RFPEM
kfutil store-types create RFPEM
```

#### Offline creation using integration-manifest file:
If required, it is possible to create store types from the [integration-manifest.json](./integration-manifest.json) included in this repo.
You would first download the [integration-manifest.json](./integration-manifest.json) and then run the following command
in your offline environment.
```shell
kfutil store-types create --from-file integration-manifest.json
```

### Manual Creation
If you do not wish to use the `kfutil` CLI then certificate store types can be creating in the web UI as described below.

* **Create RFPEM manually in the Command UI**:
<details><summary>Create RFPEM manually in the Command UI</summary>
Expand Down Expand Up @@ -347,18 +398,43 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store




</details>

<details><summary>RFPkcs12 (RFPkcs12)</summary>


* **Create RFPkcs12 using kfutil**:

```shell
# RFPkcs12
kfutil store-types create RFPkcs12
```
### Supported Operations

| Operation | Is Supported |
|--------------|------------------------------------------------------------------------------------------------------------------------|
| Add | ✅ Checked |
| Remove | ✅ Checked |
| Discovery | ✅ Checked |
| Reenrollment | 🔲 Unchecked |
| Create | ✅ Checked |

### Creation Using kfutil:
`kfutil` is a custom CLI for the Keyfactor Command API and can be used to created certificate store types.
For more information on [kfutil](https://github.com/Keyfactor/kfutil) check out the [docs](https://github.com/Keyfactor/kfutil?tab=readme-ov-file#quickstart)

#### Using online definition from GitHub:
This will reach out to GitHub and pull the latest store-type definition
```shell
# RFPkcs12
kfutil store-types create RFPkcs12
```

#### Offline creation using integration-manifest file:
If required, it is possible to create store types from the [integration-manifest.json](./integration-manifest.json) included in this repo.
You would first download the [integration-manifest.json](./integration-manifest.json) and then run the following command
in your offline environment.
```shell
kfutil store-types create --from-file integration-manifest.json
```

### Manual Creation
If you do not wish to use the `kfutil` CLI then certificate store types can be creating in the web UI as described below.

* **Create RFPkcs12 manually in the Command UI**:
<details><summary>Create RFPkcs12 manually in the Command UI</summary>
Expand Down Expand Up @@ -420,18 +496,43 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store




</details>

<details><summary>RFDER (RFDER)</summary>


* **Create RFDER using kfutil**:

```shell
# RFDER
kfutil store-types create RFDER
```
### Supported Operations

| Operation | Is Supported |
|--------------|------------------------------------------------------------------------------------------------------------------------|
| Add | ✅ Checked |
| Remove | ✅ Checked |
| Discovery | ✅ Checked |
| Reenrollment | 🔲 Unchecked |
| Create | ✅ Checked |

### Creation Using kfutil:
`kfutil` is a custom CLI for the Keyfactor Command API and can be used to created certificate store types.
For more information on [kfutil](https://github.com/Keyfactor/kfutil) check out the [docs](https://github.com/Keyfactor/kfutil?tab=readme-ov-file#quickstart)

#### Using online definition from GitHub:
This will reach out to GitHub and pull the latest store-type definition
```shell
# RFDER
kfutil store-types create RFDER
```

#### Offline creation using integration-manifest file:
If required, it is possible to create store types from the [integration-manifest.json](./integration-manifest.json) included in this repo.
You would first download the [integration-manifest.json](./integration-manifest.json) and then run the following command
in your offline environment.
```shell
kfutil store-types create --from-file integration-manifest.json
```

### Manual Creation
If you do not wish to use the `kfutil` CLI then certificate store types can be creating in the web UI as described below.

* **Create RFDER manually in the Command UI**:
<details><summary>Create RFDER manually in the Command UI</summary>
Expand Down Expand Up @@ -494,18 +595,43 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store




</details>

<details><summary>RFKDB (RFKDB)</summary>


* **Create RFKDB using kfutil**:

```shell
# RFKDB
kfutil store-types create RFKDB
```
### Supported Operations

| Operation | Is Supported |
|--------------|------------------------------------------------------------------------------------------------------------------------|
| Add | ✅ Checked |
| Remove | ✅ Checked |
| Discovery | ✅ Checked |
| Reenrollment | 🔲 Unchecked |
| Create | ✅ Checked |

### Creation Using kfutil:
`kfutil` is a custom CLI for the Keyfactor Command API and can be used to created certificate store types.
For more information on [kfutil](https://github.com/Keyfactor/kfutil) check out the [docs](https://github.com/Keyfactor/kfutil?tab=readme-ov-file#quickstart)

#### Using online definition from GitHub:
This will reach out to GitHub and pull the latest store-type definition
```shell
# RFKDB
kfutil store-types create RFKDB
```

#### Offline creation using integration-manifest file:
If required, it is possible to create store types from the [integration-manifest.json](./integration-manifest.json) included in this repo.
You would first download the [integration-manifest.json](./integration-manifest.json) and then run the following command
in your offline environment.
```shell
kfutil store-types create --from-file integration-manifest.json
```

### Manual Creation
If you do not wish to use the `kfutil` CLI then certificate store types can be creating in the web UI as described below.

* **Create RFKDB manually in the Command UI**:
<details><summary>Create RFKDB manually in the Command UI</summary>
Expand Down Expand Up @@ -567,18 +693,43 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store




</details>

<details><summary>RFORA (RFORA)</summary>


* **Create RFORA using kfutil**:

```shell
# RFORA
kfutil store-types create RFORA
```
### Supported Operations

| Operation | Is Supported |
|--------------|------------------------------------------------------------------------------------------------------------------------|
| Add | ✅ Checked |
| Remove | ✅ Checked |
| Discovery | ✅ Checked |
| Reenrollment | 🔲 Unchecked |
| Create | ✅ Checked |

### Creation Using kfutil:
`kfutil` is a custom CLI for the Keyfactor Command API and can be used to created certificate store types.
For more information on [kfutil](https://github.com/Keyfactor/kfutil) check out the [docs](https://github.com/Keyfactor/kfutil?tab=readme-ov-file#quickstart)

#### Using online definition from GitHub:
This will reach out to GitHub and pull the latest store-type definition
```shell
# RFORA
kfutil store-types create RFORA
```

#### Offline creation using integration-manifest file:
If required, it is possible to create store types from the [integration-manifest.json](./integration-manifest.json) included in this repo.
You would first download the [integration-manifest.json](./integration-manifest.json) and then run the following command
in your offline environment.
```shell
kfutil store-types create --from-file integration-manifest.json
```

### Manual Creation
If you do not wish to use the `kfutil` CLI then certificate store types can be creating in the web UI as described below.

* **Create RFORA manually in the Command UI**:
<details><summary>Create RFORA manually in the Command UI</summary>
Expand Down Expand Up @@ -641,7 +792,6 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store




</details>


Expand Down
2 changes: 1 addition & 1 deletion RemoteFile/Discovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public JobResult ProcessJob(DiscoveryJobConfiguration config, SubmitDiscoveryUpd

ApplicationSettings.Initialize(this.GetType().Assembly.Location);

certificateStore = new RemoteCertificateStore(config.ClientMachine, userName, userPassword, directoriesToSearch[0].Substring(0, 1) == "/" ? RemoteCertificateStore.ServerTypeEnum.Linux : RemoteCertificateStore.ServerTypeEnum.Windows, ApplicationSettings.SSHPort);
certificateStore = new RemoteCertificateStore(config.ClientMachine, userName, userPassword, ApplicationSettings.SSHPort);
certificateStore.Initialize(ApplicationSettings.DefaultSudoImpersonatedUser);

if (directoriesToSearch.Length == 0)
Expand Down
23 changes: 20 additions & 3 deletions RemoteFile/RemoteCertificateStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,23 @@ internal enum ServerTypeEnum


internal RemoteCertificateStore() { }

internal ServerTypeEnum DetermineRuntimeOs()
{
logger.MethodEntry();
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
logger.LogDebug("Running in a Linux environment");
logger.MethodExit();
return ServerTypeEnum.Linux;
}

// Console.WriteLine("Unknown OS");
logger.LogDebug("Running in a Windows environment");
logger.MethodExit();
return ServerTypeEnum.Windows;

}

internal RemoteCertificateStore(string server, string serverId, string serverPassword, string storeFileAndPath, string storePassword, ApplicationSettings.FileTransferProtocolEnum fileTransferProtocol, int sshPort, bool includePortInSPN)
{
Expand All @@ -78,7 +95,7 @@ internal RemoteCertificateStore(string server, string serverId, string serverPas
ServerId = serverId;
ServerPassword = serverPassword ?? string.Empty;
StorePassword = storePassword;
ServerType = StorePath.Substring(0, 1) == "/" ? ServerTypeEnum.Linux : ServerTypeEnum.Windows;
ServerType = DetermineRuntimeOs();
UploadFilePath = !string.IsNullOrEmpty(ApplicationSettings.SeparateUploadFilePath) && ServerType == ServerTypeEnum.Linux ? ApplicationSettings.SeparateUploadFilePath : StorePath;
FileTransferProtocol = fileTransferProtocol;
SSHPort = sshPort;
Expand All @@ -96,15 +113,15 @@ internal RemoteCertificateStore(string server, string serverId, string serverPas
logger.MethodExit(LogLevel.Debug);
}

internal RemoteCertificateStore(string server, string serverId, string serverPassword, ServerTypeEnum serverType, int sshPort)
internal RemoteCertificateStore(string server, string serverId, string serverPassword, int sshPort)
{
logger = LogHandler.GetClassLogger(this.GetType());
logger.MethodEntry(LogLevel.Debug);

Server = server;
ServerId = serverId;
ServerPassword = serverPassword ?? string.Empty;
ServerType = serverType;
ServerType = DetermineRuntimeOs();
SSHPort = sshPort;

logger.MethodExit(LogLevel.Debug);
Expand Down
Loading