Blame SOURCES/scap-security-guide-0.1.58-rhel7_cis_kickstarts-PR_7382.patch

889f2b
From ee2da171d5a76202b2aef8231c5af6f97ef156ef Mon Sep 17 00:00:00 2001
889f2b
From: Vojtech Polasek <vpolasek@redhat.com>
889f2b
Date: Thu, 12 Aug 2021 10:36:30 +0200
889f2b
Subject: [PATCH 1/2] add rhel7 kickstarts for cis
889f2b
889f2b
---
889f2b
 products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg |   4 +-
889f2b
 .../kickstart/ssg-rhel7-cis_server_l1-ks.cfg  | 136 ++++++++++++++++
889f2b
 .../ssg-rhel7-cis_workstation_l1-ks.cfg       | 137 ++++++++++++++++
889f2b
 .../ssg-rhel7-cis_workstation_l2-ks.cfg       | 147 ++++++++++++++++++
889f2b
 4 files changed, 422 insertions(+), 2 deletions(-)
889f2b
 create mode 100644 products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg
889f2b
 create mode 100644 products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg
889f2b
 create mode 100644 products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg
889f2b
889f2b
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
889f2b
index 6ead435b978..00edb9d536c 100644
889f2b
--- a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
889f2b
+++ b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
889f2b
@@ -1,6 +1,6 @@
889f2b
-# SCAP Security Guide CIS profile kickstart for Red Hat Enterprise Linux 7 Server
889f2b
+# SCAP Security Guide CIS profile (Leve 2 - Server) kickstart for Red Hat Enterprise Linux 7 Server
889f2b
 # Version: 0.0.1
889f2b
-# Date: 2020-03-30
889f2b
+# Date: 2021-08-12
889f2b
 #
889f2b
 # Based on:
889f2b
 # https://pykickstart.readthedocs.io/en/latest/
