在没有私钥的情况下使用“eyaml edit”加密属性?

在没有私钥的情况下使用“eyaml edit”加密属性?

我想使用eyaml 编辑编辑我的 Puppet/Hiera 配置文件。我的配置文件是加密和纯文本内容的混合。我想使用eyaml 编辑加密某些属性。因此,最初我的文件将包含以下内容:

DEC::PKCS7[securepassword]!

我知道当我通过以下方式保存它们时eyaml 编辑这些属性将被加密。

我有 Puppet Enterprise Server 使用的公钥,但我无权访问私钥(出于安全原因)。

我还能使用吗eyaml 编辑没有私钥?

我只想用它来加密属性。

我知道我可以调用eyaml 加密没有私钥,但我不想单独加密每个属性,而且我不需要加密整个文件。

答案1

无需私钥即可使用“eyaml edit”的功能添加在 GitHub 的主分支中。

这就是我现在的使用方式。

首先配置 eyaml,以便它知道你的公钥在哪里(按照使用 hiera eyaml 加密你的数据)。

~/.eyaml/config.yaml

---
pkcs7_public_key: ‘/Users/myuser/keys/eyaml/public_key.pkcs7.pem’

然后使用 specific_install gem 安装 eyaml 的主分支版本。

gem install specific_install
gem specific_install -l https://github.com/voxpupuli/hiera-eyaml

现在你应该能够编辑你的 eyaml 文件,以便加密有效,但不会尝试使用(-d或者--无解密标志)例如

eyaml edit -d test.eyaml

相关内容