Documentation Center

Encrypting sensitive strings

Use the SDL Web command line tool to encrypt the <password> fields (for Index Server and Query Server) in the smarttarget_conf.xml configuration file.

About this task

It is best practice to encrypt sensitive data such as passwords in your configuration files.

Procedure

  1. On the Content Delivery server, open a command prompt.
  2. Navigate to the directory that contains the file cd_core.jar. By default, this file is located in your Content Delivery root location.
  3. Enter the following command, where mysensitivestring is the string you want to encrypt:
    java -cp cd_core.jar com.tridion.crypto.Encrypt mysensitivestring

    You can redirect the output to a file for easy copy-pasting of the response.

    The encryption responds, for example, as follows:

    SDL Web configuration value = encrypted:56StnjmsTNnHdITMkL4KYw==
  4. Open the smarttarget_conf.xml configuration file.

    The file is used in several locations in your installation: Where to find smarttarget_conf.xml

  5. Paste the value in the relevant <password> field, for example:
    <Password>encrypted:56StnjmsTNnHdITMkL4KYw==</Password>

Results

When Content Delivery loads the configuration file, it decrypts the encryption string back to its original value.