Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

To keep the database username and password secure, PhixFlow is configured to use a keystore file. The database account credentials are encrypted and stored here, along with aliases. You can then use the aliases to retrieve each secret username and password from the keystore.

To configure the keystore, you will use the Java keytool -importpass command at the command line.

Keytool Syntax

For reference, here is the full syntax and the values you will need to use. The steps below provide example commands.

Code Block
<keytool> -importpass -alias <keyAlias> -keystore <pathToKeystoreFile> -storetype <keytype>

...

1.1 Run the -importpass command. In <keyAlias> specify the alias username for the PhixFlow database (, for example phixflow-database-user in the following examples).

Windows:

Code Block
"%JAVA_HOME%\bin\keytool" -importpass -alias phixflow-database-user -keystore C:\secure\hidden.jks -storetype PKCS12

...

1.2 When prompted, enter a password for the keystore file, then re-enter to confirm it.

1.3 When prompted for the password or secret to be stored, enter the actual username for the PhixFlow database, for example phixflow

Step 2  Add the database password and alias to the keystore file

2.1.  Repeat the -importpass command. In <keyAlias> specify the alias password for the PhixFlow database (123xyz in the following examples)database, for example phixflow-database-password.

Windows:

Code Block
"%JAVA_HOME%\bin\keytool" -importpass -alias 123xyzphixflow-database-password -keystore C:\secure\hidden.jks -storetype PKCS12

...

Code Block
$JAVA_HOME/bin/keytool -importpass -alias 123xyzphixflow-database-password -keystore C:\secure\hidden.jks -storetype PKCS12

2.2  When prompted, enter the password for the keystore file. This is the same password you assigned to the keystore in step 1.2. This time the password opens the keystore.

2.3 When prompted for the password or secret to be stored, enter the actual password for the PhixFlow database.

...

Code Block
<property name="username">
	<value>pdbdev<<value>phixflow-database-user</value>
</property>
<property name="password">
	<value>123xyz<<value>phixflow-database-password</value>
</property>

Step 4  Set the Environment Variable

...


Details used in the diagram
Keystore file namehidden.jks
Keystore passwordstorepw
Environment variable nameKEY_PASS
Environment variable value
(the keystore password)
storepw
PhixFlow database credentialsUsernamePassword
Actual

PhixFlow-DB-DevphixFlow

P*59word
Alias

phixflow-database-user

123xyz


...