Vault is correctly able to lookup the value, and return the char[] representation of this vault path.
However, when the configuration properties bean binding occurs, this value is incorrectly set on the corresponding configuration POJO. (See the org.springframework.boot.autoconfigure.web.ServerProperties for more details.)
The main reason being, is that the keyStorePassword field on the org.springframework.boot.context.embedded.Ssl class is a String not a char[], and there is no relevant org.springframework.core.convert.converter.Converter registered to handle this so the default fallback is to call .toString() on the object in question.
TL;DR - Register a converter from
char[]
toString
Given config that looks something like:
Vault is correctly able to lookup the value, and return the
char[]
representation of this vault path.However, when the configuration properties bean binding occurs, this value is incorrectly set on the corresponding configuration POJO. (See the
org.springframework.boot.autoconfigure.web.ServerProperties
for more details.)The main reason being, is that the
keyStorePassword
field on theorg.springframework.boot.context.embedded.Ssl
class is aString
not achar[]
, and there is no relevantorg.springframework.core.convert.converter.Converter
registered to handle this so the default fallback is to call.toString()
on the object in question.