This article reviews the steps to encrypt the Identity Server (IDS) database connection configuration file (data.properties). This encryption feature is available starting with IDS version 2.17.0.
Note: Encrypting database connection configuration is only supported for Windows installations.
Create a System Environment Variable
Create a System Environment Variable named IDS_DATA_PROPERTIES set the value to a decryption key of your choosing.
Generate the encrypted configuration value
Open a command prompt to the IDS installation directory (default location is: C:\identity-server).
Run the encrypt-property.cmd command with the following parameters:
-i <value to be encrypted>
-p <decryption key value set in system environment variable>
Example usage to encrypt the value "identity" using the decryption key "example-key-value"
C:\identity-server> encrypt-property.cmd -i "identity" -p "example-key-value"
ENC(55OaKJSQbsLXq6rd4kDNOVX6VtaBFHUg)
Configure the database connection
Update the value of data.jdbc.password in the data.properties file with the output from the encrypt-property command.
data.jdbc.url=jdbc\:postgresql\://localhost/identity
data.jdbc.driverClass=org.postgresql.Driver
data.path=./data
data.jdbc.password=ENC(55OaKJSQbsLXq6rd4kDNOVX6VtaBFHUg)
data.jdbc.user=identity
Restart Identity Server
IDS must be restarted for these changes to take effect. Open Services, locate "PI Identity Server" and click Restart. After the service has finished restarting, attempt to log in to IDS to confirm the changes were applied properly.