New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jasypt not decrypting already encrypted property (i.e in application.properties file) in xml based configuration spring boot project #378
Comments
do you now have any soluations? |
In my case,i can decryptie xml config in some linux machine, while use the same jar, in other linux machine can not decryptie xml config. the xml config is a datasource config.The log prints |
I have written custom jasypt encryptor in my application, i have used this for decrypting @configuration |
@ulisesbocchio
I have two spring boot projects, one uses java based configuration and other uses XML based configuration.
We have a new requirement of encrypting properties present in application.properties file.
So, we have tried using jasypt-spring-boot-starter (v3.0.5) and jasypt-maven-plugin (v3.0.5) in both the projects for encryption/decryption.
Encryption is done using mvn plugin command
mvn jasypt:encrypt "-Djasypt.encryptor.password=pvt-key" "-Djasypt.plugin.path=file:src/main/resources/application.properties"
Property file after encryption
spring.db.password=ENC(encrypted-password)
Decryption
For decrypting above property, we used @value annotation provided by spring
@value("${spring.db.password}")
DECRYPTION is working as expected in project where java based configurations are used.
*But in XML based Configuration project, I am getting ENCRYPTED VALUES only, without any Decryption. [FYI, Even after adding context:annotation-config/ and context:property-placeholder/ in respective XML file]
Spring boot versions used:
For Java based Configuration Project: v2.4.0
For XML based Configuration Project: v2.1.4
Please help
The text was updated successfully, but these errors were encountered: