Introduction
The Encrypted Password Utility module enhances the encrypt.password module by using a dedicated key and password storage directory. This module is designed to centralize management of encrypted configuration credentials in one place — rather than having to edit translator code for credentials in individual Production channels.
We recommend using this module to manage all encrypted passwords in development, test and production environments. This means that when you migrate a channel between environments you can simply update credentials by editing this module.
Using the Code [top]
- Import the Encrypted Password Utility channel from the Interfaceware Support repository.
- Go to the To Translator -> shared > password > configs.lua module and define the following configurations:
- Go to To Translator -> main.lua to save the encrypted passwords:
- After saving the passwords you should comment out lines 10 &11 (the save commands).
- Then delete the real password you saved from the code (for security).
- The code should look something like this:
This is the github code for the main module:
How it works [top]
The password.util module overwrites the save and load functions from encrypt password in file module by using a dedicated key, and a file directory for storing all encrypted password files. This approach simplifies the process of creating and managing encrypted passwords in channel translator code.
We recommend using this module to manage all encrypted passwords in development, test and production environments. This means that when you migrate a channel between environments you simply need to update credentials by editing this module.
More information [top]
- Source code for the main module on github
- Source code for the util.lua module on github
- Encrypt Password in File