Encrypting the password in the properties file

To enhance security and safeguard sensitive information, encrypt the password stored in the properties file to add a layer of protection to the data.

About this task

To encrypt passwords in the properties file, complete the following steps:

Procedure

  1. In the Link installation directory, locate the encrypt_password.sh script.
  2. Open the properties file and use the following syntax to encrypt the password:
    <Field Name>=plain:<TEXT/PASSWORD>
    Note: For the strings to be encrypted, add the prefix plain:.

    Example:

    password=plain:password
  3. Run the encryption script ./encrypt_password.sh <Properties File Path>.
    Note: Replace <Properties File Path> with the absolute path to the properties file you want to encrypt the password in.

    For example, if the properties file is available at /opt/hipmodules/journey.properties, the command would be as follows:

    ./encrypt_password.sh /opt/hipmodules/journey.properties
  4. After executing the script, open the properties file. You will see that the encrypted string, or text, has the prefix encrypted. For example:
    password=encrypted<Encrypted Sting>
  5. Restart Link.