Replacing self-signed certificates on the Delphix connector
The Delphix Connector relies on a Java Keystore with a self-signed X.509 certificate in order to instantiate SSL. If this certificate does not conform to the customer's business standards, it is possible to run a PowerShell script (ReplaceConnectorKeystore.ps1) to replace the self-signed certificate with a certificate that is signed by a Certificate Authority of their choice (for example Verisign). For more information, read the Regenerating self-signed end-entity and CA certificates page.
This script should only be used to replace the self-signed certificate in the Delphix Connector's Java Keystore with a signed certificate. Upon execution, the script will do the following:
-
Validate that a
PrivateKeyEntryexists within the input keystore. -
Stop the
DelphixConnectorservice. -
Rename the existing
DelphixConnectorkeystore. -
Import the new keystore.
-
Start the
DelphixConnectorservice.
Prerequisites:
-
The Delphix Connector is installed
-
The
DelphixConnector.jksfile exists at<Drive>:\<path to DelphixConnector>\connector\DelphixConnector.jks -
The
DelphixConnector.propertiesfile exists at<Drive>:\<path to DelphixConnector>\connector\DelphixConnector.propertiesand has not been tampered with (STOREPASS,KEYPASS, andUUIDare present) -
The Java Keytool utility exists at
<Drive>:\ <path to DelphixConnector>\jre\bin\keytool.exe -
The script,
ReplaceConnectorKeystore.ps1exists at<Drive>:\<path to DelphixConnector>\connector\ReplaceConnectorKeystore.ps1
User inputs:
-
A
JKS/PKCS#12formatted keystore containing aPrivateKeyEntrywith a signed certificate -
The alias of the
PrivateKeyEntryin the new keystore -
The password for the new
JKS/PKCS#12keystore -
The password for the private key in the new
JKS/PKCS#12keystore
Running the script:
Open up a PowerShell console, and do the following:
-
Navigate to where
ReplaceConnectorKeystore.ps1lives. -
Run .
\ReplaceConnectorKeystore.ps1. -
Enter the full path to the new
JKS/PKCS#12keystore -
Enter the alias of the
PrivateKeyEntryin the input keystore -
Enter the password for the input keystore
-
Enter the password for the private key in the input keystore
How to check if your Java keystore contains a privateKeyEntry:
PS C:\Program Files\Delphix\DelphixConnector\jre\bin> .\keytool.exe -list -keystore ..\..\connector\DelphixConnector.jks
-storepass <STOREPASS from DelphixConnector.properties file>Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
delphixconnector-4ef488a8-85df-4418-b56d-1e61b25c0aa2, Jul 28, 2017, PrivateKeyEntry,
Certificate fingerprint (SHA1): 67:79:DA:E2:64:7A:74:42:62:CA:13:66:29:16:81:0A:B9:7E:4A:60
Example of a successful keystore replacement:
PS C:\Users\dtully\Documents> .\ReplaceConnectorKeyStore.ps1
Enter the full path to a JKS/PKCS#12 keystore: C:\Program Files\Delphix\DelphixConnector\jre\bin\test.jks
Enter alias: leaf
Enter keystore password: ********
Enter private key password: ********
Verifying that a PrivateKeyEntry exists in C:\Program Files\Delphix\DelphixConnector\jre\bin\test.jks
Stopping the Delphix Connector service
Renaming C:\Program Files\Delphix\DelphixConnector\connector\DelphixConnector.jks to C:\Program Files\Delphix\DelphixConnector\connector\DelphixConnector.jks.old
Importing the keystore into DelphixConnector.jks
[Storing C:\Program Files\Delphix\DelphixConnector\connector\DelphixConnector.jks]
Starting the Delphix Connector service