Open alex-kovalenko1982 opened 2 months ago
We can certainly consider adding such support.
Alternatively, it should be easy to provide your own secret key handler with the desired settings: https://smallrye.io/smallrye-config/3.9.1/config/secret-keys/
https://github.com/smallrye/smallrye-config/blob/b39e11207cbc9ede976065395c9f2bb7b89031b9/utils/jasypt/src/main/java/io/smallrye/config/jasypt/JasyptSecretKeysHandler.java#L16
At the moment, jasypt encryptor is fixed to
new RandomIvGenerator()
. Would be great to have an option to choose IvGenerator class when creating the encryptor. At least amongRandomIvGenerator
(default) andNoIvGenerator
(optionally changed in the config).Suggestion for a new property:
smallrye.config.secret-handler.jasypt.iv-generator.enabled
Default value:true
When nothing is set then the legacy behavior is in action:
encryptor.setIvGenerator(new RandomIvGenerator());
and in case when new property set tofalse
then the line above replaced with:encryptor.setIvGenerator(new NoIvGenerator());