Closed nishiichinoe closed 5 years ago
did you figure it out?
It's a while ago, but as far as I remember I had to write the password clear into the property file and at the first startup of the application it got encrypted. After that everything was fine.
Ok, I’m gonna close this issue then. Feel free to reopen or create a new one if you see that again
@nishiichinoe I am having the same issue but am not following how you solved it.
ssl:
key-store: classpath:dev/localhost.jks
key-store-password: ENC(ram5FwW1dJX0n46mF/gMy+Y4fXGPVxMW/u2UkS2P0JwiCbIxU3d1J42hByf6czGU2gdYNZJw9rQ=)
keyStoreType: JKS
keyAlias: localhost
clientAuth: want
trust-store: classpath:dev/localhost.jks
javax:
net:
ssl:
keyStore: src/main/resources/dev/localhost.jks
keyStorePassword: ENC(ram5FwW1dJX0n46mF/gMy+Y4fXGPVxMW/u2UkS2P0JwiCbIxU3d1J42hByf6czGU2gdYNZJw9rQ=)
trustStore: src/main/resources/dev/localhost.jks
keyStoreType: JKS`
key-store-password fails saying it cant bind to a string but the keyStorePassword and other ENC(..) work in the yaml fine.
I started to use Jasypt in spring-boot with the maven dependency:
My spring-boot starter class has these annotations:
I encrypted my password like this:
and added the property like this to my application.properties:
server.ssl.key-store-password: ENC(jasyptEncString)
At start I have this command line argument:
--jasypt.encryptor.password=mySecret
But it is failing with:
_Failed to bind properties under 'server.ssl.key-store-password' to java.lang.String:
Reason: Password is not ASCII_
The password I checked, it contains only ASCII characters.
If I add this argument (which is actually the default):
--jasypt.encryptor.algorithm=PBEWithMD5AndDES
I'm getting:
SecretKeyFactory not available