Basically, as the title says, when using JDBC backend on the config server, how can I encrypt the datasource password?
The simplest way seems to be using encrypt.key
for symmetric key encryption/decryption but it will be included in the source code.
For asymmetric key encryption/decryption, seems that RSA key can be used.
However, if I use other mechanism, for example the key is in a key vault, how can I extend Spring and implement it myself?
If it is something impossible today, please treat this as a feature request. Thank you.
Comment From: blackr1234
I figured it out.
Instead of using {cipher}
, I can have my own DataSourceProperties
bean that takes username and password from other sources.