Spring Boot Cloud配置加密密钥库密码 [英] Spring boot cloud config encrypt keystore password
问题描述
该问题肯定是已知的.但是我找不到任何解决方案.我正在使用Spring Boot Cloud配置服务器通过{cipher}表达式提供所有属性值(加密).它使用位于同一系统中的密钥库.但是,密钥库的密码为纯文本格式.问题是,是否有可能如何加密密钥库密码?
The issue is for sure known. But i cannot find any solution. I'm using spring boot cloud config server to serve all properties values (encrypted) by {cipher} expression. It uses keystore located in the same system. But password to the keystore is in plain text. The question is there a possibility to some how encrypt the keystore password?
提前谢谢!
推荐答案
加密密钥库密码将需要配置用于解密的密钥,该密钥本身必须未加密存储,因此没有用.
Encrypting the keystore password would require configuring a key for decryption which itself would have to be stored unencrypted, so there's no use in that.
我认为最好的方法是将密钥库密码设置为环境变量(如这个 SO问题).
I think the best way would be setting the keystore password as an environment variable (as described in this post or this SO question).
这篇关于Spring Boot Cloud配置加密密钥库密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!