Hashicorp Vault:写入秘密文件然后再次读取?
我们需要将Java密钥库文件存储在Hashicorp Vault中。我能够用命令像以下命令一样编写文件:
vault write -address ${VAULT_ADDR} ${SECRET_PATH} [email protected]
它运行良好,我收到了一条成功的消息。我也能够在该路径上列出凭据,并看到它是编写的。但是,如何作为Java密钥库文件恢复值? 保险库读取
命令似乎仅输出yaml或json。 JSON文件中的值似乎不是基本64编码。我该如何使其输出原始二进制值,以便可以将其读取为Java密钥库?
We have a need to store a Java KeyStore file in Hashicorp Vault. I was able to write the file just fine with a command something like:
vault write -address ${VAULT_ADDR} ${SECRET_PATH} [email protected]
It worked fine, and I got a success message. I'm also able to list the credentials at that path and see that it was written. However, how do I get the value back out as a Java Keystore file? The vault read
command seems to output yaml or JSON only. The value in the JSON file does not seem to be base-64 encoded. How do I get it to output the raw binary value so I can read it as a Java KeyStore?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的密钥库是二进制格式...可能存在编码问题。请尝试以下操作:
然后使用“但是 a Java 密钥库已加密...”取回它
... 为什么不使用 Vautl 进行密码管理?完美的用例:
Your keystore is in binary format... There might an encoding issue. Try this instead:
And get it back with
But a Java keystore is already encrypted... Why don't you use Vautl for password management? Perfect use case for this: