Skip to main content

Use the encrypted properties editor

Contrast includes several configuration files in the $CONTRAST_HOME/data/conf directory. By default, Contrast encrypts the configuration files for security, but you can modify some of these files through workflows in Contrast.

For example, these are some of the encrypted properties files for on-premises installations:



Settings to connect and configure Contrast to authenticate Active Directory groups.

Settings to connect and configure Contrast to authenticate LDAP groups.

Host and connection settings for communication between Contrast and MySQL.

SAML keystore security settings.

Contrast also includes an editing tool to decrypt these files and assist with configuration. This is helpful when you are running Contrast and need to get values from encrypted properties files outside of the application or automatically update a property in the files, such as automatic password rotation.

To edit encrypted properties files:

  1. Find the decryption tool in the $CONTRAST_HOME/bin directory.

    • Linux: the file is a shell script called edit-properties.

    • Windows: the file is a Windows command file called edit-properties.exe.

  2. Run the tool from a command prompt. This opens an application that allows you to update the value of an encrypted property:

    $CONTRAST_HOME/bin/edit-properties -e $CONTRAST_HOME/data/esapi -f $CONTRAST_HOME/data/conf/
  3. You must provide input details to view or edit encrypted properties files. The basic inputs you need are:

    • The path to

    • The target properties file to edit.

    To find this information for the encrypted properties editor, execute edit-properties with no arguments:

    contrast@EOP-TeamServer:~/contrast/bin$ ./edit-properties 
    usage: property-editor
     -c,--comment <text>      The comment for the top of the file
     -e,--esapi <path>        The path to the file
     -f,--targetFile <file>   The properties file to edit
     -o,--print-value         Print out the value of the property and exit
     -p,--property <name>     The name of the property to set
     -v,--value <val>         The value of the property
  4. This example shows you how to edit an encrypted file. Provide the path to and the target properties file to edit. You will see the existing values encrypted in the file that you can edit. The usage options above allow you to view or edit a single property.

    contrast@TeamServer:~/contrast/bin$ ./edit-properties -e ../data/esapi/ -f ../data/conf/
    ad.userDn                                         : cn=Directory Manager                        : mail
    ad.password                                       : NotaRealPassword
    ad.nested.groups.enabled                          : false                                    : cn=ContrastUsers,cn=Users,dc=contrastsecurity,dc=com                                    : cn=ContrastAdmins,cn=Users,dc=contrastsecurity,dc=com
    ad.url                                            : ldap://localhost:389
    ad.base                                           : dc=contrastsecurity,dc=com
  5. You can also retrieve or update unencrypted values for a property. To retrieve values, pass another parameter to the properties editor. In this example, the user is looking for details about database properties:

    $CONTRAST_HOME/bin/edit-properties \
       -e $CONTRAST_HOME/data/esapi \
       -f $CONTRAST_HOME/data/conf/ \
       -p jdbc.username \

    To update unencrypted values, pass a different set of arguments to the properties editor:

    $CONTRAST_HOME/bin/edit-properties \
       -e $CONTRAST_HOME/data/esapi \
       -f $CONTRAST_HOME/data/conf/ \
       -p jdbc.username \
       -v joe.user \
       -c "Updating JDBC Password"


Add comments to indicate edits to encrypted properties files. This is useful for auditors or others who need to track configuration changes.