官术网_书友最值得收藏!

  • Learning Puppet Security
  • Jason Slagle
  • 422字
  • 2021-07-23 19:49:41

The audit meta-parameter

The audit meta-parameter is the primary change tracking method currently in Puppet. It was introduced in Puppet 2.6, and it provides a way to monitor a resource without enforcing a state on it.

With the introduction of Puppet Enterprise 1.2, Puppet Enterprise gained a compliance dashboard that allowed you to configure and track file changes. This dashboard has since been removed, but it relied heavily on the audit meta-parameter and allowed you to quickly set up auditing.

The audit meta-parameter is a bit of a divergence in the Puppet world. The declarative nature of Puppet is to model the desired state of a resource and allow Puppet to get it there. The audit meta-parameter can allow you to say that you may not care about the state of an item, but you want to know if it changes.

How it works

The audit system works by keeping track of the state of the attributes you monitor. At the end of every run, it persists the state of those objects.

If at the start of a run Puppet notices that the current state of an object changes, it raises an alert. Additionally, information on these changes is reported back to the master as part of any reports. This report data can be used to generate logs of changes to attributes.

Internally, Puppet implements auditing by persisting the state of the audited objects to a YAML file. This data is stored on each of the agent nodes, and not on the master server. On each Puppet run, YAML is read and the state in the file is compared to the existing state.

Tip

What is YAML?

YAML is a markup language. Originally, it was called "Yet another markup language". It is now known as "YAML Ain't Markup Language". YAML is a way to store data in a file similar to formats such as JSON. Puppet stores much of its internal data in the YAML format, and as we approach reporting and other processing of Puppet data, we will need to parse and create YAML files.

What can be audited

Being a meta-parameter, audit can be applied to any resource. The code to handle the audit meta-parameter is present in the Puppet core. In theory, any attribute on any resource should be permitted to be audited, but there are likely cases that are untested and do not work well.

Files, users, and packages are the most common use cases for auditing since they tend to be the resources that are critical security-wise.

主站蜘蛛池模板: 外汇| 明星| 明星| 南川市| 白银市| 神农架林区| 和硕县| 京山县| 平乡县| 江陵县| 卫辉市| 卓资县| 南澳县| 珠海市| 通城县| 乌审旗| 乌什县| 南平市| 社会| 固安县| 康定县| 历史| 汽车| 林周县| 泰和县| 监利县| 义乌市| 将乐县| 诏安县| 平度市| 台江县| 吉木乃县| 清徐县| 盐山县| 黄大仙区| 清丰县| 平舆县| 漯河市| 嫩江县| 肇东市| 中西区|