Common Keystore

Common Keystore

Version 4.4.0 introduces a new keystore that is auto-generated on first startup of the application. This keystore is located in
/profiles/default/interformng2_keystore.p12
Currently, the following is stored in this keystore:
  1. Signing keys for the built-in authentication. These keys are used in the creation and validation of access tokens.
  2. Encryption key for the core databases.
  3. Access password for the core databases.
The keystore has a password, which is a concatenation of the environment variable interformng2.privateKey and the property ng2.keystore.password that is set in application-default.properties. I.e., if interformng2.privateKey is "abc" and ng2.keystore.password is "def," then the password for the keystore is "abcdef".

On Linux and IBM i, dots can cause problems in environment variable names. On these platforms the variable is named INTERFORMNG2_PRIVATEKEY instead of interformng2.privateKey. See Installing InterformNG2 on Linux for how to set it.

If any of those values are changed, the keystore password must also be changed using the Java keytool.

Note that if ng2.keystore.password has not been set in application-default.properties then this password will be auto-generated and stored in the file profiles/default/ng2_keystore_password.txt. For optimal security, it is highly recommended to copy the value from this file and put it in application-default.properties instead as:
ng2.keystore.password=FILE_CONTENT. Once that is done, the ng2_keystore_password.txt file should be deleted.

When the built-in authentication method is used on multi-server configurations, it is important that this keystore is duplicated to all servers, i.e. take the keystore from one server and copy it to the other servers. The value of interformng2.privateKey (INTERFORMNG2_PRIVATEKEY on Linux and IBM i) and ng2.keystore.password must also be copied to all the other servers.

It is important that customers keep a backup copy of the interformng2.privateKey (INTERFORMNG2_PRIVATEKEY on Linux and IBM i) environment variable value, so this can be restored if for instance InterformNG2 is re-installed on a different machine.