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

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