Verify Group Who Owns /etc/chrony.keys File
An XCCDF Rule
Description
To properly set the group owner of /etc/chrony.keys
, run the command:
$ sudo chgrp chrony /etc/chrony.keys
Rationale
The ownership of the /etc/chrony.keys file by the chrony group is important because this file hosts chrony cryptographic keys. Protection of this file is critical for system security. Assigning the ownership to chrony ensures exclusive control of the chrony cryptography keys.
- ID
- xccdf_org.ssgproject.content_rule_file_groupowner_etc_chrony_keys
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- configure_strategy
- file_groupowner_etc_chrony_keys
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel-default; then
chgrp chrony /etc/chrony.keys
else