Encrypt MID Server login credentials

The MID Server login credentials appear in the config.xml file in clear text. If access to the MID Server host machine is not secure, store the login credentials in this file in encrypted form.

Before you begin

Role required: admin

About this task

Note: Any field in this file can be encrypted, but once encrypted, a field can be managed only from within the instance. The best practice is to encrypt password fields only (for the MID Server and any proxy server specified).

Procedure

  1. Navigate to the agent directory that was created when the MID Server was installed and open the config.xml file using a text editor such as WordPad.
    The instance credentials section of the config.xml file looks like this:
    <!-- If your instance has authentication enabled (the normal case), set
    these parameters to define the user name and password the MID Server will use
    to log into the instance. --> 
    
    <parameter name="mid.instance.username" value="midsrvadmin" />
    <parameter name="mid.instance.password" value="securepassw0rd"/>
  2. Add the encrypt="true" attribute to the password tag.
    <parameter name="mid.instance.username" value="midsrvadmin" />
    <parameter name="mid.instance.password" encrypt="true" value="securepassw0rd"/>
  3. Save the config.xml file, and then restart the MID Server service.
    The password is now encrypted.
    <parameter name="mid.instance.username" value="midsrvadmin" />
    <parameter name="mid.instance.password" encrypt="true" value="encrypted:rhrfUNYRzZAI8/BkTtZmNA=="/>

Result

The password cannot be decrypted (or displayed in clear text again) by changing the encryption attribute to false or by deleting the attribute. If the password is changed in the config.xml file and the MID Server restarted, the new password is encrypted.