Blame SOURCES/scap-security-guide-0.1.58-ism_ks-PR_7392.patch

9be3b2
From 86e1556555fde19d3b6bfa7e280c8d9faf6243d3 Mon Sep 17 00:00:00 2001
9be3b2
From: Matej Tyc <matyc@redhat.com>
9be3b2
Date: Mon, 16 Aug 2021 13:08:10 +0200
9be3b2
Subject: [PATCH] Add ISM Official kickstarts
a8c580
a8c580
---
9be3b2
 .../rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg    | 116 ++++++++++++++++++
9be3b2
 .../rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg    | 116 ++++++++++++++++++
9be3b2
 2 files changed, 232 insertions(+)
9be3b2
 create mode 100644 products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg
9be3b2
 create mode 100644 products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg
a8c580
9be3b2
diff --git a/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg b/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg
a8c580
new file mode 100644
9be3b2
index 0000000000..d84d98b12d
a8c580
--- /dev/null
9be3b2
+++ b/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg
9be3b2
@@ -0,0 +1,116 @@
9be3b2
+# SCAP Security Guide ISM Official profile kickstart for Red Hat Enterprise Linux 8 Server
9be3b2
+# Version: 0.0.1
9be3b2
+# Date: 2021-08-16
9be3b2
+#
9be3b2
+# Based on:
9be3b2
+# https://pykickstart.readthedocs.io/en/latest/
9be3b2
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart
a8c580
+
a8c580
+# Specify installation method to use for installation
a8c580
+# To use a different one comment out the 'url' one below, update
a8c580
+# the selected choice with proper options & un-comment it
a8c580
+#
a8c580
+# Install from an installation tree on a remote server via FTP or HTTP:
a8c580
+# --url		the URL to install from
a8c580
+#
a8c580
+# Example:
a8c580
+#
a8c580
+# url --url=http://192.168.122.1/image
a8c580
+#
a8c580
+# Modify concrete URL in the above example appropriately to reflect the actual
a8c580
+# environment machine is to be installed in
a8c580
+#
a8c580
+# Other possible / supported installation methods:
a8c580
+# * install from the first CD-ROM/DVD drive on the system:
a8c580
+#
a8c580
+# cdrom
a8c580
+#
a8c580
+# * install from a directory of ISO images on a local drive:
a8c580
+#
a8c580
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
a8c580
+#
a8c580
+# * install from provided NFS server:
a8c580
+#
a8c580
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
a8c580
+#
a8c580
+
a8c580
+# Set language to use during installation and the default language to use on the installed system (required)
a8c580
+lang en_US.UTF-8
a8c580
+
a8c580
+# Set system keyboard type / layout (required)
a8c580
+keyboard us
a8c580
+
a8c580
+# Configure network information for target system and activate network devices in the installer environment (optional)
a8c580
+# --onboot	enable device at a boot time
a8c580
+# --device	device to be activated and / or configured with the network command
a8c580
+# --bootproto	method to obtain networking configuration for device (default dhcp)
a8c580
+# --noipv6	disable IPv6 on this device
a8c580
+#
a8c580
+#
a8c580
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
a8c580
+
a8c580
+# Set the system's root password (required)
a8c580
+# Plaintext password is: server
9be3b2
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
a8c580
+# encrypted password form for different plaintext password
9be3b2
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
9be3b2
+
9be3b2
+# The selected profile will restrict root login
9be3b2
+# Add a user that can login and escalate privileges
9be3b2
+# Plaintext password is: admin123
9be3b2
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
a8c580
+
a8c580
+# Configure firewall settings for the system (optional)
a8c580
+# --enabled	reject incoming connections that are not in response to outbound requests
a8c580
+# --ssh		allow sshd service through the firewall
a8c580
+firewall --enabled --ssh
a8c580
+
a8c580
+# Set up the authentication options for the system (required)
9be3b2
+# sssd profile sets sha512 to hash passwords
9be3b2
+# passwords are shadowed by default
9be3b2
+# See the manual page for authselect-profile for a complete list of possible options.
9be3b2
+authselect select sssd
a8c580
+
a8c580
+# State of SELinux on the installed system (optional)
a8c580
+# Defaults to enforcing
a8c580
+selinux --enforcing
a8c580
+
a8c580
+# Set the system time zone (required)
a8c580
+timezone --utc America/New_York
a8c580
+
a8c580
+# Specify how the bootloader should be installed (required)
9be3b2
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet"
a8c580
+
a8c580
+# Initialize (format) all disks (optional)
a8c580
+zerombr
a8c580
+
a8c580
+# The following partition layout scheme assumes disk of size 20GB or larger
a8c580
+# Modify size of partitions appropriately to reflect actual machine's hardware
9be3b2
+# 
a8c580
+# Remove Linux partitions from the system prior to creating new ones (optional)
a8c580
+# --linux	erase all Linux partitions
a8c580
+# --initlabel	initialize the disk label to the default based on the underlying architecture
a8c580
+clearpart --linux --initlabel
a8c580
+
a8c580
+# Create primary system partitions (required for installs)
9be3b2
+autopart
9be3b2
+
9be3b2
+# Harden installation with Essential Eight profile
9be3b2
+# For more details and configuration options see
9be3b2
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program
a8c580
+%addon org_fedora_oscap
a8c580
+        content-type = scap-security-guide
9be3b2
+        profile = xccdf_org.ssgproject.content_profile_ism_o
a8c580
+%end
a8c580
+
a8c580
+# Packages selection (%packages section is required)
a8c580
+%packages
a8c580
+
a8c580
+# Require @Base
a8c580
+@Base
a8c580
+
a8c580
+%end # End of %packages section
a8c580
+
a8c580
+# Reboot after the installation is complete (optional)
a8c580
+# --eject	attempt to eject CD or DVD media before rebooting
a8c580
+reboot --eject
9be3b2
diff --git a/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg
a8c580
new file mode 100644
9be3b2
index 0000000000..517919539a
a8c580
--- /dev/null
9be3b2
+++ b/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg
9be3b2
@@ -0,0 +1,116 @@
9be3b2
+# SCAP Security Guide ISM Official profile kickstart for Red Hat Enterprise Linux 9 Server
9be3b2
+# Version: 0.0.1
9be3b2
+# Date: 2021-08-16
9be3b2
+#
9be3b2
+# Based on:
9be3b2
+# https://pykickstart.readthedocs.io/en/latest/
9be3b2
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#performing_an_automated_installation_using_kickstart
a8c580
+
a8c580
+# Specify installation method to use for installation
a8c580
+# To use a different one comment out the 'url' one below, update
a8c580
+# the selected choice with proper options & un-comment it
a8c580
+#
a8c580
+# Install from an installation tree on a remote server via FTP or HTTP:
a8c580
+# --url		the URL to install from
a8c580
+#
a8c580
+# Example:
a8c580
+#
a8c580
+# url --url=http://192.168.122.1/image
a8c580
+#
a8c580
+# Modify concrete URL in the above example appropriately to reflect the actual
a8c580
+# environment machine is to be installed in
a8c580
+#
a8c580
+# Other possible / supported installation methods:
a8c580
+# * install from the first CD-ROM/DVD drive on the system:
a8c580
+#
a8c580
+# cdrom
a8c580
+#
a8c580
+# * install from a directory of ISO images on a local drive:
a8c580
+#
a8c580
+# harddrive --partition=hdb2 --dir=/tmp/install-tree
a8c580
+#
a8c580
+# * install from provided NFS server:
a8c580
+#
a8c580
+# nfs --server=<hostname> --dir=<directory> [--opts=<nfs options>]
a8c580
+#
a8c580
+
a8c580
+# Set language to use during installation and the default language to use on the installed system (required)
a8c580
+lang en_US.UTF-8
a8c580
+
a8c580
+# Set system keyboard type / layout (required)
a8c580
+keyboard us
a8c580
+
a8c580
+# Configure network information for target system and activate network devices in the installer environment (optional)
a8c580
+# --onboot	enable device at a boot time
a8c580
+# --device	device to be activated and / or configured with the network command
a8c580
+# --bootproto	method to obtain networking configuration for device (default dhcp)
a8c580
+# --noipv6	disable IPv6 on this device
a8c580
+#
a8c580
+#
a8c580
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
a8c580
+
a8c580
+# Set the system's root password (required)
a8c580
+# Plaintext password is: server
9be3b2
+# Refer to e.g. https://pykickstart.readthedocs.io/en/latest/commands.html#rootpw to see how to create
a8c580
+# encrypted password form for different plaintext password
9be3b2
+rootpw --iscrypted $6$/0RYeeRdK70ynvYz$jH2ZN/80HM6DjndHMxfUF9KIibwipitvizzXDH1zW.fTjyD3RD3tkNdNUaND18B/XqfAUW3vy1uebkBybCuIm0
9be3b2
+
9be3b2
+# The selected profile will restrict root login
9be3b2
+# Add a user that can login and escalate privileges
9be3b2
+# Plaintext password is: admin123
9be3b2
+user --name=admin --groups=wheel --password=$6$Ga6ZnIlytrWpuCzO$q0LqT1USHpahzUafQM9jyHCY9BiE5/ahXLNWUMiVQnFGblu0WWGZ1e6icTaCGO4GNgZNtspp1Let/qpM7FMVB0 --iscrypted
a8c580
+
a8c580
+# Configure firewall settings for the system (optional)
a8c580
+# --enabled	reject incoming connections that are not in response to outbound requests
a8c580
+# --ssh		allow sshd service through the firewall
a8c580
+firewall --enabled --ssh
a8c580
+
a8c580
+# Set up the authentication options for the system (required)
9be3b2
+# sssd profile sets sha512 to hash passwords
9be3b2
+# passwords are shadowed by default
9be3b2
+# See the manual page for authselect-profile for a complete list of possible options.
9be3b2
+authselect select sssd
a8c580
+
a8c580
+# State of SELinux on the installed system (optional)
a8c580
+# Defaults to enforcing
a8c580
+selinux --enforcing
a8c580
+
a8c580
+# Set the system time zone (required)
a8c580
+timezone --utc America/New_York
a8c580
+
a8c580
+# Specify how the bootloader should be installed (required)
9be3b2
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet"
a8c580
+
a8c580
+# Initialize (format) all disks (optional)
a8c580
+zerombr
a8c580
+
a8c580
+# The following partition layout scheme assumes disk of size 20GB or larger
a8c580
+# Modify size of partitions appropriately to reflect actual machine's hardware
9be3b2
+# 
a8c580
+# Remove Linux partitions from the system prior to creating new ones (optional)
a8c580
+# --linux	erase all Linux partitions
a8c580
+# --initlabel	initialize the disk label to the default based on the underlying architecture
a8c580
+clearpart --linux --initlabel
a8c580
+
a8c580
+# Create primary system partitions (required for installs)
9be3b2
+autopart
a8c580
+
9be3b2
+# Harden installation with Essential Eight profile
9be3b2
+# For more details and configuration options see
9be3b2
+# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/performing_an_advanced_rhel_installation/index#addon-org_fedora_oscap_kickstart-commands-for-addons-supplied-with-the-rhel-installation-program
9be3b2
+%addon com_redhat_oscap
a8c580
+        content-type = scap-security-guide
9be3b2
+        profile = xccdf_org.ssgproject.content_profile_ism_o
a8c580
+%end
a8c580
+
a8c580
+# Packages selection (%packages section is required)
a8c580
+%packages
9be3b2
+
a8c580
+# Require @Base
a8c580
+@Base
a8c580
+
a8c580
+%end # End of %packages section
a8c580
+
a8c580
+# Reboot after the installation is complete (optional)
a8c580
+# --eject	attempt to eject CD or DVD media before rebooting
a8c580
+reboot --eject