2022-01-07 09:06:18 +00:00
---
# defaults file for rhel9-cis
2023-12-05 21:01:06 +02:00
# WARNING:
# These values may be overriden by other vars-setting options(e.g. like the below 'container_vars_file'), as explained here:
# https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable
2022-01-07 09:06:18 +00:00
2023-12-05 21:01:06 +02:00
## Usage on containerized images
# The role discovers dynamically (in tasks/main.yml) whether it
# is executed on a container image and sets the variable
# system_is_container the true. Otherwise, the default value
# 'false' is left unchanged.
2022-02-02 11:25:03 +00:00
system_is_container : false
2023-12-05 21:01:06 +02:00
# The filename of the existing yml file in role's 'vars/' sub-directory
# to be used for managing the role-behavior when a container was detected:
# (de)activating rules or for other tasks(e.g. disabling Selinux or a specific
# firewall-type).
2022-02-02 11:25:03 +00:00
container_vars_file : is_container.yml
2022-01-07 09:06:18 +00:00
# rhel9cis is left off the front of this var for consistency in testing pipeline
# system_is_ec2 toggle will disable tasks that fail on Amazon EC2 instances. Set true to skip and false to run tasks
system_is_ec2 : false
2022-02-02 11:25:03 +00:00
# Run the OS validation check
2023-08-10 13:55:18 +01:00
# Supported OSs will not need for this to be changed - see README e.g. CentOS
2022-02-02 11:25:03 +00:00
os_check : true
2023-11-29 15:50:23 +00:00
## Switching on/off specific baseline sections
# These variables govern whether the tasks of a particular section are to be executed when running the role.
# E.g: If you want to execute the tasks of Section 1 you should set the "_section1" variable to true.
2023-12-05 21:01:06 +02:00
# If you do not want the tasks from that section to get executed you simply set the variable to "false".
2022-01-07 09:06:18 +00:00
rhel9cis_section1 : true
rhel9cis_section2 : true
rhel9cis_section3 : true
rhel9cis_section4 : true
rhel9cis_section5 : true
rhel9cis_section6 : true
2022-04-04 12:07:07 +01:00
# This is used for audit purposes to run only specifc level use the tags
# e.g.
# - level1-server
# - level2-workstation
2023-11-29 15:50:23 +00:00
# Used for audit
2022-01-07 09:06:18 +00:00
rhel9cis_level_1 : true
rhel9cis_level_2 : true
2023-12-05 21:01:06 +02:00
## 1.6 SubSection - Mandatory Access Control
2023-12-06 22:20:32 +02:00
# This variable governs whether SELinux is disabled or not. If SELinux is NOT DISABLED by setting
2023-12-05 21:01:06 +02:00
# 'rhel9cis_selinux_disable' to 'true', the 1.6 subsection will be executed.
2022-01-07 09:06:18 +00:00
rhel9cis_selinux_disable : false
2023-12-05 21:01:06 +02:00
# This variable is used in a preliminary task, handling grub2 paths either in case of
# UEFI boot('/etc/grub2-efi.cfg') or in case of BIOS legacy-boot('/etc/grub2.cfg').
2022-01-07 09:06:18 +00:00
rhel9cis_legacy_boot : false
## Python Binary
## This is used for python3 Installations where python2 OS modules are used in ansible
python2_bin : /bin/python2.7
## Benchmark name used by audting control role
# The audit variable found at the base
2023-02-20 14:02:49 +00:00
## metadata for Audit benchmark
benchmark_version : 'v1.0.0'
2022-01-07 09:06:18 +00:00
benchmark : RHEL9-CIS
2023-11-29 15:50:23 +00:00
# Whether to skip the system reboot before audit
# System will reboot if false, can give better audit results
2022-02-02 11:25:03 +00:00
skip_reboot : true
2022-01-07 09:06:18 +00:00
2022-04-01 15:26:13 +01:00
# default value will change to true but wont reboot if not enabled but will error
change_requires_reboot : false
2023-11-21 09:48:49 +00:00
##########################################
### Goss is required on the remote host ###
## Refer to vars/auditd.yml for any other settings ##
2023-11-29 15:50:23 +00:00
#### Basic external goss audit enablement settings ####
#### Precise details - per setting can be found at the bottom of this file ####
2022-01-07 09:06:18 +00:00
2023-11-29 15:50:23 +00:00
## Audit setup
# Audits are carried out using Goss. This variable
# determines whether execution of the role prepares for auditing
# by installing the required binary.
2022-01-07 09:06:18 +00:00
setup_audit : false
2023-11-21 09:48:49 +00:00
2023-12-05 21:01:06 +02:00
## Enable audits to run - this runs the audit and get the latest content
2023-11-29 15:50:23 +00:00
# This variable governs whether the audit using the
# separately maintained audit role using Goss
# is carried out.
2023-11-21 09:48:49 +00:00
run_audit : false
# Only run Audit do not remediate
audit_only : false
2023-12-05 21:01:06 +02:00
# This will enable files to be copied back to control node(part of audit_only)
2023-11-21 09:48:49 +00:00
fetch_audit_files : false
2023-12-05 21:01:06 +02:00
# Path to copy the files to will create dir structure(part of audit_only)
2023-11-21 09:48:49 +00:00
audit_capture_files_dir : /some/location to copy to on control node
2023-12-05 21:01:06 +02:00
## How to retrieve audit binary(Goss)
# Options are 'copy' or 'download' - detailed settings at the bottom of this file
# - if 'copy':
# - the filepath mentioned via the below 'audit_bin_copy_location' var will be used to access already downloaded Goss
# - if 'download':
# - the GitHub Goss-releases URL will be used for a fresh-download, via 'audit_bin_url' and 'audit_pkg_arch_name' vars
2023-07-28 15:16:50 +01:00
get_audit_binary_method : download
2022-01-07 09:06:18 +00:00
2023-12-05 21:01:06 +02:00
## if get_audit_binary_method is 'copy', the following var needs to be updated for your environment
2023-11-21 09:48:49 +00:00
## it is expected that it will be copied from somewhere accessible to the control node
## e.g copy from ansible control node to remote host
audit_bin_copy_location : /some/accessible/path
2023-11-29 15:50:23 +00:00
## How to retrieve the audit role
# The role for auditing is maintained separately.
# This variable specifies the method of how to get the audit role
2023-11-21 09:48:49 +00:00
# options are git/copy/get_url other e.g. if you wish to run from already downloaded conf
2023-11-29 15:50:23 +00:00
# onto the system. The options are as follows:
2023-12-05 21:01:06 +02:00
# - 'git': clone audit content from GitHub REPOSITORY, set up via `audit_file_git` var, and
# VERSION(e.g. branch, tag name), set up via `audit_git_version` var.
# - 'copy': copy from path as specified in variable `audit_conf_copy`.
# - 'archive': same as 'copy', only that the specified filepath needs to be unpacked.
# - 'get_url': Download from url as specified in variable `audit_files_url`
2022-01-07 09:06:18 +00:00
audit_content : git
2023-12-05 21:01:06 +02:00
# This variable(only used when 'audit_content' is 'copy' or 'archive') should
# contain the filepath with audit-content to be copied/unarchived on server:
2023-11-21 09:48:49 +00:00
audit_conf_copy : "some path to copy from"
2023-12-05 21:01:06 +02:00
# This variable(only used when 'audit_content' is 'get_url') should
# contain the URL from where the audit-content must be downloaded on server:
2023-11-21 09:48:49 +00:00
audit_files_url : "some url maybe s3?"
# Run heavy tests - some tests can have more impact on a system enabling these can have greater impact on a system
audit_run_heavy_tests : true
2022-01-07 09:06:18 +00:00
2023-11-29 15:50:23 +00:00
# Timeout for those cmds that take longer to run where timeout set
2023-11-21 09:48:49 +00:00
# This variable specifies the timeout (in ms) for audit commands that
# take a very long time: if a command takes too long to complete,
# it will be forcefully terminated after the specified duration.
2023-12-05 21:01:06 +02:00
audit_cmd_timeout : 120000
2022-01-07 09:06:18 +00:00
### End Goss enablements ####
# These variables correspond with the CIS rule IDs or paragraph numbers defined in
# the CIS benchmark documents.
# PLEASE NOTE: These work in coordination with the section # group variables and tags.
# You must enable an entire section in order for the variables below to take effect.
2023-12-05 21:01:06 +02:00
2023-11-29 15:50:23 +00:00
# Section 1 is Initial setup (FileSystem Configuration, Configure Software Updates, Filesystem Integrity Checking, Secure Boot Settings,
# Additional Process Hardening, Mandatory Access Control, Command Line Warning Banners, and GNOME Display Manager)
2022-01-07 09:06:18 +00:00
rhel9cis_rule_1_1_1_1 : true
rhel9cis_rule_1_1_1_2 : true
2022-03-30 09:42:12 +01:00
rhel9cis_rule_1_1_2_1 : true
rhel9cis_rule_1_1_2_2 : true
rhel9cis_rule_1_1_2_3 : true
rhel9cis_rule_1_1_2_4 : true
rhel9cis_rule_1_1_3_1 : true
rhel9cis_rule_1_1_3_2 : true
rhel9cis_rule_1_1_3_3 : true
rhel9cis_rule_1_1_4_1 : true
rhel9cis_rule_1_1_4_2 : true
rhel9cis_rule_1_1_4_3 : true
rhel9cis_rule_1_1_4_4 : true
rhel9cis_rule_1_1_5_1 : true
rhel9cis_rule_1_1_5_2 : true
rhel9cis_rule_1_1_5_3 : true
rhel9cis_rule_1_1_5_4 : true
rhel9cis_rule_1_1_6_1 : true
rhel9cis_rule_1_1_6_2 : true
rhel9cis_rule_1_1_6_3 : true
rhel9cis_rule_1_1_6_4 : true
rhel9cis_rule_1_1_7_1 : true
rhel9cis_rule_1_1_7_2 : true
rhel9cis_rule_1_1_7_3 : true
rhel9cis_rule_1_1_8_1 : true
rhel9cis_rule_1_1_8_2 : true
rhel9cis_rule_1_1_8_3 : true
2023-01-12 11:38:53 +00:00
rhel9cis_rule_1_1_8_4 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_1_1_18 : true
rhel9cis_rule_1_1_19 : true
rhel9cis_rule_1_1_20 : true
rhel9cis_rule_1_1_21 : true
2022-03-30 09:42:12 +01:00
rhel9cis_rule_1_1_9 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_1_2_1 : true
rhel9cis_rule_1_2_2 : true
rhel9cis_rule_1_2_3 : true
rhel9cis_rule_1_2_4 : true
rhel9cis_rule_1_3_1 : true
rhel9cis_rule_1_3_2 : true
2023-01-12 11:38:53 +00:00
rhel9cis_rule_1_3_3 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_1_4_1 : true
rhel9cis_rule_1_4_2 : true
rhel9cis_rule_1_5_1 : true
rhel9cis_rule_1_5_2 : true
rhel9cis_rule_1_5_3 : true
2022-03-30 09:42:12 +01:00
rhel9cis_rule_1_6_1_1 : true
rhel9cis_rule_1_6_1_2 : true
rhel9cis_rule_1_6_1_3 : true
rhel9cis_rule_1_6_1_4 : true
rhel9cis_rule_1_6_1_5 : true
rhel9cis_rule_1_6_1_6 : true
rhel9cis_rule_1_6_1_7 : true
2023-01-12 11:38:53 +00:00
rhel9cis_rule_1_6_1_8 : true
2022-03-30 09:42:12 +01:00
rhel9cis_rule_1_7_1 : true
rhel9cis_rule_1_7_2 : true
rhel9cis_rule_1_7_3 : true
rhel9cis_rule_1_7_4 : true
rhel9cis_rule_1_7_5 : true
rhel9cis_rule_1_7_6 : true
rhel9cis_rule_1_8_1 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_1_8_2 : true
2022-03-30 09:42:12 +01:00
rhel9cis_rule_1_8_3 : true
rhel9cis_rule_1_8_4 : true
rhel9cis_rule_1_8_5 : true
2023-01-12 11:38:53 +00:00
rhel9cis_rule_1_8_6 : true
rhel9cis_rule_1_8_7 : true
rhel9cis_rule_1_8_8 : true
rhel9cis_rule_1_8_9 : true
rhel9cis_rule_1_8_10 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_1_9 : true
rhel9cis_rule_1_10 : true
2023-11-29 15:50:23 +00:00
# Section 2 rules are controling Services (Special Purpose Services, and service clients)
2022-01-07 09:06:18 +00:00
rhel9cis_rule_2_1_1 : true
rhel9cis_rule_2_1_2 : true
2022-03-30 09:42:12 +01:00
rhel9cis_rule_2_2_1 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_2_2_2 : true
rhel9cis_rule_2_2_3 : true
rhel9cis_rule_2_2_4 : true
rhel9cis_rule_2_2_5 : true
rhel9cis_rule_2_2_6 : true
rhel9cis_rule_2_2_7 : true
rhel9cis_rule_2_2_8 : true
rhel9cis_rule_2_2_9 : true
rhel9cis_rule_2_2_10 : true
rhel9cis_rule_2_2_11 : true
rhel9cis_rule_2_2_12 : true
rhel9cis_rule_2_2_13 : true
rhel9cis_rule_2_2_14 : true
rhel9cis_rule_2_2_15 : true
rhel9cis_rule_2_2_16 : true
rhel9cis_rule_2_2_17 : true
rhel9cis_rule_2_2_18 : true
rhel9cis_rule_2_3_1 : true
rhel9cis_rule_2_3_2 : true
rhel9cis_rule_2_3_3 : true
2022-03-30 09:42:12 +01:00
rhel9cis_rule_2_3_4 : true
rhel9cis_rule_2_4 : true
2022-01-07 09:06:18 +00:00
2023-12-05 21:01:06 +02:00
# Section 3 rules are used for securely configuring the network configuration(kernel params, ACL, Firewall settings)
2022-01-07 09:06:18 +00:00
rhel9cis_rule_3_1_1 : true
rhel9cis_rule_3_1_2 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_3_1_3 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_3_2_1 : true
rhel9cis_rule_3_2_2 : true
rhel9cis_rule_3_3_1 : true
rhel9cis_rule_3_3_2 : true
rhel9cis_rule_3_3_3 : true
rhel9cis_rule_3_3_4 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_3_3_5 : true
rhel9cis_rule_3_3_6 : true
rhel9cis_rule_3_3_7 : true
rhel9cis_rule_3_3_8 : true
rhel9cis_rule_3_3_9 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_3_4_1_1 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_3_4_1_2 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_3_4_2_1 : true
rhel9cis_rule_3_4_2_2 : true
rhel9cis_rule_3_4_2_3 : true
rhel9cis_rule_3_4_2_4 : true
rhel9cis_rule_3_4_2_5 : true
rhel9cis_rule_3_4_2_6 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_3_4_2_7 : true
2022-01-07 09:06:18 +00:00
2023-11-29 15:50:23 +00:00
# Section 4 rules are Logging and Auditing (Configure System Accounting (auditd),
# Configure Data Retention, and Configure Logging)
2022-01-07 09:06:18 +00:00
rhel9cis_rule_4_1_1_1 : true
rhel9cis_rule_4_1_1_2 : true
rhel9cis_rule_4_1_1_3 : true
rhel9cis_rule_4_1_1_4 : true
rhel9cis_rule_4_1_2_1 : true
rhel9cis_rule_4_1_2_2 : true
rhel9cis_rule_4_1_2_3 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_4_1_3_1 : true
rhel9cis_rule_4_1_3_2 : true
rhel9cis_rule_4_1_3_3 : true
rhel9cis_rule_4_1_3_4 : true
rhel9cis_rule_4_1_3_5 : true
rhel9cis_rule_4_1_3_6 : true
rhel9cis_rule_4_1_3_7 : true
rhel9cis_rule_4_1_3_8 : true
rhel9cis_rule_4_1_3_9 : true
rhel9cis_rule_4_1_3_10 : true
rhel9cis_rule_4_1_3_11 : true
rhel9cis_rule_4_1_3_12 : true
rhel9cis_rule_4_1_3_13 : true
rhel9cis_rule_4_1_3_14 : true
rhel9cis_rule_4_1_3_15 : true
rhel9cis_rule_4_1_3_16 : true
rhel9cis_rule_4_1_3_17 : true
rhel9cis_rule_4_1_3_18 : true
rhel9cis_rule_4_1_3_19 : true
rhel9cis_rule_4_1_3_20 : true
rhel9cis_rule_4_1_3_21 : true
2023-01-12 11:38:53 +00:00
rhel9cis_rule_4_1_4_1 : true
rhel9cis_rule_4_1_4_2 : true
rhel9cis_rule_4_1_4_3 : true
rhel9cis_rule_4_1_4_4 : true
rhel9cis_rule_4_1_4_5 : true
rhel9cis_rule_4_1_4_6 : true
rhel9cis_rule_4_1_4_7 : true
rhel9cis_rule_4_1_4_8 : true
rhel9cis_rule_4_1_4_9 : true
rhel9cis_rule_4_1_4_10 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_4_2_1_1 : true
rhel9cis_rule_4_2_1_2 : true
rhel9cis_rule_4_2_1_3 : true
rhel9cis_rule_4_2_1_4 : true
rhel9cis_rule_4_2_1_5 : true
rhel9cis_rule_4_2_1_6 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_4_2_1_7 : true
rhel9cis_rule_4_2_2_1_1 : true
rhel9cis_rule_4_2_2_1_2 : true
rhel9cis_rule_4_2_2_1_3 : true
rhel9cis_rule_4_2_2_1_4 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_4_2_2_2 : true
rhel9cis_rule_4_2_2_3 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_4_2_2_4 : true
rhel9cis_rule_4_2_2_5 : true
rhel9cis_rule_4_2_2_6 : true
rhel9cis_rule_4_2_2_7 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_4_2_3 : true
2023-01-12 11:38:53 +00:00
rhel9cis_rule_4_3 : true
2022-01-07 09:06:18 +00:00
2023-11-29 15:50:23 +00:00
# Section 5 rules control Access, Authentication, and Authorization (Configure time-based job schedulers,
# Configure sudo, Configure SSH Server, Configure PAM and User Accounts and Environment)
2022-01-07 09:06:18 +00:00
rhel9cis_rule_5_1_1 : true
rhel9cis_rule_5_1_2 : true
rhel9cis_rule_5_1_3 : true
rhel9cis_rule_5_1_4 : true
rhel9cis_rule_5_1_5 : true
rhel9cis_rule_5_1_6 : true
rhel9cis_rule_5_1_7 : true
rhel9cis_rule_5_1_8 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_5_1_9 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_5_2_1 : true
rhel9cis_rule_5_2_2 : true
rhel9cis_rule_5_2_3 : true
rhel9cis_rule_5_2_4 : true
rhel9cis_rule_5_2_5 : true
rhel9cis_rule_5_2_6 : true
rhel9cis_rule_5_2_7 : true
rhel9cis_rule_5_2_8 : true
rhel9cis_rule_5_2_9 : true
rhel9cis_rule_5_2_10 : true
rhel9cis_rule_5_2_12 : true
rhel9cis_rule_5_2_11 : true
rhel9cis_rule_5_2_13 : true
rhel9cis_rule_5_2_14 : true
rhel9cis_rule_5_2_15 : true
rhel9cis_rule_5_2_16 : true
rhel9cis_rule_5_2_17 : true
rhel9cis_rule_5_2_18 : true
rhel9cis_rule_5_2_19 : true
rhel9cis_rule_5_2_20 : true
rhel9cis_rule_5_3_1 : true
rhel9cis_rule_5_3_2 : true
rhel9cis_rule_5_3_3 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_5_3_4 : true
rhel9cis_rule_5_3_5 : true
rhel9cis_rule_5_3_6 : true
rhel9cis_rule_5_3_7 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_5_4_1 : true
rhel9cis_rule_5_4_2 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_5_5_1 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_5_5_2 : true
rhel9cis_rule_5_5_3 : true
rhel9cis_rule_5_5_4 : true
rhel9cis_rule_5_5_5 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_5_6_1_1 : true
rhel9cis_rule_5_6_1_2 : true
rhel9cis_rule_5_6_1_3 : true
rhel9cis_rule_5_6_1_4 : true
rhel9cis_rule_5_6_1_5 : true
rhel9cis_rule_5_6_2 : true
rhel9cis_rule_5_6_3 : true
rhel9cis_rule_5_6_4 : true
rhel9cis_rule_5_6_5 : true
2023-01-13 09:09:49 +00:00
rhel9cis_rule_5_6_6 : true
2022-01-07 09:06:18 +00:00
2023-11-29 15:50:23 +00:00
# Section 6 rules controls System Maintenance (System File Permissions and User and Group Settings)
rhel9cis_rule_6_1_1 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_6_1_2 : true
rhel9cis_rule_6_1_3 : true
rhel9cis_rule_6_1_4 : true
rhel9cis_rule_6_1_5 : true
rhel9cis_rule_6_1_6 : true
rhel9cis_rule_6_1_7 : true
rhel9cis_rule_6_1_8 : true
rhel9cis_rule_6_1_9 : true
rhel9cis_rule_6_1_10 : true
rhel9cis_rule_6_1_11 : true
rhel9cis_rule_6_1_12 : true
rhel9cis_rule_6_1_13 : true
rhel9cis_rule_6_1_14 : true
2022-03-30 16:18:11 +01:00
rhel9cis_rule_6_1_15 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_6_2_1 : true
rhel9cis_rule_6_2_2 : true
rhel9cis_rule_6_2_3 : true
rhel9cis_rule_6_2_4 : true
rhel9cis_rule_6_2_5 : true
rhel9cis_rule_6_2_6 : true
rhel9cis_rule_6_2_7 : true
2022-04-01 15:26:13 +01:00
rhel9cis_rule_6_2_8 : true
2022-01-07 09:06:18 +00:00
rhel9cis_rule_6_2_9 : true
rhel9cis_rule_6_2_10 : true
rhel9cis_rule_6_2_11 : true
rhel9cis_rule_6_2_12 : true
rhel9cis_rule_6_2_13 : true
rhel9cis_rule_6_2_14 : true
rhel9cis_rule_6_2_15 : true
rhel9cis_rule_6_2_16 : true
## Section 1 vars
2022-04-01 15:26:13 +01:00
#### 1.1.2
2022-01-07 09:06:18 +00:00
# These settings go into the /etc/fstab file for the /tmp mount settings
# The value must contain nosuid,nodev,noexec to conform to CIS standards
# rhel9cis_tmp_tmpfs_settings: "defaults,rw,nosuid,nodev,noexec,relatime 0 0"
# If set true uses the tmp.mount service else using fstab configuration
rhel9cis_tmp_svc : false
2022-04-01 15:26:13 +01:00
#### 1.1.9
rhel9cis_allow_autofs : false
2022-01-07 09:06:18 +00:00
# 1.2.1
# This is the login information for your RedHat Subscription
# DO NOT USE PLAIN TEXT PASSWORDS!!!!!
# The intent here is to use a password utility like Ansible Vault here
rhel9cis_rh_sub_user : user
2023-09-21 15:36:05 +01:00
rhel9cis_rh_sub_password: password # pragma : allowlist secret
2022-01-07 09:06:18 +00:00
# 1.2.2
# Do you require rhnsd
# RedHat Satellite Subscription items
rhel9cis_rhnsd_required : false
2023-12-06 22:20:32 +02:00
# Control 1.2.4 - When installing RHEL from authorized Red Hat source, RHEL will come with default YUM repository. NOT having a default YUM
# repo('rhel9cis_rhel_default_repo' set as 'false'), in conjunction with 'rhel9cis_rule_enable_repogpg' set as 'True', will enable the tasks
# which check the GPG signatures for all the individual YUM repositories.
2023-01-20 17:14:24 +00:00
rhel9cis_rhel_default_repo : true
2023-12-06 22:20:32 +02:00
# Control 1.2.4 - When 'rhel9cis_rule_enable_repogpg' is set to 'true'(in conjunction with 'rhel9cis_rhel_default_repo':'false'), conditions are met for
# enabling the GPG signatures-check for all the individual YUM repositories. If GPG signatures-check is enabled on repositories which do not
# support it(like RedHat), installation of packages will fail.
2023-09-07 14:23:12 +01:00
rhel9cis_rule_enable_repogpg : true
2023-01-20 17:14:24 +00:00
2023-12-06 22:20:32 +02:00
# Control 1.4.1 - This variable will store the hashed GRUB bootloader password to be stored in '/boot/grub2/user.cfg' file. The default value
# must be changed to a value that may be generated with this command 'grub2-mkpasswd-pbkdf2' and must comply with
# this format: 'grub.pbkdf2.sha512.<Rounds>.<Salt>.<Checksum>'
2023-09-21 15:36:05 +01:00
rhel9cis_bootloader_password_hash: 'grub.pbkdf2.sha512.10000.9306A36764A7BEA3BF492D1784396B27F52A71812E9955A58709F94EE70697F9BD5366F36E07DEC41B52279A056E2862A93E42069D7BBB08F5DFC2679CD43812.6C32ADA5449303AD5E67A4C150558592A05381331DE6B33463469A236871FA8E70738C6F9066091D877EF88A213C86825E093117F30E9E1BF158D0DB75E7581B' # pragma : allowlist secret
rhel9cis_bootloader_password: random # pragma : allowlist secret
2023-12-06 22:20:32 +02:00
# Control 1.4.1 - This variable governs whether a bootloader password should be set in /boot/grub2/user.cfg file.
2023-01-18 16:21:51 +00:00
rhel9cis_set_boot_pass : true
2022-01-07 09:06:18 +00:00
2023-11-29 15:50:23 +00:00
## Controls 1.8.x - Settings for GDM
# This variable specifies the GNOME configuration database file to which configurations are written.
# (See https://help.gnome.org/admin/system-admin-guide/stable/dconf-keyfiles.html.en)
# The default database is `local`
2023-01-20 10:29:50 +00:00
rhel9cis_dconf_db_name : local
2023-11-29 15:50:23 +00:00
# This variable governs the number of seconds of inactivity before the screen goes blank.
2023-01-20 10:29:50 +00:00
rhel9cis_screensaver_idle_delay : 900 # Set max value for idle-delay in seconds (between 1 and 900)
2023-11-29 15:50:23 +00:00
# This variable governs the number of seconds the screen remains blank before it is locked.
2023-01-20 10:29:50 +00:00
rhel9cis_screensaver_lock_delay : 5 # Set max value for lock-delay in seconds (between 0 and 5)
2022-04-01 15:26:13 +01:00
2023-12-06 22:20:32 +02:00
# Control 1.10 - This variable contains the value to be set as the system-wide crypto policy. Rule 1.10 enforces
# NOT using 'LEGACY' value(as it is less secure, it just ensures compatibility with legacy systems), therefore
# possible values for this variable are, as explained by RedHat docs:
# -'DEFAULT': reasonable default policy for today's standards(balances usability and security)
# -'FUTURE': conservative security level that is believed to withstand any near-term future attacks
# -'FIPS': A level that conforms to the FIPS140-2 requirements
2023-06-06 14:36:38 +01:00
rhel9cis_crypto_policy : 'DEFAULT'
2023-12-06 22:20:32 +02:00
# Control 1.10 - This variable contains the value of the crypto policy module(combinations of policies and
# sub-policies) to be allowed as default setting. Allowed options are defined in 'vars/main.yml' file,
# using 'rhel9cis_allowed_crypto_policies_modules' variable.
2023-06-06 14:36:38 +01:00
rhel9cis_crypto_policy_module : ''
2022-01-07 09:06:18 +00:00
# System network parameters (host only OR host and router)
2023-11-29 15:50:23 +00:00
# This variable governs whether specific CIS rules
# concerned with acceptance and routing of packages are skipped.
2022-01-07 09:06:18 +00:00
rhel9cis_is_router : false
2023-11-29 15:50:23 +00:00
## IPv6 requirement toggle
# This variable governs whether ipv6 is enabled or disabled.
2022-01-07 09:06:18 +00:00
rhel9cis_ipv6_required : true
2023-11-29 15:50:23 +00:00
## Control 1.3.1 - allow aide to be configured
# AIDE is a file integrity checking tool, similar in nature to Tripwire.
# While it cannot prevent intrusions, it can detect unauthorized changes
# to configuration files by alerting when the files are changed. Review
# the AIDE quick start guide and AIDE documentation before proceeding.
# By setting this variable to `true`, all of the settings related to AIDE will be applied!
2022-01-07 09:06:18 +00:00
rhel9cis_config_aide : true
2023-11-29 15:50:23 +00:00
## Control 1.3.2 AIDE cron settings
# These are the crontab settings for periodical checking of the filesystem's integrity using AIDE.
# The sub-settings of this variable provide the parameters required to configure
# the cron job on the target system.
# Cron is a time-based job scheduling program in Unix OS, which allows tasks to be scheduled
# and executed automatically at a certain point in time.
2022-01-07 09:06:18 +00:00
rhel9cis_aide_cron :
2023-11-29 15:50:23 +00:00
# This variable represents the user account under which the cron job for AIDE will run.
2022-01-07 09:06:18 +00:00
cron_user : root
2023-11-29 15:50:23 +00:00
# This variable represents the path to the AIDE crontab file.
2022-04-01 15:26:13 +01:00
cron_file : /etc/cron.d/aide_cron
2023-11-29 15:50:23 +00:00
# This variable represents the actual command or script that the cron job
# will execute for running AIDE.
2022-01-07 09:06:18 +00:00
aide_job : '/usr/sbin/aide --check'
2023-11-29 15:50:23 +00:00
# These variables define the schedule for the cron job
# This variable governs the minute of the time of day when the AIDE cronjob is run.
# It must be in the range `0-59`.
2022-01-07 09:06:18 +00:00
aide_minute : 0
2023-11-29 15:50:23 +00:00
# This variable governs the hour of the time of day when the AIDE cronjob is run.
# It must be in the range `0-23`.
2022-01-07 09:06:18 +00:00
aide_hour : 5
2023-11-29 15:50:23 +00:00
# This variable governs the day of the month when the AIDE cronjob is run.
# `*` signifies that the job is run on all days; furthermore, specific days
# can be given in the range `1-31`; several days can be concatenated with a comma.
# The specified day(s) can must be in the range `1-31`.
2022-01-07 09:06:18 +00:00
aide_day : '*'
2023-11-29 15:50:23 +00:00
# This variable governs months when the AIDE cronjob is run.
# `*` signifies that the job is run in every month; furthermore, specific months
# can be given in the range `1-12`; several months can be concatenated with commas.
# The specified month(s) can must be in the range `1-12`.
2022-01-07 09:06:18 +00:00
aide_month : '*'
2023-11-29 15:50:23 +00:00
# This variable governs the weekdays, when the AIDE cronjob is run.
# `*` signifies that the job is run on all weekdays; furthermore, specific weekdays
# can be given in the range `0-7` (both `0` and `7` represent Sunday); several weekdays
# can be concatenated with commas.
2022-01-07 09:06:18 +00:00
aide_weekday : '*'
2023-12-06 22:20:32 +02:00
## Control 1.6.1.3|4|5 - SELinux policy settings
# This selects type of policy; targeted or mls( multilevel )
2023-11-29 15:50:23 +00:00
# mls should not be used, since it will disable unconfined policy module
2023-12-06 22:20:32 +02:00
# and may prevent some services from running. Requires SELinux not being disabled(by
# having 'rhel9cis_selinux_disable' var set as 'true'), otherwise setting will be ignored.
2022-01-07 09:06:18 +00:00
rhel9cis_selinux_pol : targeted
2023-12-06 22:20:32 +02:00
## Control 1.6.1.3|4 - SELinux configured and not disabled
# This variable contains a specific SELinux mode, respectively:
# - 'enforcing': SELinux policy IS enforced, therefore denies operations based on SELinux policy
# rules. If system was installed with SELinux, this is enabled by default.
# - 'permissive': SELinux policy IS NOT enforced, therefore does NOT deny any operation, only
# logs AVC(Access Vector Cache) messages. RedHat docs suggest it "can be used
# briefly to check if SELinux is the culprit in preventing your application
# from working".
# CIS expects enforcing since permissive allows operations that might compromise the system.
2023-11-29 15:50:23 +00:00
# Even though logging still occurs.
2023-01-12 11:38:53 +00:00
rhel9cis_selinux_enforce : enforcing
2022-01-07 09:06:18 +00:00
# Whether or not to run tasks related to auditing/patching the desktop environment
2022-04-01 15:26:13 +01:00
## 2. Services
2022-01-07 09:06:18 +00:00
2022-04-01 15:26:13 +01:00
### 2.1 Time Synchronization
#### 2.1.2 Time Synchronization servers - used in template file chrony.conf.j2
2023-12-06 22:20:32 +02:00
# The following variable represents a list of time servers used
2023-11-29 15:50:23 +00:00
# for configuring chrony, timesyncd, and ntp.
# Each list item contains two settings, `name` (the domain name of the server) and synchronization `options`.
# The default setting for the `options` is `minpoll` but `iburst` can be used, please refer to the documentation
# of the time synchronization mechanism you are using.
2022-01-07 09:06:18 +00:00
rhel9cis_time_synchronization_servers :
- 0. pool.ntp.org
- 1. pool.ntp.org
- 2. pool.ntp.org
- 3. pool.ntp.org
2023-12-06 22:20:32 +02:00
#### 2.1.2 - Time Synchronization servers
# This variable should contain the default options to be used for every NTP server hostname defined
# within the 'rhel9cis_time_synchronization_servers' var.
2022-01-07 09:06:18 +00:00
rhel9cis_chrony_server_options : "minpoll 8"
2023-11-22 09:17:15 +00:00
rhel9cis_chrony_server_rtcsync : false
rhel9cis_chrony_server_makestep : "1.0 3"
rhel9cis_chrony_server_minsources : 2
2022-01-07 09:06:18 +00:00
2022-04-01 15:26:13 +01:00
### 2.2 Special Purposes
2023-11-29 15:50:23 +00:00
# Service configuration variables (boolean).
# Set the respective variable to true to keep the service.
# otherwise the service is stopped and disabled
2023-12-07 22:53:01 +02:00
# This variable governs whether rules dealing with GUI specific packages(and/or their settings) should
# be executed either to:
# - secure GDM(Control 1.8.2-1.8.10), if GUI is needed('rhel9cis_gui: true')
# - or remove GDM(Control 1.8.1) and X-Windows-system(2.2.1), if no GUI is needed('rhel9cis_gui: false')
2022-04-01 15:26:13 +01:00
rhel9cis_gui : false
2023-12-07 22:53:01 +02:00
# Control 2.2.2 - Ensure Avahi Server is not installed
# This variable, when set to false, will specify that Avahi Server packages should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_avahi_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.3 - Ensure CUPS is not installed
# This variable, when set to false, will specify that CUPS(Common UNIX Printing System) package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_cups_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.4 - Ensure DHCP Server is not installed
# This variable, when set to false, will specify that DHCP server package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_dhcp_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.5 - Ensure DNS Server is not installed
# This variable, when set to false, will specify that DNS server package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_dns_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.14 - Ensure dnsmasq is not installed
# This variable, when set to false, will specify that dnsmasq package should be uninstalled.
2023-01-12 11:38:53 +00:00
rhel9cis_dnsmasq_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.6 - Ensure VSFTP Server is not installed
# This variable, when set to false, will specify that VSFTP server package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_vsftpd_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.7 - Ensure TFTP Server is not installed
# This variable, when set to false, will specify that TFTP server package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_tftp_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.8 - Ensure a web server is not installed - HTTPD
# This variable, when set to false, will specify that webserver packages(HTTPD) should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_httpd_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.8 - Ensure a web server is not installed - NGINX
# This variable, when set to false, will specify that webserver packages(NGINX) should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_nginx_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.9 - Ensure IMAP and POP3 server is not installed - dovecot
# This variable, when set to false, will specify that IMAP and POP3 servers(dovecot) should be uninstalled.
2022-04-04 12:50:41 +01:00
rhel9cis_dovecot_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.9 - Ensure IMAP and POP3 server is not installed - cyrus-imapd
# This variable, when set to false, will specify that IMAP and POP3 servers(cyrus-imapd) should be uninstalled.
2022-04-04 12:50:41 +01:00
rhel9cis_imap_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.10 - Ensure Samba is not enabled
# This variable, when set to false, will specify that 'samba' package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_samba_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.11 - Ensure HTTP Proxy Server is not installed
# This variable, when set to false, will specify that 'squid' package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_squid_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.12 - Ensure net-snmp is not installed
# This variable, when set to false, will specify that 'net-snmp' package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_snmp_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.13 - Ensure telnet-server is not installed
# This variable, when set to false, will specify that 'telnet-server' package should be uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_telnet_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.15 - Ensure mail transfer agent is configured for local-only mode
# This variable, when system is NOT a mailserver, will configure Postfix to listen only on the loopback interface(the virtual
# network interface that the server uses to communicate internally.
2022-04-01 15:26:13 +01:00
rhel9cis_is_mail_server : false
2023-11-29 15:50:23 +00:00
2022-04-04 12:50:41 +01:00
# Note the options
2023-11-29 15:50:23 +00:00
# Client package configuration variables.
2022-04-04 12:50:41 +01:00
# Packages are used for client services and Server- only remove if you dont use the client service
2023-11-29 15:50:23 +00:00
# Set the respective variable to `true` to keep the
# client package, otherwise it is uninstalled (false).
2023-12-07 22:53:01 +02:00
# Control 2.2.16 - Ensure nfs-utils is not installed or the nfs-server service is masked"
# This variable specifies if the usage of NFS SERVER is needed. The behavior of 2.2.16 will depend on
# the var used in conjunction('rhel9cis_use_nfs_service') with current one, respectively:
# - if Server IS NOT needed('false') and:
# - Service IS NOT needed('rhel9cis_use_nfs_service: false'): 'nfs-utils' package will be removed
# - Service IS needed('rhel9cis_use_nfs_service: true'): impossible to need the service without the server
# - if Server IS needed('true') and:
# - Service IS NOT needed('rhel9cis_use_nfs_service: false'): 'nfs-server' service will be masked
# - Service IS needed('rhel9cis_use_nfs_service: true'): Rule 2.2.16 will be SKIPPED.
# | Server | Service | Result |
# |---------|---------|-----------------------------------------------------------|
# | false | false | Remove package |
# | false | true | Needing 'service' without needing 'server' makes no sense |
# | true | false | Mask 'service' |
# | true | true | SKIP RULE, BOTH 'service' and 'server' are required |
2022-04-06 16:31:57 +01:00
rhel9cis_use_nfs_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.16 - Ensure nfs-utils is not installed or the nfs-server service is masked.
# This variable specifies if the usage of NFS SERVICE is needed. If it's:
# - needed('true'): rule 2.2.16 will not be executed at all
# - not needed('false'): rule 2.2.16 will be executed, its behavior being controlled by the var
# used in conjunction with current one:
# - removing 'nfs-utils' package('rhel9cis_use_nfs_server' set to 'false')
# - masking the 'nfs-server' service('rhel9cis_use_nfs_server' set to 'true')
2022-04-06 16:31:57 +01:00
rhel9cis_use_nfs_service : false
2023-12-07 22:53:01 +02:00
# Control 2.2.17 - Ensure rpcbind is not installed or the rpcbind services are masked
# This variable specifies if the usage of RPC SERVER is needed. The behavior of 2.2.17 will depend on
# the var used in conjunction('rhel9cis_use_rpc_service') with current one, respectively:
# - if Server IS NOT needed('false') and:
# - Service IS NOT needed('rhel9cis_use_rpc_service: false'): 'rpcbind' package will be removed
# - Service IS needed('rhel9cis_use_rpc_service: true'): impossible to need the service without the server
# - if Server IS needed('true') and:
# - Service IS NOT needed('rhel9cis_use_rpc_service: false'): 'rpcbind.socket' service will be masked
# - Service IS needed('rhel9cis_use_rpc_service: true'): Rule 2.2.17 will be SKIPPED.
# | Server | Service | Result |
# |---------|---------|-----------------------------------------------------------|
# | false | false | Remove package |
# | false | true | Needing 'service' without needing 'server' makes no sense |
# | true | false | Mask 'service' |
# | true | true | SKIP RULE, BOTH 'service' and 'server' are required |
2022-04-06 16:31:57 +01:00
rhel9cis_use_rpc_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.17 - Ensure rpcbind is not installed or the rpcbind services are masked
# This variable specifies if the usage of RPC SERVICE is needed. If it's:
# - needed('true'): rule 2.2.17 will not be executed at all
# - not needed('false'): rule 2.2.17 will be executed, its behavior being controlled by the var
# used in conjunction with current one:
# - removing 'rpcbind' package('rhel9cis_use_rpc_server' set to 'false')
# - masking the 'rpcbind.socket' service('rhel9cis_use_rpc_server' set to 'true')
2022-04-06 16:31:57 +01:00
rhel9cis_use_rpc_service : false
2023-12-07 22:53:01 +02:00
# Control 2.2.18 - Ensure rsync service is not enabled
# This variable specifies if the usage of RSYNC SERVER is needed. The behavior of 2.2.18 will depend on
# the var used in conjunction('rhel9cis_use_rsync_service') with current one, respectively:
# - if Server IS NOT needed('false') and:
# - Service IS NOT needed('rhel9cis_use_rsync_service: false'): 'rsync-daemon' package will be removed
# - Service IS needed('rhel9cis_use_rsync_service: true'): impossible to need the service without the server
# - if Server IS needed('true') and:
# - Service IS NOT needed('rhel9cis_use_rsync_service: false'): 'rsyncd' service will be masked
# - Service IS needed('rhel9cis_use_rsync_service: true'): Rule 2.2.18 will be SKIPPED.
# | Server | Service | Result |
# |---------|---------|-----------------------------------------------------------|
# | false | false | Remove package |
# | false | true | Needing 'service' without needing 'server' makes no sense |
# | true | false | Mask 'service' |
# | true | true | SKIP RULE, BOTH 'service' and 'server' are required |
2022-04-06 16:31:57 +01:00
rhel9cis_use_rsync_server : false
2023-12-07 22:53:01 +02:00
# Control 2.2.18 - Ensure rsync service is not enabled
# This variable specifies if the usage of RSYNC SERVICE is needed. If it's:
# - needed('true'): rule 2.2.18 will not be executed at all
# - not needed('false'): rule 2.2.18 will be executed, its behavior being controlled by the var
# used in conjunction with current one:
# - removing 'rsync-daemon' package('rhel9cis_use_rsync_server' set to 'false')
# - masking the 'rsyncd' service('rhel9cis_use_rsync_server' set to 'true')
2022-04-06 16:31:57 +01:00
rhel9cis_use_rsync_service : false
2022-04-01 15:26:13 +01:00
#### 2.3 Service clients
2023-12-07 22:53:01 +02:00
# Control - 2.3.1 - Ensure telnet client is not installed
# Set this variable to `true` to keep package `telnet`; otherwise, the package is uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_telnet_required : false
2023-12-07 22:53:01 +02:00
# Control - 2.3.2 - Ensure LDAP client is not installed
# Set this variable to `true` to keep package `openldap-clients`; otherwise, the package is uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_openldap_clients_required : false
2023-12-07 22:53:01 +02:00
# Control - 2.3.3 - Ensure FTP client is not installed
# Set this variable to `true` to keep package `tftp`; otherwise, the package is uninstalled.
2022-04-01 15:26:13 +01:00
rhel9cis_tftp_client : false
2023-12-07 22:53:01 +02:00
# Control - 2.3.4 - Ensure FTP client is not installed
# Set this variable to `true` to keep package `ftp`; otherwise, the package is uninstalled.
2023-01-12 11:38:53 +00:00
rhel9cis_ftp_client : false
2022-01-07 09:06:18 +00:00
2022-04-01 15:26:13 +01:00
## Section3 vars
2022-06-20 17:05:23 +01:00
## Sysctl
2023-12-07 22:53:01 +02:00
# This variable governs if the task which updates sysctl(including sysctl reload) is executed, but current
# default value can be overriden by other tasks(1.5.3, 3.1.1, 3.2.1, 3.2.2, 3.3.1-3.3.9).
2023-03-01 09:17:38 +00:00
rhel9cis_sysctl_update : false
2023-12-07 22:53:01 +02:00
# This variable governs if the task which flushes the IPv4 routing table is executed(forcing subsequent connections to
# use the new configuration). Current default value can be overriden by other tasks(3.2.1, 3.2.2, 3.3.1-3.3.8).
2023-03-01 09:17:38 +00:00
rhel9cis_flush_ipv4_route : false
2023-12-07 22:53:01 +02:00
# This variable governs if the task which flushes the IPv6 routing table is executed(forcing subsequent connections to
# use the new configuration). Current default value can be overriden by other tasks(3.1.1, 3.2.1, 3.3.1, 3.3.2, 3.3.9).
2023-03-01 09:17:38 +00:00
rhel9cis_flush_ipv6_route : false
2022-06-20 17:05:23 +01:00
2023-12-07 22:53:01 +02:00
### Firewall Service to install and configure - Option is:
# 1) either 'firewalld'(Controls 3.4.1.2, 3.4.2.1, 3.4.2.4)
# 2) or 'nftables'(Controls )
2022-04-04 15:15:40 +01:00
#### Some control allow for services to be removed or masked
#### The options are under each heading
#### absent = remove the package
#### masked = leave package if installed and mask the service
2022-01-07 09:06:18 +00:00
rhel9cis_firewall : firewalld
2023-12-07 22:53:01 +02:00
# Control 3.4.2.1 - Ensure firewalld default zone is set
# This variable will set the firewalld default zone(that is used for everything that is not explicitly bound/assigned
# to another zone): if there is no zone assigned to a connection, interface or source, only the default zone is used.
2022-01-07 09:06:18 +00:00
rhel9cis_default_zone : public
2023-01-12 11:38:53 +00:00
2023-07-05 13:01:56 +01:00
# These settings are added to demonstrate how this update can be done (eventually will require a new control)
2023-01-12 11:38:53 +00:00
rhel9cis_firewalld_ports :
- number : 80
protocol : tcp
2022-01-07 09:06:18 +00:00
2023-11-29 15:50:23 +00:00
## Controls 3.5.2.x - nftables
# The default nftables table name is "filter". This variable name will be the one all
# "rhel9cis_nft_tables_tablename" is the name of the table in nftables you want to create.
# nftables configs are applied to.
# options are: inet filter
2023-12-07 22:53:01 +02:00
# Control 3.4.2.2 - Ensure at least one nftables table exists
# This variable governs if a table will be automatically created in nftables. Without a table (no default one), nftables
# will not filter network traffic, so if this variable is set to 'false' and no tables exist, an alarm will be triggered!
2022-01-07 09:06:18 +00:00
rhel9cis_nft_tables_autonewtable : true
2023-12-07 22:53:01 +02:00
# Controls 3.4.2.{2|3|4|6|7} nftables
# This variable stores the name of the table to be used when configuring nftables(creating chains, configuring loopback
# traffic, established connections, default deny). If 'rhel9cis_nft_tables_autonewtable' is set as true, a new table will
# be created using as name the value stored by this variable.
2022-01-07 09:06:18 +00:00
rhel9cis_nft_tables_tablename : filter
2023-12-07 22:53:01 +02:00
# Control 3.4.2.3 - Ensure nftables base chains exist
# This variable governs if a nftables base chain(entry point for packets from the networking stack) will be automatically
# created, if needed. Without a chain, a hook for input, forward, and delete, packets that would flow through those
#chains will not be touched by nftables
2022-01-07 09:06:18 +00:00
rhel9cis_nft_tables_autochaincreate : true
2023-01-23 17:01:27 +00:00
2023-12-07 22:53:01 +02:00
## Controls:
# - 1.7.1 - Ensure message of the day is configured properly
# - 1.7.2 - Ensure local login warning banner is configured properly
# - 1.7.3 - Ensure remote login warning banner is configured properly
2022-01-07 09:06:18 +00:00
# Warning Banner Content (issue, issue.net, motd)
2023-01-20 11:21:31 +00:00
rhel9cis_warning_banner : Authorized uses only. All activity may be monitored and reported.
2022-01-07 09:06:18 +00:00
# End Banner
## Section4 vars
2022-04-01 15:26:13 +01:00
### 4.1 Configure System Accounting
#### 4.1.2 Configure Data Retention
2023-11-29 15:50:23 +00:00
## Controls what actions, when log files fill up
# This variable controls how the audit system behaves when
# log files are getting too full and space is getting too low.
2022-01-07 09:06:18 +00:00
rhel9cis_auditd :
2023-12-07 22:53:01 +02:00
# This variable tells the system what action to take when the system has detected
#that it is starting to get low on disk space. Options are the same as for `admin_space_left_action`
2022-01-07 09:06:18 +00:00
space_left_action : email
2023-12-07 22:53:01 +02:00
# This variable should contain a valid email address or alias(default value is root),
# which will be used to send a warning when configured action is 'email'.
2022-01-07 09:06:18 +00:00
action_mail_acct : root
2023-11-29 15:50:23 +00:00
# This variable determines the action the audit system should take when disk
# space runs low.
# The options for setting this variable are as follows:
# - `ignore`: the system does nothing when presented with the aforementioned issue;
# - `syslog`: a message is sent to the system log about disk space running low;
# - `suspend`: the system suspends recording audit events until more space is available;
# - `halt`: the system is halted when disk space is critically low.
# - `single`: the audit daemon will put the computer system in single user mode
# CIS prescribes either `halt` or `single`.
2022-01-07 09:06:18 +00:00
admin_space_left_action : halt
2023-12-20 21:58:49 +02:00
# The max_log_file parameter should be based on your sites policy.
max_log_file : 10
2023-11-29 15:50:23 +00:00
# This variable determines what action the audit system should take when the maximum
# size of a log file is reached.
# The options for setting this variable are as follows:
# - `ignore`: the system does nothing when the size of a log file is full;
# - `syslog`: a message is sent to the system log indicating the problem;
# - `suspend`: the system suspends recording audit events until the log file is cleared or rotated;
# - `rotate`: the log file is rotated (archived) and a new empty log file is created;
# - `keep_logs`: the system attempts to keep as many logs as possible without violating disk space constraints.
# CIS prescribes the value `keep_logs`.
2022-01-07 09:06:18 +00:00
max_log_file_action : keep_logs
2023-12-20 22:21:14 +02:00
# This value governs if the below extra-vars for auditd should be used by the role
rhel9cis_auditd_extra_conf_usage : false
# This can be used to configure other keys in auditd.conf
# Example:
# rhel9cis_auditd_extra_conf:
# admin_space_left: '10%'
rhel9cis_auditd_extra_conf :
admin_space_left : 50
space_left : 75
2022-01-07 09:06:18 +00:00
# The audit_back_log_limit value should never be below 8192
2023-11-29 15:50:23 +00:00
## Control 4.1.1.4 - Ensure rhel9cis_audit_back_log_limit is sufficient
# This variable represents the audit backlog limit, i.e., the maximum number of audit records that the
# system can buffer in memory, if the audit subsystem is unable to process them in real-time.
# Buffering in memory is useful in situations, where the audit system is overwhelmed
# with incoming audit events, and needs to temporarily store them until they can be processed.
# This variable should be set to a sufficient value. The CIS baseline recommends at least `8192` as value.
2022-01-07 09:06:18 +00:00
rhel9cis_audit_back_log_limit : 8192
2022-06-20 17:05:23 +01:00
### 4.1.3.x audit template
2023-11-29 15:50:23 +00:00
## Control 4.1.2.1 - Ensure audit log storage size is configured
# This variable specifies the maximum size in MB that an audit log file can reach
# before it is archived or deleted to make space for the new audit data.
# This should be set based on your sites policy. CIS does not provide a specific value.
rhel9cis_max_log_file_size : 10
## 4.1.3.x - Audit template
# This variable is set to true by tasks 4.1.3.1 to 4.1.3.20. As a result, the
# audit settings are overwritten with the role's template. In order to exclude
# specific rules, you must set the variable of form `rhel9cis_rule_4_1_3_x` above
# to `false`.
2022-06-20 17:05:23 +01:00
update_audit_template : false
2022-07-26 11:13:29 +01:00
## Advanced option found in auditd post
2023-12-07 22:53:01 +02:00
# This variable governs if defining user exceptions for auditd logging is acceptable.
2023-03-01 09:17:38 +00:00
rhel9cis_allow_auditd_uid_user_exclusions : false
2023-12-07 22:53:01 +02:00
# This variable contains a list of uids to be excluded(users whose actions are not logged by auditd)
2023-11-29 15:50:23 +00:00
rhel9cis_auditd_uid_exclude :
- 1999
2022-07-26 11:13:29 +01:00
2022-04-04 15:15:40 +01:00
## Preferred method of logging
## Whether rsyslog or journald preferred method for local logging
## Affects rsyslog cis 4.2.1.3 and journald cis 4.2.2.5
2023-01-13 13:59:15 +00:00
rhel9cis_syslog : rsyslog
rhel9cis_rsyslog_ansiblemanaged : true
2022-04-04 15:15:40 +01:00
2022-04-01 15:26:13 +01:00
#### 4.2.1.6 remote and destation log server name
2023-01-19 14:51:30 +00:00
rhel9cis_remote_log_server : false
rhel9cis_remote_log_host : logagg.example.com
2023-01-12 11:38:53 +00:00
rhel9cis_remote_log_port : 514
rhel9cis_remote_log_protocol : tcp
rhel9cis_remote_log_retrycount : 100
rhel9cis_remote_log_queuesize : 1000
2022-01-07 09:06:18 +00:00
2022-04-01 15:26:13 +01:00
#### 4.2.1.7
2023-11-29 15:50:23 +00:00
# This variable expresses whether the system is used as a log server or not.
# If set to `true`, controls that interfere with log server functionality or
# require that own system logs be sent to some other log server are skipped.
2022-01-07 09:06:18 +00:00
rhel9cis_system_is_log_server : false
2022-04-01 15:26:13 +01:00
# 4.2.2.1.2
# rhel9cis_journal_upload_url is the ip address to upload the journal entries to
rhel9cis_journal_upload_url : 192.168 .50 .42
2023-11-29 15:50:23 +00:00
## The paths below have the default paths/files, but allow user to create custom paths/filenames
# This variable specifies the path to the private key file used by the remote journal
# server to authenticate itself to the client. This key is used alongside the server's
# public certificate to establish secure communication.
2022-04-01 15:26:13 +01:00
rhel9cis_journal_upload_serverkeyfile : "/etc/ssl/private/journal-upload.pem"
2023-11-29 15:50:23 +00:00
# This variable specifies the path to the public certificate file of the remote journal
# server. This certificate is used to verify the authenticity of the remote server.
2022-04-01 15:26:13 +01:00
rhel9cis_journal_servercertificatefile : "/etc/ssl/certs/journal-upload.pem"
2023-11-29 15:50:23 +00:00
# This variable specifies the path to a file containing one or more public certificates
# of certificate authorities (CAs) that the client trusts. These trusted certificates are used
# to validate the authenticity of the remote server's certificate.
2022-04-01 15:26:13 +01:00
rhel9cis_journal_trustedcertificatefile : "/etc/ssl/ca/trusted.pem"
# 4.2.2.1
# The variables below related to journald, please set these to your site specific values
2023-11-29 15:50:23 +00:00
# These variable specifies how much disk space the journal may use up at most
# Specify values in bytes or use K, M, G, T, P, E as units for the specified sizes.
# See https://www.freedesktop.org/software/systemd/man/journald.conf.html for more information.
# ATTENTION: Uncomment the keyword below when values are set!
2022-04-01 15:26:13 +01:00
# rhel9cis_journald_systemmaxuse is the max amount of disk space the logs will use
rhel9cis_journald_systemmaxuse : 10M
# rhel9cis_journald_systemkeepfree is the amount of disk space to keep free
rhel9cis_journald_systemkeepfree : 100G
2023-11-29 15:50:23 +00:00
# rhel9cis_journald_runtimemaxuse control how much disk space the journal may use up at most.
# same as rhel9cis_journald_systemmaxuse.
2022-04-01 15:26:13 +01:00
rhel9cis_journald_runtimemaxuse : 10M
2023-11-29 15:50:23 +00:00
# rhel9cis_journald_runtimekeepfree is the amount of disk space to keep free
# same as rhel9cis_journald_systemkeepfree.
2022-04-01 15:26:13 +01:00
rhel9cis_journald_runtimekeepfree : 100G
2023-11-29 15:50:23 +00:00
# rhel9cis_journald_MaxFileSec is how long in time to keep log files.
# This variable specifies, the maximum time to store entries in a single journal
# file before rotating to the next one. Set to 0 to turn off this feature.
# The given values is interpreted as seconds, unless suffixed with the units
# `year`, `month`, `week`, `day`, `h` or `m` to override the default time unit of seconds.
# Values are Xm, Xh, Xday, Xweek, Xmonth, Xyear, for example 2week is two weeks
# ATTENTION: Uncomment the keyword below when values are set!
2022-04-01 15:26:13 +01:00
rhel9cis_journald_maxfilesec : 1month
#### 4.3
2023-11-29 15:50:23 +00:00
# This variable defines the log file rotation period.
# Options are: daily, monthly, yearly.
2022-04-01 15:26:13 +01:00
rhel9cis_logrotate : "daily"
2022-01-07 09:06:18 +00:00
## Section5 vars
2023-02-20 11:31:46 +00:00
# This will allow use of drop in files when CIS adopts them.
rhel9_cis_sshd_config_file : /etc/ssh/sshd_config
2022-01-07 09:06:18 +00:00
rhel9cis_sshd :
2023-11-29 15:50:23 +00:00
# This variable sets the maximum number of unresponsive "keep-alive" messages
# that can be sent from the server to the client before the connection is considered
# inactive and thus, closed.
2022-01-07 09:06:18 +00:00
clientalivecountmax : 0
2023-11-29 15:50:23 +00:00
# This variable sets the time interval in seconds between sending "keep-alive"
# messages from the server to the client. These types of messages are intended to
# keep the connection alive and prevent it being terminated due to inactivity.
2022-01-07 09:06:18 +00:00
clientaliveinterval : 900
2023-11-29 15:50:23 +00:00
# This variable specifies the amount of seconds allowed for successful authentication to
# the SSH server.
2022-01-07 09:06:18 +00:00
logingracetime : 60
# WARNING: make sure you understand the precedence when working with these values!!
# allowusers:
# allowgroups: systems dba
# denyusers:
# denygroups:
2023-11-29 15:50:23 +00:00
# This variable, if specified, configures a list of USER name patterns, separated by spaces, to allow SSH
# access for users whose user name matches one of the patterns. This is done
# by setting the value of `AllowUsers` option in `/etc/ssh/sshd_config` file.
# If an USER@HOST format will be used, the specified user will be allowed only on that particular host.
# The allow/deny directives process order: DenyUsers, AllowUsers, DenyGroups, AllowGroups.
# For more info, see https://linux.die.net/man/5/sshd_config
allow_users : ""
# (String) This variable, if spcieifed, configures a list of GROUP name patterns, separated by spaces, to allow SSH access
# for users whose primary group or supplementary group list matches one of the patterns. This is done
# by setting the value of `AllowGroups` option in `/etc/ssh/sshd_config` file.
# The allow/deny directives process order: DenyUsers, AllowUsers, DenyGroups, AllowGroups.
# For more info, https://linux.die.net/man/5/sshd_config
allow_groups : "wheel"
# This variable, if specified, configures a list of USER name patterns, separated by spaces, to prevent SSH access
# for users whose user name matches one of the patterns. This is done
# by setting the value of `DenyUsers` option in `/etc/ssh/sshd_config` file.
# If an USER@HOST format will be used, the specified user will be restricted only on that particular host.
# The allow/deny directives process order: DenyUsers, AllowUsers, DenyGroups, AllowGroups.
# For more info, see https://linux.die.net/man/5/sshd_config
deny_users : "nobody"
# This variable, if specified, configures a list of GROUP name patterns, separated by spaces, to prevent SSH access
# for users whose primary group or supplementary group list matches one of the patterns. This is done
# by setting the value of `DenyGroups` option in `/etc/ssh/sshd_config` file.
# The allow/deny directives process order: DenyUsers, AllowUsers, DenyGroups, AllowGroups.
# For more info, see https://linux.die.net/man/5/sshd_config
deny_groups : ""
# 5.2.5 SSH LogLevel setting.
# This variable is used to control the verbosity of the logging produced by the SSH server.
# The options for setting it are as follows:
# - `QUIET`: Minimal logging;
# - `FATAL`: logs only fatal errors;
# - `ERROR`: logs error messages;
# - `INFO`: logs informational messages in addition to errors;
# - `VERBOSE`: logs a higher level of detail, including login attempts and key exchanges;
# - `DEBUG`: generates very detailed debugging information including sensitive information.
# - `DEBUG(x)`: Whereas x = debug level 1 to 3, DEBUG=DEBUG1.
2022-01-07 09:06:18 +00:00
rhel9cis_ssh_loglevel : INFO
# 5.2.19 SSH MaxSessions setting. Must be 4 our less
rhel9cis_ssh_maxsessions : 4
2023-11-29 15:50:23 +00:00
## Control 5.5.1.4
# This variable specifies the number of days of inactivity before an account will be locked.
# CIS requires a value of 30 days or less.
2022-01-07 09:06:18 +00:00
rhel9cis_inactivelock :
lock_days : 30
2022-04-01 15:26:13 +01:00
rhel9cis_use_authconfig : false
2022-01-07 09:06:18 +00:00
# 5.3.1/5.3.2 Custom authselect profile settings. Settings in place now will fail, they are place holders from the control example
# Due to the way many multiple options and ways to configure this control needs to be enabled and settings adjusted to minimise risk
rhel9cis_authselect :
custom_profile_name : custom-profile
default_file_to_copy : "sssd --symlink-meta"
options : with-sudo with-faillock without-nullok
# 5.3.1 Enable automation to create custom profile settings, using the settings above
rhel9cis_authselect_custom_profile_create : false
# 5.3.2 Enable automation to select custom profile options, using the settings above
rhel9cis_authselect_custom_profile_select : false
2023-11-29 15:50:23 +00:00
## Controls 5.5.1.x - Password settings
2022-01-07 09:06:18 +00:00
rhel9cis_pass :
2023-11-29 15:50:23 +00:00
## Control 5.5.1.2
# This variable governs after how many days a password expires.
# CIS requires a value of 365 or less.
2022-01-07 09:06:18 +00:00
max_days : 365
2023-11-29 15:50:23 +00:00
## Control 5.5.1.1
# This variable specifies the minimum number of days allowed between changing passwords.
# CIS requires a value of at least 1.
2022-01-07 09:06:18 +00:00
min_days : 7
2023-11-29 15:50:23 +00:00
## Control 5.5.1.3
# This variable governs, how many days before a password expires, the user will be warned.
# CIS requires a value of at least 7.
2022-01-07 09:06:18 +00:00
warn_age : 7
2022-04-04 19:31:02 +01:00
# 5.5.1
2022-01-07 09:06:18 +00:00
## PAM
2022-04-06 16:31:57 +01:00
rhel9cis_pam_password :
2023-11-29 15:50:23 +00:00
# This variable sets the minimum chars a password needs to be set.
2022-04-06 16:31:57 +01:00
minlen : 14
2023-11-29 15:50:23 +00:00
# This variable set password complexity,the minimum number of
# character types that must be used (i.e., uppercase, lowercase, digits, other)
# Set to 2, passwords cannot have all lower/upper case.
# Set to 3, passwords needs numbers.
# set to 4, passwords will have to include all four types of characters.
2022-04-06 16:31:57 +01:00
minclass : 4
2022-04-04 19:31:02 +01:00
rhel9cis_pam_faillock :
2023-11-29 15:50:23 +00:00
# This variable sets the amount of time a user will be unlocked after
# the max amount of password failures.
2022-05-05 10:28:41 -04:00
unlock_time : 900
2023-11-29 15:50:23 +00:00
# This variable sets the amount of tries a password can be entered, before a user is locked.
2022-05-06 08:36:15 -04:00
deny : 5
2023-11-29 15:50:23 +00:00
# This variable represents the number of password change cycles, after which
# a user can re-use a password.
# CIS requires a value of 5 or more.
2022-05-06 10:59:53 -04:00
remember : 5
2022-01-07 09:06:18 +00:00
2022-02-02 11:25:03 +00:00
# UID settings for interactive users
2022-04-04 19:31:02 +01:00
# These are discovered via logins.def if set true
2022-02-02 11:25:03 +00:00
discover_int_uid : false
2023-11-29 15:50:23 +00:00
# This variable sets the minimum number from which to search for UID
# Note that the value will be dynamically overwritten if variable `dicover_int_uid` has
# been set to `true`.
2022-02-02 11:25:03 +00:00
min_int_uid : 1000
2023-11-29 15:50:23 +00:00
# This variable sets the maximum number at which the search stops for UID
# Note that the value will be dynamically overwritten if variable `dicover_int_uid` has
# been set to `true`.
2022-02-02 11:25:03 +00:00
max_int_uid : 65533
2022-04-01 15:26:13 +01:00
# 5.3.3 var log location variable
2023-11-29 15:50:23 +00:00
# This variable defines the path and file name of the sudo log file.
2022-04-01 15:26:13 +01:00
rhel9cis_sudolog_location : "/var/log/sudo.log"
#### 5.3.6
2023-11-29 15:50:23 +00:00
# This variable sets the duration (in minutes) during which a user's authentication credentials
# are cached after successfully authenticating using "sudo". This allows the user to execute
# multiple commands with elevated privileges without needing to re-enter their password for each
# command within the specified time period. CIS requires a value of at most 15 minutes.
2022-04-01 15:26:13 +01:00
rhel9cis_sudo_timestamp_timeout : 15
2022-01-07 09:06:18 +00:00
2023-01-27 12:19:16 +00:00
### 5.4.2 authselect and faillock
## This option is used at your own risk it will enable faillock for users
## Only to be used on a new clean system if not using authselect
## THIS CAN BREAK ACCESS EVEN FOR ROOT - UNDERSTAND RISKS ##
rhel9cis_add_faillock_without_authselect : false
# This needs to be set to ACCEPT
rhel9cis_5_4_2_risks : NEVER
2022-01-07 09:06:18 +00:00
# RHEL-09-5.4.5
# Session timeout setting file (TMOUT setting can be set in multiple files)
# Timeout value is in seconds. (60 seconds * 10 = 600)
rhel9cis_shell_session_timeout :
2023-11-29 15:50:23 +00:00
# This variable specifies the path of the timeout setting file.
# (TMOUT setting can be set in multiple files, but only one is required for the
# rule to pass. Options are:
# - a file in `/etc/profile.d/` ending in `.s`,
# - `/etc/profile`, or
# - `/etc/bash.bashrc`.
2022-01-07 09:06:18 +00:00
file : /etc/profile.d/tmout.sh
2023-11-29 15:50:23 +00:00
# This variable represents the amount of seconds a command or process is allowed to
# run before being forcefully terminated.
# CIS requires a value of at most 900 seconds.
2022-01-07 09:06:18 +00:00
timeout : 600
# RHEL-09-5.4.1.5 Allow ansible to expire password for account with a last changed date in the future. False will just display users in violation, true will expire those users passwords
rhel9cis_futurepwchgdate_autofix : true
2023-03-13 09:44:51 +00:00
# 5.3.7
2023-11-29 15:50:23 +00:00
# This variable determines the group of users that are allowed to use the su command.
# one to specify a user group that is allowed to use the "su" command.
# CIS requires that such a group be created (named according to site policy) and be kept empty.
2023-03-13 09:44:51 +00:00
rhel9cis_sugroup : nosugroup
2022-01-07 09:06:18 +00:00
## Section6 vars
# RHEL-09_6.1.1
rhel9cis_rpm_audit_file : /var/tmp/rpm_file_check
# RHEL-09_6.1.10 Allow ansible to adjust world-writable files. False will just display world-writable files, True will remove world-writable
rhel9cis_no_world_write_adjust : true
rhel9cis_passwd_label : "{{ (this_item | default(item)).id }}: {{ (this_item | default(item)).dir }}"
2023-02-14 08:54:21 +00:00
# 6.2.16
## Dont follow symlinks for changes to user home directory thanks to @dulin-gnet and comminty for rhel8-cis reedbacj
rhel_09_6_2_16_home_follow_symlinks : false
2022-01-07 09:06:18 +00:00
#### Goss Configuration Settings ####
2022-05-03 10:22:00 +01:00
# Set correct env for the run_audit.sh script from https://github.com/ansible-lockdown/{{ benchmark }}-Audit.git"
audit_run_script_environment :
AUDIT_BIN : "{{ audit_bin }}"
AUDIT_FILE : 'goss.yml'
AUDIT_CONTENT_LOCATION : "{{ audit_out_dir }}"