Verify Permissions On /etc/chrony.keys File
An XCCDF Rule
Description
To properly set the permissions of /etc/chrony.keys
, run the command:
$ sudo chmod 0640 /etc/chrony.keys
Rationale
Setting correct permissions on the /etc/chrony.keys file is important because this file hosts chrony cryptographic keys. Protection of this file is critical for system security. Assigning the correct mode ensures exclusive control of the chrony cryptographic keys.
- ID
- xccdf_org.ssgproject.content_rule_file_permissions_etc_chrony_keys
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-86383-7
- configure_strategy
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
chmod u-xs,g-xws,o-xwrt /etc/chrony.keys
else