How To Manually Encrypt Clear Text Password Using OL Spring Property Encryption

From version 4.2.4 we introduced new functionality, Clear Text Password Encryption. With this, when you create a new SDK project and enter passwords through the wizard, the automatic file generator will encrypt the pass using the encryption key that you are using. Note that if you didn't define a key, then the default one is changeme. The encrypted passwords will be saved to the application.yml. 

In some cases, we might have to migrate projects between earlier versions that don't have this ability or the password needs to be updated. To save it encrypted, the password must be encrypted manually.

How To Encrypt a Password (Windows)

  1. Download the attached zip ol-spring-property-encryption-cli.zip and extract it.

  2. Open CMD.

  3. cd to ./bin folder.

  4. Run:

    ol-spring-property-encryption-cli.bat encrypt --key [encryption-key] --value [value-to-encrypt]

 


Example commands:

ol-spring-property-encryption-cli.bat encrypt --key changeme --value foo

Result:

'{cipher}c9e1881ae54c542b07b20b0d65a1de88aba2b1e8ba2fdd9b87fde826b2423311'

 


 

Result:

 

 

When using Powershell you need to add cmd.exe /c before the command e.g: cmd.exe /c ol-spring-property-encryption-cli.bat encrypt --key changeme --value foo