如何允许食谱在 Chef OpenSource 12.x 中编辑数据包?
How do I allow recipes to edit data bags in Chef OpenSource 12.x?
正在设置 icinga2 chef cookbook for my own personal use (specifically around the pki-tickets generation for the icinga2 remote API,) I have spent a lot of time looking for a way to enable admin on a client, as the data bag documentation requires。
Altering data bags from the node when using the open source Chef
server requires the node’s API client to be granted admin privileges.
In most cases, this is not advisable.
但是,当我通过 knife client edit
编辑 json 时,我无法设置管理客户端。我编辑 json,更改 "admin": true
并保存。 knife 报告它已更新,但 knife client show
显示 admin 仍然是错误的。此外,我在 knife client documentation 中发现了相互矛盾的信息。
关于创建客户端的 -a --admin
选项:
This option only works when used with the open source Chef server and
will have no effect when used with Enterprise Chef or Chef server
12.x.
如何启用食谱中的 edit/creation 个条目,共 databags/databag 个条目?
您将使用 Chef Server ACL 系统:https://docs.chef.io/auth.html#authorization
您可以通过管理网络 UI 或 knife-acl
CLI 编辑它们。
在继续之前,请注意此方法的安全后果和一般复杂性。
正在设置 icinga2 chef cookbook for my own personal use (specifically around the pki-tickets generation for the icinga2 remote API,) I have spent a lot of time looking for a way to enable admin on a client, as the data bag documentation requires。
Altering data bags from the node when using the open source Chef server requires the node’s API client to be granted admin privileges. In most cases, this is not advisable.
但是,当我通过 knife client edit
编辑 json 时,我无法设置管理客户端。我编辑 json,更改 "admin": true
并保存。 knife 报告它已更新,但 knife client show
显示 admin 仍然是错误的。此外,我在 knife client documentation 中发现了相互矛盾的信息。
关于创建客户端的 -a --admin
选项:
This option only works when used with the open source Chef server and will have no effect when used with Enterprise Chef or Chef server 12.x.
如何启用食谱中的 edit/creation 个条目,共 databags/databag 个条目?
您将使用 Chef Server ACL 系统:https://docs.chef.io/auth.html#authorization
您可以通过管理网络 UI 或 knife-acl
CLI 编辑它们。
在继续之前,请注意此方法的安全后果和一般复杂性。