Code Block |
---|
title | Windows Command Line Example |
---|
|
"%JAVA_HOME%\bin\keytool" -importpass -alias pepperKeypepperkey -keystore C:\secure\keystore.jks -storetype PKCS12 |
Code Block |
---|
title | Windows Powershell Example |
---|
|
&"$env:JAVA_HOME\bin\keytool.exe" -importpass -alias pepperKeypepperkey -keystore C:\secure\keystore.jks -storetype PKCS12 |
Code Block |
---|
|
$JAVA_HOME/bin/keytool -importpass -alias pepperkey -keystore /opt/secure/keystore.jks -storetype PKCS12 |
Add Database Credentials
1.1 Run the -importpass
command, specifying the alias username for the PhixFlow database, for example phixflow-database-user
.
1.2 When prompted, enter the keystore password.
1.3 When prompted for the password, enter the actual username for the PhixFlow database, for example phixflow
.
Code Block |
---|
title | Windows Command Line |
---|
|
"%JAVA_HOME%\bin\keytool" -importpass -alias phixflow-database-user -keystore C:\secure\keystore.jks -storetype PKCS12 |
Code Block |
---|
title | Windows Powershell Example |
---|
|
&"$env:JAVA_HOME\bin\keytool.exe" -importpass -alias phixflow-database-user -keystore C:\secure\keystore.jks -storetype PKCS12 |
Code Block |
---|
|
$JAVA_HOME/bin/keytool -importpass -alias phixflow-database-user -keystore /opt/secure/keystore.jks -storetype PKCS12 |
2.1. Run the -importpass
command specifying the alias password for the PhixFlow database, for example phixflow-database-password
.
2.2 When prompted, enter the keystore password.
2.3 When prompted for the password, enter the actual password for the PhixFlow database.
Code Block |
---|
title | Windows Command Line Example |
---|
|
"%JAVA_HOME%\bin\keytool" -importpass -alias phixflow-database-password -keystore C:\secure\keystore.jks -storetype PKCS12 |
Code Block |
---|
title | Windows Powershell Example |
---|
|
&"$env:JAVA_HOME\bin\keytool.exe" -importpass -alias phixflow-database-password -keystore C:\secure\keystore.jks -storetype PKCS12 |
Code Block |
---|
|
$JAVA_HOME/bin/keytool -importpass -alias phixflow-database-password -keystore C:\secure\/opt/secure/keystore.jks -storetype PKCS12 |
Step 3 The configuration process differs between version 10 and version 11.
Please follow the relevant instructions below.
Expand |
---|
|
The following settings need to be configured in local.properties or as environment variables. Insert excerpt |
---|
| Server Configuration Properties |
---|
| Server Configuration Properties |
---|
name | Keystore |
---|
nopanel | true |
---|
|
|
Expand |
---|
|
Edit phixflow-datasource.xml to add the aliases for the PhixFlow database username and password. For example: Code Block |
---|
<property name="username">
<value>phixflow-database-user</value>
</property>
<property name="password">
<value>phixflow-database-password</value>
</property> |
|
4 Note |
---|
We recommend that you use an environment variable for the keystore password, as it provides additional security. If you do not set an environment variable, you must include the keystore password in phixflow-secret.xml. |
Create an environment variable with the form <variable-name>: <keystore-password>
| In Windows | In Linux |
---|
<variable-name> | In Windows: In the environment variable, specify any variable name you choose. | Use the EnvironmentFile directive in the systemd service definition. Ensure that only root can read/write EnvironmentFile . For information about how to set environment variables in Linux, see: | <keystore-password> | Specify the password for the keystore. |
Warning |
---|
Never add the keystore password to the profile for the Tomcat user. |
|
5 Copy phixflow-secret.xml.example to phixflow-secret.xml and edit it to set the values as follows: Required? | Property | Value | Example |
---|
Required | keystoreType | The type of the keystore, either PKCS12 or JCEKS | <!-- keystore type (PKCS12 or JCEKS) -->
<property name="keystoreType"> <value>PKCS12</value> </property>
| Required | keystoreFile | The path to the keystore. | <!-- keystore filepath -->
<property name="keystoreFile"> <value>/opt/secure/keystore.jks </value> </property>
| Either (recommended) | keystorePassEnvironmentVariable | The name of the environment variable. Use <!-- and --> to comment out the keystorePass property.
Info |
---|
When specifying the value for the password in an environment variable, the value entered should adhere the policy of the environment variables for your operating system. |
| <!-- keystore password -->
<property name="keystorePassEnvironmentVariable"
|
|
> <value>KEY><value>KEY_PASS</value>
</property>
| Or | keystorePass | The password for the keystore. Use <!-- and --> to comment out the keystorePassEnvironmentVariable property. Info |
---|
When specifying the value for the password in the phixflow-secret.xml, special characters will need to be escaped. |
| <!-- keystore password -->
<property name="keystorePass"> <value>storepw</value> </property>
|
Warning |
---|
On startup, PhixFlow checks that there is one password mechanism, either keystorePassEnvironmentVariable or keystorePass . Do not specify both as this will prevent PhixFlow from running. |
|
It is not possible to change the password directly on the keystore file as this corrupts its values. Instead we recommend creating a new keystore file and importing the original values into it.
The process to create a new keystore is:
- Tomcat needs to be stopped.
- Rename your original keystore file e.g.
keystoreOld.jks
. - Use the importkeystore command to import the existing keystore into a a new keystore, at which point you will be prompted for the password for the original keystore and then a new password for the new keystore.
- Give the new keystore the original keystore's name e.g.
keystore.jks.
- Depending on your configuration, you will need to update local.properties, phixFlow-secret.xml or the environment variable, with the new keystore password.
Code Block |
---|
title | Linux |
---|
linenumbers | true |
---|
|
keytool -importkeystore \
-srckeystore keystoreOld.jks -srcstoretype PKCS12 \
-destkeystore keystore.jks -deststoretype PKCS12 |
Code Block |
---|
title | Windows |
---|
linenumbers | true |
---|
|
keytool -importkeystore \
-srckeystore keystoreOld.jks -srcstoretype PKCS12 \
-destkeystore keystore.jks -deststoretype PKCS12 |