889f2b
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg
889f2b
new file mode 100644
889f2b
index 00000000000..333105c4f9e
889f2b
--- /dev/null
889f2b
+++ b/products/rhel7/kickstart/ssg-rhel7-cis_server_l1-ks.cfg
889f2b
@@ -0,0 +1,136 @@
889f2b
+# SCAP Security Guide CIS profile (Level 1 - Server) kickstart for Red Hat Enterprise Linux 7 Server
889f2b
+# Version: 0.0.1
889f2b
+# Date: 2021-08-12
889f2b
+#
889f2b
+# Based on:
889f2b
+# https://pykickstart.readthedocs.io/en/latest/
889f2b
+# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
889f2b
+
889f2b
+# Install a fresh new system (optional)
889f2b
+install
889f2b
+
889f2b
+# Specify installation method to use for installation
889f2b
+# To use a different one comment out the 'url' one below, update
889f2b
+# the selected choice with proper options & un-comment it
889f2b
+#
889f2b
+# Install from an installation tree on a remote server via FTP or HTTP:
889f2b
+# --url		the URL to install from
889f2b
+#
889f2b
+# Example:
889f2b
+#
889f2b
+# url --url=http://192.168.122.1/image
889f2b
+#
889f2b
+# Modify concrete URL in the above example appropriately to reflect the actual
889f2b
+# environment machine is to be installed in
889f2b
+#
889f2b
+# Other possible / supported installation methods:
889f2b
+# * install from the first CD-ROM/DVD drive on the system:
889f2b
+#
889f2b
+# cdrom
889f2b
+#
889f2b
+# * install from a directory of ISO images on a local drive:
889f2b
+#
889f2b
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
889f2b
+#
889f2b
+# * install from provided NFS server:
889f2b
+#
889f2b
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
889f2b
+#
889f2b
+
889f2b
+# Set language to use during installation and the default language to use on the installed system (required)
889f2b
+lang en_US.UTF-8
889f2b
+
889f2b
+# Set system keyboard type / layout (required)
889f2b
+keyboard us
889f2b
+
889f2b
+# Configure network information for target system and activate network devices in the installer environment (optional)
889f2b
+# --onboot	enable device at a boot time
889f2b
+# --device	device to be activated and / or configured with the network command
889f2b
+# --bootproto	method to obtain networking configuration for device (default dhcp)
889f2b
+# --noipv6	disable IPv6 on this device
889f2b
+#
889f2b
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
889f2b
+#       "--bootproto=static" must be used. For example:
889f2b
+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
889f2b
+#
889f2b
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
889f2b
+
889f2b
+# Set the system's root password (required)
889f2b
+# Plaintext password is: server
889f2b
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
889f2b
+# encrypted password form for different plaintext password
889f2b
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
889f2b
+
889f2b
+# The selected profile will restrict root login
889f2b
+# Add a user that can login and escalate privileges
889f2b
+# Plaintext password is: admin123
889f2b
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
889f2b
+
889f2b
+# Configure firewall settings for the system (optional)
889f2b
+# --enabled	reject incoming connections that are not in response to outbound requests
889f2b
+# --ssh		allow sshd service through the firewall
889f2b
+firewall --enabled --ssh
889f2b
+
889f2b
+# Set up the authentication options for the system (required)
889f2b
+# --enableshadow	enable shadowed passwords by default
889f2b
+# --passalgo		hash / crypt algorithm for new passwords
889f2b
+# See the manual page for authconfig for a complete list of possible options.
889f2b
+authconfig --enableshadow --passalgo=sha512
889f2b
+
889f2b
+# State of SELinux on the installed system (optional)
889f2b
+# Defaults to enforcing
889f2b
+selinux --enforcing
889f2b
+
889f2b
+# Set the system time zone (required)
889f2b
+timezone --utc America/New_York
889f2b
+
889f2b
+# Specify how the bootloader should be installed (required)
889f2b
+# Plaintext password is: password
889f2b
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
889f2b
+# encrypted password form for different plaintext password
889f2b
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0
889f2b
+
889f2b
+# Initialize (format) all disks (optional)
889f2b
+zerombr
889f2b
+
889f2b
+# The following partition layout scheme assumes disk of size 20GB or larger
889f2b
+# Modify size of partitions appropriately to reflect actual machine's hardware
889f2b
+#
889f2b
+# Remove Linux partitions from the system prior to creating new ones (optional)
889f2b
+# --linux	erase all Linux partitions
889f2b
+# --initlabel	initialize the disk label to the default based on the underlying architecture
889f2b
+clearpart --linux --initlabel
889f2b
+
889f2b
+# Create primary system partitions (required for installs)
889f2b
+part /boot --fstype=xfs --size=512
889f2b
+part pv.01 --grow --size=1
889f2b
+
889f2b
+# Create a Logical Volume Management (LVM) group (optional)
889f2b
+volgroup VolGroup --pesize=4096 pv.01
889f2b
+
889f2b
+# Create particular logical volumes (optional)
889f2b
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=11264 --grow
889f2b
+# Ensure /tmp Located On Separate Partition
889f2b
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
889f2b
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
889f2b
+
889f2b
+
889f2b
+# Harden installation with CIS profile
889f2b
+# For more details and configuration options see command %addon org_fedora_oscap in
889f2b
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-commands
889f2b
+%addon org_fedora_oscap
889f2b
+        content-type = scap-security-guide
889f2b
+        profile = xccdf_org.ssgproject.content_profile_cis_server_l1
889f2b
+%end
889f2b
+
889f2b
+# Packages selection (%packages section is required)
889f2b
+%packages
889f2b
+
889f2b
+# Require @Base
889f2b
+@Base
889f2b
+
889f2b
+%end # End of %packages section
889f2b
+
889f2b
+# Reboot after the installation is complete (optional)
889f2b
+# --eject	attempt to eject CD or DVD media before rebooting
889f2b
+reboot --eject
889f2b
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg
889f2b
new file mode 100644
889f2b
index 00000000000..7ca9fe8558b
889f2b
--- /dev/null
889f2b
+++ b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l1-ks.cfg
889f2b
@@ -0,0 +1,137 @@
889f2b
+# SCAP Security Guide CIS profile (Level 1 - Workstation) kickstart for Red Hat Enterprise Linux 7 Server
889f2b
+# Version: 0.0.1
889f2b
+# Date: 2021-08-12
889f2b
+#
889f2b
+# Based on:
889f2b
+# https://pykickstart.readthedocs.io/en/latest/
889f2b
+# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
889f2b
+
889f2b
+# Install a fresh new system (optional)
889f2b
+install
889f2b
+
889f2b
+# Specify installation method to use for installation
889f2b
+# To use a different one comment out the 'url' one below, update
889f2b
+# the selected choice with proper options & un-comment it
889f2b
+#
889f2b
+# Install from an installation tree on a remote server via FTP or HTTP:
889f2b
+# --url		the URL to install from
889f2b
+#
889f2b
+# Example:
889f2b
+#
889f2b
+# url --url=http://192.168.122.1/image
889f2b
+#
889f2b
+# Modify concrete URL in the above example appropriately to reflect the actual
889f2b
+# environment machine is to be installed in
889f2b
+#
889f2b
+# Other possible / supported installation methods:
889f2b
+# * install from the first CD-ROM/DVD drive on the system:
889f2b
+#
889f2b
+# cdrom
889f2b
+#
889f2b
+# * install from a directory of ISO images on a local drive:
889f2b
+#
889f2b
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
889f2b
+#
889f2b
+# * install from provided NFS server:
889f2b
+#
889f2b
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
889f2b
+#
889f2b
+
889f2b
+# Set language to use during installation and the default language to use on the installed system (required)
889f2b
+lang en_US.UTF-8
889f2b
+
889f2b
+# Set system keyboard type / layout (required)
889f2b
+keyboard us
889f2b
+
889f2b
+# Configure network information for target system and activate network devices in the installer environment (optional)
889f2b
+# --onboot	enable device at a boot time
889f2b
+# --device	device to be activated and / or configured with the network command
889f2b
+# --bootproto	method to obtain networking configuration for device (default dhcp)
889f2b
+# --noipv6	disable IPv6 on this device
889f2b
+#
889f2b
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
889f2b
+#       "--bootproto=static" must be used. For example:
889f2b
+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
889f2b
+#
889f2b
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
889f2b
+
889f2b
+# Set the system's root password (required)
889f2b
+# Plaintext password is: server
889f2b
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
889f2b
+# encrypted password form for different plaintext password
889f2b
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
889f2b
+
889f2b
+# The selected profile will restrict root login
889f2b
+# Add a user that can login and escalate privileges
889f2b
+# Plaintext password is: admin123
889f2b
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
889f2b
+
889f2b
+# Configure firewall settings for the system (optional)
889f2b
+# --enabled	reject incoming connections that are not in response to outbound requests
889f2b
+# --ssh		allow sshd service through the firewall
889f2b
+firewall --enabled --ssh
889f2b
+
889f2b
+# Set up the authentication options for the system (required)
889f2b
+# --enableshadow	enable shadowed passwords by default
889f2b
+# --passalgo		hash / crypt algorithm for new passwords
889f2b
+# See the manual page for authconfig for a complete list of possible options.
889f2b
+authconfig --enableshadow --passalgo=sha512
889f2b
+
889f2b
+# State of SELinux on the installed system (optional)
889f2b
+# Defaults to enforcing
889f2b
+selinux --enforcing
889f2b
+
889f2b
+# Set the system time zone (required)
889f2b
+timezone --utc America/New_York
889f2b
+
889f2b
+# Specify how the bootloader should be installed (required)
889f2b
+# Plaintext password is: password
889f2b
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
889f2b
+# encrypted password form for different plaintext password
889f2b
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0
889f2b
+
889f2b
+# Initialize (format) all disks (optional)
889f2b
+zerombr
889f2b
+
889f2b
+# The following partition layout scheme assumes disk of size 20GB or larger
889f2b
+# Modify size of partitions appropriately to reflect actual machine's hardware
889f2b
+#
889f2b
+# Remove Linux partitions from the system prior to creating new ones (optional)
889f2b
+# --linux	erase all Linux partitions
889f2b
+# --initlabel	initialize the disk label to the default based on the underlying architecture
889f2b
+clearpart --linux --initlabel
889f2b
+
889f2b
+# Create primary system partitions (required for installs)
889f2b
+part /boot --fstype=xfs --size=512
889f2b
+part pv.01 --grow --size=1
889f2b
+
889f2b
+# Create a Logical Volume Management (LVM) group (optional)
889f2b
+volgroup VolGroup --pesize=4096 pv.01
889f2b
+
889f2b
+# Create particular logical volumes (optional)
889f2b
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=11264 --grow
889f2b
+# Ensure /tmp Located On Separate Partition
889f2b
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
889f2b
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
889f2b
+
889f2b
+
889f2b
+
889f2b
+# Harden installation with CIS profile
889f2b
+# For more details and configuration options see command %addon org_fedora_oscap in
889f2b
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-commands
889f2b
+%addon org_fedora_oscap
889f2b
+        content-type = scap-security-guide
889f2b
+        profile = xccdf_org.ssgproject.content_profile_cis_workstation_l1
889f2b
+%end
889f2b
+
889f2b
+# Packages selection (%packages section is required)
889f2b
+%packages
889f2b
+
889f2b
+# Require @Base
889f2b
+@Base
889f2b
+
889f2b
+%end # End of %packages section
889f2b
+
889f2b
+# Reboot after the installation is complete (optional)
889f2b
+# --eject	attempt to eject CD or DVD media before rebooting
889f2b
+reboot --eject
889f2b
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg
889f2b
new file mode 100644
889f2b
index 00000000000..b9bff5f390e
889f2b
--- /dev/null
889f2b
+++ b/products/rhel7/kickstart/ssg-rhel7-cis_workstation_l2-ks.cfg
889f2b
@@ -0,0 +1,147 @@
889f2b
+# SCAP Security Guide CIS profile (Level 2 - Workstation) kickstart for Red Hat Enterprise Linux 7 Server
889f2b
+# Version: 0.0.1
889f2b
+# Date: 2021-08-12
889f2b
+#
889f2b
+# Based on:
889f2b
+# https://pykickstart.readthedocs.io/en/latest/
889f2b
+# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html
889f2b
+
889f2b
+# Install a fresh new system (optional)
889f2b
+install
889f2b
+
889f2b
+# Specify installation method to use for installation
889f2b
+# To use a different one comment out the 'url' one below, update
889f2b
+# the selected choice with proper options & un-comment it
889f2b
+#
889f2b
+# Install from an installation tree on a remote server via FTP or HTTP:
889f2b
+# --url		the URL to install from
889f2b
+#
889f2b
+# Example:
889f2b
+#
889f2b
+# url --url=http://192.168.122.1/image
889f2b
+#
889f2b
+# Modify concrete URL in the above example appropriately to reflect the actual
889f2b
+# environment machine is to be installed in
889f2b
+#
889f2b
+# Other possible / supported installation methods:
889f2b
+# * install from the first CD-ROM/DVD drive on the system:
889f2b
+#
889f2b
+# cdrom
889f2b
+#
889f2b
+# * install from a directory of ISO images on a local drive:
889f2b
+#
889f2b
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
889f2b
+#
889f2b
+# * install from provided NFS server:
889f2b
+#
889f2b
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
889f2b
+#
889f2b
+
889f2b
+# Set language to use during installation and the default language to use on the installed system (required)
889f2b
+lang en_US.UTF-8
889f2b
+
889f2b
+# Set system keyboard type / layout (required)
889f2b
+keyboard us
889f2b
+
889f2b
+# Configure network information for target system and activate network devices in the installer environment (optional)
889f2b
+# --onboot	enable device at a boot time
889f2b
+# --device	device to be activated and / or configured with the network command
889f2b
+# --bootproto	method to obtain networking configuration for device (default dhcp)
889f2b
+# --noipv6	disable IPv6 on this device
889f2b
+#
889f2b
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
889f2b
+#       "--bootproto=static" must be used. For example:
889f2b
+# network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
889f2b
+#
889f2b
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
889f2b
+
889f2b
+# Set the system's root password (required)
889f2b
+# Plaintext password is: server
889f2b
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
889f2b
+# encrypted password form for different plaintext password
889f2b
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
889f2b
+
889f2b
+# The selected profile will restrict root login
889f2b
+# Add a user that can login and escalate privileges
889f2b
+# Plaintext password is: admin123
889f2b
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
889f2b
+
889f2b
+# Configure firewall settings for the system (optional)
889f2b
+# --enabled	reject incoming connections that are not in response to outbound requests
889f2b
+# --ssh		allow sshd service through the firewall
889f2b
+firewall --enabled --ssh
889f2b
+
889f2b
+# Set up the authentication options for the system (required)
889f2b
+# --enableshadow	enable shadowed passwords by default
889f2b
+# --passalgo		hash / crypt algorithm for new passwords
889f2b
+# See the manual page for authconfig for a complete list of possible options.
889f2b
+authconfig --enableshadow --passalgo=sha512
889f2b
+
889f2b
+# State of SELinux on the installed system (optional)
889f2b
+# Defaults to enforcing
889f2b
+selinux --enforcing
889f2b
+
889f2b
+# Set the system time zone (required)
889f2b
+timezone --utc America/New_York
889f2b
+
889f2b
+# Specify how the bootloader should be installed (required)
889f2b
+# Plaintext password is: password
889f2b
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
889f2b
+# encrypted password form for different plaintext password
889f2b
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$zCPaBARiNlBYUAS7$40phthWpqvaPVz3QUeIK6n5qoazJDJD5Nlc9OKy5SyYoX9Rt4jFaLjzqJCwpgR4RVAEFSADsqQot0WKs5qNto0
889f2b
+
889f2b
+# Initialize (format) all disks (optional)
889f2b
+zerombr
889f2b
+
889f2b
+# The following partition layout scheme assumes disk of size 20GB or larger
889f2b
+# Modify size of partitions appropriately to reflect actual machine's hardware
889f2b
+#
889f2b
+# Remove Linux partitions from the system prior to creating new ones (optional)
889f2b
+# --linux	erase all Linux partitions
889f2b
+# --initlabel	initialize the disk label to the default based on the underlying architecture
889f2b
+clearpart --linux --initlabel
889f2b
+
889f2b
+# Create primary system partitions (required for installs)
889f2b
+part /boot --fstype=xfs --size=512
889f2b
+part pv.01 --grow --size=1
889f2b
+
889f2b
+# Create a Logical Volume Management (LVM) group (optional)
889f2b
+volgroup VolGroup --pesize=4096 pv.01
889f2b
+
889f2b
+# Create particular logical volumes (optional)
889f2b
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=11264 --grow
889f2b
+# Ensure /home Located On Separate Partition
889f2b
+logvol /home --fstype=xfs --name=LogVol02 --vgname=VolGroup --size=1024 --fsoptions="nodev"
889f2b
+# Ensure /tmp Located On Separate Partition
889f2b
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
889f2b
+# Ensure /var/tmp Located On Separate Partition
889f2b
+logvol /var/tmp --fstype=xfs --name=LogVol7 --vgname=VolGroup --size=1024 --fsoptions="nodev,nosuid,noexec"
889f2b
+# Ensure /var Located On Separate Partition
889f2b
+logvol /var --fstype=xfs --name=LogVol03 --vgname=VolGroup --size=2048
889f2b
+# Ensure /var/log Located On Separate Partition
889f2b
+logvol /var/log --fstype=xfs --name=LogVol04 --vgname=VolGroup --size=1024
889f2b
+# Ensure /var/log/audit Located On Separate Partition
889f2b
+logvol /var/log/audit --fstype=xfs --name=LogVol05 --vgname=VolGroup --size=512
889f2b
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
889f2b
+
889f2b
+
889f2b
+
889f2b
+# Harden installation with CIS profile
889f2b
+# For more details and configuration options see command %addon org_fedora_oscap in
889f2b
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-commands
889f2b
+%addon org_fedora_oscap
889f2b
+        content-type = scap-security-guide
889f2b
+        profile = xccdf_org.ssgproject.content_profile_cis_workstation_l2
889f2b
+%end
889f2b
+
889f2b
+# Packages selection (%packages section is required)
889f2b
+%packages
889f2b
+
889f2b
+# Require @Base
889f2b
+@Base
889f2b
+
889f2b
+%end # End of %packages section
889f2b
+
889f2b
+# Reboot after the installation is complete (optional)
889f2b
+# --eject	attempt to eject CD or DVD media before rebooting
889f2b
+reboot --eject
889f2b
889f2b
From 92e84a2c1b302291aa8ffbc08ae3e4ffabd5dfe7 Mon Sep 17 00:00:00 2001
889f2b
From: Gabriel Becker <ggasparb@redhat.com>
889f2b
Date: Wed, 18 Aug 2021 14:24:34 +0200
889f2b
Subject: [PATCH 2/2] Fix typo in the CIS kickstart
889f2b
MIME-Version: 1.0
889f2b
Content-Type: text/plain; charset=UTF-8
889f2b
Content-Transfer-Encoding: 8bit
889f2b
889f2b
Co-authored-by: Jan Černý <jcerny@redhat.com>
889f2b
---
889f2b
 products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg | 2 +-
889f2b
 1 file changed, 1 insertion(+), 1 deletion(-)
889f2b
889f2b
diff --git a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
889f2b
index 00edb9d536c..7062e2974ad 100644
889f2b
--- a/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
889f2b
+++ b/products/rhel7/kickstart/ssg-rhel7-cis-ks.cfg
889f2b
@@ -1,4 +1,4 @@
889f2b
-# SCAP Security Guide CIS profile (Leve 2 - Server) kickstart for Red Hat Enterprise Linux 7 Server
889f2b
+# SCAP Security Guide CIS profile (Level 2 - Server) kickstart for Red Hat Enterprise Linux 7 Server
889f2b
 # Version: 0.0.1
889f2b
 # Date: 2021-08-12
889f2b
 #