Closed jefferyyuan closed 7 years ago
While true, caching sensitive passwords or whatever your keeping encrypted is a security vulnerability. Ideally you'll request the property once and dispose it. If you want to cache them yourself you can simply override the StringEncryptor
bean with a decorator one that wraps a real one and does the caching.
I am not sure but seems to me that decrypt is expensive. So it would be great if jasypt-spring-boot can cache the already decrypted value in DefaultPropertyResolver.
https://github.com/ulisesbocchio/jasypt-spring-boot/blob/master/jasypt-spring-boot/src/main/java/com/ulisesbocchio/jasyptspringboot/resolver/DefaultPropertyResolver.java
com.ulisesbocchio.jasyptspringboot.resolver.DefaultPropertyResolver.resolvePropertyValue(String)