ThingWorx Flow > Installation and Configuration > Configuring ThingWorx Flow > Updating the ThingWorx Flow Database Administrator Password
Updating the ThingWorx Flow Database Administrator Password
After updating the password of the ThingWorx Flow database administrator, you must update the same password in ThingWorx Flow. To do so, complete the following steps:
1. Start Command Prompt as Administrator on the machine where you installed ThingWorx Flow, and run the following commands to obtain the value of the secret parameter:
a. pm2 ls
Make note of the value of the ID of any ThingWorx Flow service.
b. pm2 env <ID>
, where <ID> is the ID of any ThingWorx Flow service. For example: the ID of the flow-api service.
c. Copy the value of the CONFIG_IMAGE variable. This is the value of the secret parameter that you need to provide in step 3 and step 7.
The value of the secret parameter is used to decrypt the TrustStore.
2. Run the following commands:
a. cd <ThingWorx Flow Installation Directory>\cryptography\tw-security-common-nodejs
b. Windows: npm link
Linux: sudo npm link
3. Run the following command to decrypt the encrypted keys file:
node dist\PtcOrchKeyFileTool.js --secret <CONFIG_IMAGE value> --keyfile-location <ThingWorx Flow Installation Directory>\misc\keyfile-key --plaintext <ThingWorx Flow Installation Directory>\cryptography\keys.json --encrypted <ThingWorx Flow Installation Directory>\cryptography\keys.enc decrypt
This command creates a new, decrypted keys.json file under the <ThingWorx Flow Installation Directory>\cryptography\ folder.
4. In the keys.json file, modify the MODEL_DB.connection.password parameter with the updated ThingWorx Flow database administrator password.
5. Make a backup of the <ThingWorx Flow Installation Directory>\cryptography\keys.enc file.
6. Delete the <ThingWorx Flow Installation Directory>\cryptography\keys.enc file.
7. Run the following command to create the new encrypted keys.enc file:
node dist\PtcOrchKeyFileTool.js --secret <CONFIG_IMAGE value> --keyfile-location <ThingWorx Flow Installation Directory>\misc\keyfile-key --plaintext <ThingWorx Flow Installation Directory>\cryptography\keys.json --encrypted <ThingWorx Flow Installation Directory>\cryptography\keys.enc encrypt
This command creates the encrypted keys.enc file under the <ThingWorx Flow Installation Directory>\cryptography\ folder.
8. Delete the decrypted keys.json file.
9. Restart ThingWorx Flow services.
Was this helpful?