Skip to content

Commit 6fd6ed5

Browse files
fiddlermikeyleefine02Lee FineKeyfactordoebrowsk
authored
Merge 2.9.1 to main (#72)
* Ab#63477 (#68) * use dual build action release candidate * target completed 3.1.1 workflow * ab#64984 * Update generated docs --------- Co-authored-by: Lee Fine <[email protected]> Co-authored-by: Lee Fine <[email protected]> Co-authored-by: Keyfactor <[email protected]> Co-authored-by: Macey Dobrowsky <[email protected]>
1 parent d6ebae1 commit 6fd6ed5

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

.github/workflows/keyfactor-starter-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
call-starter-workflow:
14-
uses: keyfactor/actions/.github/workflows/[email protected].1
14+
uses: keyfactor/actions/.github/workflows/[email protected].2
1515
secrets:
1616
token: ${{ secrets.V2BUILDTOKEN}}
1717
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v2.9.1
2+
- Bug Fix: Use AES encryption when creating PKCS12 files instead of less secure defaults
3+
14
v2.9.0
25
- Modify Discovery on Linux servers to filter out ignored folders when searching using the Find command rather than eliminating them after. This was done to eliminate permissions errors.
36
- Deprecated isRSAPrivateKey custom property on RFPEM certificate store type. Integration now reads the existing private key to determin if it is formatted as PKCS#1 or PKCS#8 and, on renewal, keeps the format the same. For new PEM certificate stores/certificates, PKCS#8 will always be used. PLEASE NOTE, for existing certificate stores that already have isRSAPrivateKey defined, this setting will be ignored.

README.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ Please refer to the READMEs for each supported store type for more information o
5050
|-----|-----|------|
5151
|Orchestrated Server hosting certificate store(s) on remote Windows server|WinRM connection | SSH connection |
5252
|Orchestrated Server hosting certificate store(s) on remote Linux server| SSH connection | SSH connection |
53-
|Certificate store(s) on same server as orchestrator service (Agent)| WinRM connection or local file system | SSH connection or local file system |
53+
|Certificate store(s) on same server as orchestrator service (Agent)| WinRM connection or local file system | SSH connection or local file system |
54+
55+
Note: when creating, adding certificates to, or removing certificates from any store managed by RemoteFile, the destination store file will be recreated. When this occurs current AES encryption algorithms will be used for affected certificates and certificate store files.
5456

5557
The Remote File Universal Orchestrator extension implements 6 Certificate Store Types. Depending on your use case, you may elect to use one, or all of these Certificate Store Types. Descriptions of each are provided below.
5658

5759
<details><summary>RFJKS (RFJKS)</summary>
5860

61+
5962
### RFJKS
6063

6164
The RFJKS store type can be used to manage java keystores of types JKS or PKCS12. If creating a new java keystore and adding a certificate all via Keyfactor Command, the created java keystore will be of type PKCS12, as java keystores of type JKS have been deprecated as of JDK 9.
@@ -68,6 +71,7 @@ Use cases supported:
6871

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

74+
7175
### RFPEM
7276

7377
The RFPEM store type can be used to manage PEM encoded files.
@@ -84,6 +88,7 @@ NOTE: PEM stores may only have one private key (internal or external) associated
8488

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

91+
8792
### RFPkcs12
8893

8994
The RFPkcs12 store type can be used to manage any PKCS#12 compliant file format INCLUDING java keystores of type PKCS12.
@@ -101,6 +106,7 @@ Use cases not supported:
101106

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

109+
104110
### RFDER
105111

106112
The RFDER store type can be used to manage DER encoded files.
@@ -112,6 +118,7 @@ Use cases supported:
112118

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

121+
115122
### RFKDB
116123

117124
The RFKDB store type can be used to manage IBM Key Database Files (KDB) files. The IBM utility, GSKCAPICMD, is used to read and write certificates from and to the target store and is therefore required to be installed on the server where each KDB certificate store being managed resides, and its location MUST be in the system $Path.
@@ -124,6 +131,7 @@ Use cases supported:
124131

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

134+
127135
### RFORA
128136

129137
The RFORA store type can be used to manage Pkcs12 Oracle Wallets. Please note that while this should work for Pkcs12 Oracle Wallets installed on both Windows and Linux servers, this has only been tested on wallets installed on Windows. Please note, when entering the Store Path for an Oracle Wallet in Keyfactor Command, make sure to INCLUDE the eWallet.p12 file name that by convention is the name of the Pkcs12 wallet file that gets created.
@@ -319,7 +327,7 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store
319327
| IsTrustStore | Trust Store | The IsTrustStore field should contain a boolean value ('true' or 'false') indicating whether the store will be identified as a trust store, which can hold multiple certificates without private keys. Example: 'true' for a trust store or 'false' for a store with a single certificate and private key. | Bool | false | 🔲 Unchecked |
320328
| IncludesChain | Store Includes Chain | The IncludesChain field should contain a boolean value ('true' or 'false') indicating whether the certificate store includes the full certificate chain along with the end entity certificate. Example: 'true' to include the full chain or 'false' to exclude it. | Bool | false | 🔲 Unchecked |
321329
| SeparatePrivateKeyFilePath | Separate Private Key File Location | The SeparatePrivateKeyFilePath field should contain the full path and file name where the separate private key file will be stored if it is to be kept outside the main certificate file. Example: '/path/to/privatekey.pem'. | String | | 🔲 Unchecked |
322-
| IgnorePrivateKeyOnInventory | Ignore Private Key On Inventory | The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to ignore the private key during inventory, which will make the store inventory-only and return all certificates without private key entries. Example: 'true' to ignore the private key or 'false' to include it. | Bool | false | 🔲 Unchecked |
330+
| IgnorePrivateKeyOnInventory | Ignore Private Key On Inventory | The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to disregard the private key during inventory. Setting this to 'true' will allow inventory for the store without needing to supply the location of the private key or the password if the key is encrypted. However, doing this makes the store in effect inventory-only and no management jobs will be able to be run for this store. Example: 'true' to ignore the private key or 'false' to include it. | Bool | false | 🔲 Unchecked |
323331

324332
The Custom Fields tab should look like this:
325333

@@ -610,7 +618,7 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store
610618
| --------- | ----------- | ----------- | ----------- |
611619
| Older than `11.0.0` | | | `net6.0` |
612620
| Between `11.0.0` and `11.5.1` (inclusive) | `net6.0` | | `net6.0` |
613-
| Between `11.0.0` and `11.5.1` (inclusive) | `net8.0` | `Never` | `net6.0` |
621+
| Between `11.0.0` and `11.5.1` (inclusive) | `net8.0` | `Disable` | `net6.0` |
614622
| Between `11.0.0` and `11.5.1` (inclusive) | `net8.0` | `LatestMajor` | `net8.0` |
615623
| `11.6` _and_ newer | `net8.0` | | `net8.0` |
616624

@@ -865,7 +873,7 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store
865873
| IsTrustStore | The IsTrustStore field should contain a boolean value ('true' or 'false') indicating whether the store will be identified as a trust store, which can hold multiple certificates without private keys. Example: 'true' for a trust store or 'false' for a store with a single certificate and private key. |
866874
| IncludesChain | The IncludesChain field should contain a boolean value ('true' or 'false') indicating whether the certificate store includes the full certificate chain along with the end entity certificate. Example: 'true' to include the full chain or 'false' to exclude it. |
867875
| SeparatePrivateKeyFilePath | The SeparatePrivateKeyFilePath field should contain the full path and file name where the separate private key file will be stored if it is to be kept outside the main certificate file. Example: '/path/to/privatekey.pem'. |
868-
| IgnorePrivateKeyOnInventory | The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to ignore the private key during inventory, which will make the store inventory-only and return all certificates without private key entries. Example: 'true' to ignore the private key or 'false' to include it. |
876+
| IgnorePrivateKeyOnInventory | The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to disregard the private key during inventory. Setting this to 'true' will allow inventory for the store without needing to supply the location of the private key or the password if the key is encrypted. However, doing this makes the store in effect inventory-only and no management jobs will be able to be run for this store. Example: 'true' to ignore the private key or 'false' to include it. |
869877
| Store Password | Password used to secure the Certificate Store. For stores with PKCS#8 private keys, set the password for encrypted private keys (BEGIN ENCRYPTED PRIVATE KEY) or 'No Value' for unencrypted private keys (BEGIN PRIVATE KEY). If managing a store with a PKCS#1 private key (BEGIN RSA PRIVATE KEY), this value MUST be set to 'No Value' |
870878
871879
@@ -914,7 +922,7 @@ The Remote File Universal Orchestrator extension implements 6 Certificate Store
914922
| IsTrustStore | The IsTrustStore field should contain a boolean value ('true' or 'false') indicating whether the store will be identified as a trust store, which can hold multiple certificates without private keys. Example: 'true' for a trust store or 'false' for a store with a single certificate and private key. |
915923
| IncludesChain | The IncludesChain field should contain a boolean value ('true' or 'false') indicating whether the certificate store includes the full certificate chain along with the end entity certificate. Example: 'true' to include the full chain or 'false' to exclude it. |
916924
| SeparatePrivateKeyFilePath | The SeparatePrivateKeyFilePath field should contain the full path and file name where the separate private key file will be stored if it is to be kept outside the main certificate file. Example: '/path/to/privatekey.pem'. |
917-
| IgnorePrivateKeyOnInventory | The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to ignore the private key during inventory, which will make the store inventory-only and return all certificates without private key entries. Example: 'true' to ignore the private key or 'false' to include it. |
925+
| IgnorePrivateKeyOnInventory | The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to disregard the private key during inventory. Setting this to 'true' will allow inventory for the store without needing to supply the location of the private key or the password if the key is encrypted. However, doing this makes the store in effect inventory-only and no management jobs will be able to be run for this store. Example: 'true' to ignore the private key or 'false' to include it. |
918926
| Store Password | Password used to secure the Certificate Store. For stores with PKCS#8 private keys, set the password for encrypted private keys (BEGIN ENCRYPTED PRIVATE KEY) or 'No Value' for unencrypted private keys (BEGIN PRIVATE KEY). If managing a store with a PKCS#1 private key (BEGIN RSA PRIVATE KEY), this value MUST be set to 'No Value' |
919927
920928
@@ -1410,7 +1418,7 @@ If running as an agent (accessing stores on the server where the Universal Orche
14101418
14111419
## Developer Notes
14121420
1413-
The Remote File Orchestrator Extension is meant to be extended to be used for other file based certificate store types than the ones referenced above. The advantage to extending this integration rather than creating a new one is that the configuration, remoting, and Inventory/Management/Discovery logic is already written. The developer needs to only implement a few classes and write code to convert the destired file based store to a common format. This section describes the steps necessary to add additional store/file types. Please note that familiarity with the [.Net Core BouncyCastle cryptography library](https://github.com/bcgit/bc-csharp) is a prerequisite for adding additional supported file/store types.
1421+
The Remote File Orchestrator Extension is designed to be highly extensible, enabling its use with various file-based certificate stores beyond the specific implementations currently referenced above. The advantage to extending this integration rather than creating a new one is that the configuration, remoting, and Inventory/Management/Discovery logic is already written. The developer needs to only implement a few classes and write code to convert the destired file based store to a common format. This section describes the steps necessary to add additional store/file types. Please note that familiarity with the [.Net Core BouncyCastle cryptography library](https://github.com/bcgit/bc-csharp) is a prerequisite for adding additional supported file/store types.
14141422
14151423
Steps to create a new supported file based certificate store type:
14161424

RemoteFile/ImplementedStoreTypes/PKCS12/PKCS12CertificateStoreSerializer.cs

+11
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
using Keyfactor.Extensions.Orchestrator.RemoteFile.Models;
1313

1414
using Org.BouncyCastle.Pkcs;
15+
using Org.BouncyCastle.Asn1.Pkcs;
16+
1517
using Keyfactor.Logging;
1618
using Microsoft.Extensions.Logging;
1719
using System.Linq;
1820
using Keyfactor.PKI.Extensions;
21+
using Org.BouncyCastle.Asn1.Nist;
1922

2023
namespace Keyfactor.Extensions.Orchestrator.RemoteFile.PKCS12
2124
{
@@ -53,6 +56,10 @@ public Pkcs12Store DeserializeRemoteCertificateStore(byte[] storeContents, strin
5356
public List<SerializedStoreInfo> SerializeRemoteCertificateStore(Pkcs12Store certificateStore, string storePath, string storeFileName, string storePassword, IRemoteHandler remoteHandler)
5457
{
5558
Pkcs12StoreBuilder storeBuilder = new Pkcs12StoreBuilder();
59+
storeBuilder.SetCertAlgorithm(PkcsObjectIdentifiers.PbeWithShaAnd3KeyTripleDesCbc);
60+
storeBuilder.SetKeyAlgorithm(NistObjectIdentifiers.IdAes256Cbc, PkcsObjectIdentifiers.IdHmacWithSha256);
61+
storeBuilder.SetUseDerEncoding(true);
62+
5663
Pkcs12Store workingStore = storeBuilder.Build();
5764

5865
foreach (string alias in certificateStore.Aliases)
@@ -88,6 +95,10 @@ public string GetPrivateKeyPath()
8895
private Pkcs12Store ConvertAliases(Pkcs12Store workingStore, bool useThumbprintAsAlias)
8996
{
9097
Pkcs12StoreBuilder storeBuilder = new Pkcs12StoreBuilder();
98+
storeBuilder.SetCertAlgorithm(PkcsObjectIdentifiers.PbeWithShaAnd3KeyTripleDesCbc);
99+
storeBuilder.SetKeyAlgorithm(NistObjectIdentifiers.IdAes256Cbc, PkcsObjectIdentifiers.IdHmacWithSha256);
100+
storeBuilder.SetUseDerEncoding(true);
101+
91102
Pkcs12Store returnStore = storeBuilder.Build();
92103

93104
if (HasEmptyAliases)

docsource/content.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Please refer to the READMEs for each supported store type for more information o
2121
|Orchestrated Server hosting certificate store(s) on remote Linux server| SSH connection | SSH connection |
2222
|Certificate store(s) on same server as orchestrator service (Agent)| WinRM connection or local file system | SSH connection or local file system |
2323

24+
Note: when creating, adding certificates to, or removing certificates from any store managed by RemoteFile, the destination store file will be recreated. When this occurs current AES encryption algorithms will be used for affected certificates and certificate store files.
25+
2426

2527
## Requirements
2628

integration-manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
"DependsOn": "",
201201
"Type": "Bool",
202202
"DefaultValue": "false",
203-
"Description": "The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to ignore the private key during inventory, which will make the store inventory-only and return all certificates without private key entries. Example: 'true' to ignore the private key or 'false' to include it."
203+
"Description": "The IgnorePrivateKeyOnInventory field should contain a boolean value ('true' or 'false') indicating whether to disregard the private key during inventory. Setting this to 'true' will allow inventory for the store without needing to supply the location of the private key or the password if the key is encrypted. However, doing this makes the store in effect inventory-only and no management jobs will be able to be run for this store. Example: 'true' to ignore the private key or 'false' to include it."
204204
}
205205
],
206206
"EntryParameters": [],
@@ -540,4 +540,4 @@
540540
]
541541
}
542542
}
543-
}
543+
}

0 commit comments

Comments
 (0)