Followed below steps to encrypt the secret, however facing below issue.
Add the dependency in your parent pom :
com.github.ulisesbocchio jasypt-spring-boot-starter 3.0.3Add also the maven plugin just to encrypt the password(s) (it could be removed once the passwords are generated) :
com.github.ulisesbocchio jasypt-maven-plugin 3.0.3Encrypt your client-secret using the maven plugin :
mvn jasypt:encrypt-value "-Djasypt.encryptor.password=secretKey" "-Djasypt.plugin.value=secret"
Issue:
"Caused by: org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using stronenter code hereg encryption algorithms and you have not installed the Java Cryptography Extension (JCE
) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine".
Resolution:
As the exception indicates one need to install the latest JCE Policy Jar Files into your JAVA setup.
Download the JCE Policy jar files from the below location: (since my java version is 8 I choose javase-jce8-downloads.html, please download correct jce files based on your java version)
https://www.oracle.com/java/technologies/javase-jce8-downloads.html
The zip file would contain two jar files (local_policy.jar and US_export_policy.jar).
These jar files need to be placed under the following location:
%JAVA_HOME%\jre\lib\security\
Reference : https://technofes.blogspot.com/2011/10/orgjasyptexceptionsencryptionoperationn.html