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>

...

Where:Is

<keytool>

Windows command prompt"%JAVA_HOME%\bin\keytool.exe"
Windows PowerShell &"$env:JAVA_HOME\bin\keytool.exe"
Linux  $JAVA_HOME/bin/keytool 

<keyAlias> 

The alias for a username or password.

The phixflow-secret.xml configuration file refers to the <keyAlias> so that PhixFlow knows which encrypted secret to retrieve from the keystore.

After you enter an alias, the keytool The keytool prompts you to enter the corresponding username or password. This is the actual value that the database requires to permit access.

<pathToKeystoreFile>

The full path to the keystore file, for example:

  • Windows - C:\secure\name.jks
  • Linux - /opt/secure/name.jks
<keytype>either PKCS12 or JCEKS.
dfd


Tip

The command's prompts are not very clear. It sometimes asks keytool does not differentiate between the secrets it stores. It always prompts for a password when , but you may need to enter a username. The following instructions state what information you need to enter.


How to Set up a Keystore

Step 1  Create the keystore and the alias for the database username

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

...

Code Block
"%JAVA_HOME%\bin\keytool" -importpass -alias pbdevphixflow-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, enter the actual username for the PhixFlow database. 

...

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

...

2.3 When prompted enter the actual password for the PhixFlow database.

...


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-Dev

P*59word
Alias

pdbdevphixflow-database-user

123xyz