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

889f2b
From 86e1556555fde19d3b6bfa7e280c8d9faf6243d3 Mon Sep 17 00:00:00 2001
889f2b
From: Matej Tyc <matyc@redhat.com>
889f2b
Date: Mon, 16 Aug 2021 13:08:10 +0200
889f2b
Subject: [PATCH] Add ISM Official kickstarts
889f2b
889f2b
---
889f2b
 .../rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg    | 116 ++++++++++++++++++
889f2b
 .../rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg    | 116 ++++++++++++++++++
889f2b
 2 files changed, 232 insertions(+)
889f2b
 create mode 100644 products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg
889f2b
 create mode 100644 products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg
889f2b
889f2b
diff --git a/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg b/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg
889f2b
new file mode 100644
889f2b
index 0000000000..d84d98b12d
889f2b
--- /dev/null
889f2b
+++ b/products/rhel8/kickstart/ssg-rhel8-ism_o-ks.cfg
889f2b
@@ -0,0 +1,116 @@
889f2b
+# SCAP Security Guide ISM Official profile kickstart for Red Hat Enterprise Linux 8 Server
889f2b
+# Version: 0.0.1
889f2b
+# Date: 2021-08-16
889f2b
+#
889f2b
+# Based on:
889f2b
+# https://pykickstart.readthedocs.io/en/latest/
889f2b
+# 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
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
+#
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
+# sssd profile sets sha512 to hash passwords
889f2b
+# passwords are shadowed by default
889f2b
+# See the manual page for authselect-profile for a complete list of possible options.
889f2b
+authselect select sssd
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
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet"
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
+autopart
889f2b
+
889f2b
+# Harden installation with Essential Eight profile
889f2b
+# For more details and configuration options see
889f2b
+# 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
889f2b
+%addon org_fedora_oscap
889f2b
+        content-type = scap-security-guide
889f2b
+        profile = xccdf_org.ssgproject.content_profile_ism_o
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/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg b/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg
889f2b
new file mode 100644
889f2b
index 0000000000..517919539a
889f2b
--- /dev/null
889f2b
+++ b/products/rhel9/kickstart/ssg-rhel9-ism_o-ks.cfg
889f2b
@@ -0,0 +1,116 @@
889f2b
+# SCAP Security Guide ISM Official profile kickstart for Red Hat Enterprise Linux 9 Server
889f2b
+# Version: 0.0.1
889f2b
+# Date: 2021-08-16
889f2b
+#
889f2b
+# Based on:
889f2b
+# https://pykickstart.readthedocs.io/en/latest/
889f2b
+# 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
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
+#
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
+# sssd profile sets sha512 to hash passwords
889f2b
+# passwords are shadowed by default
889f2b
+# See the manual page for authselect-profile for a complete list of possible options.
889f2b
+authselect select sssd
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
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet"
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
+autopart
889f2b
+
889f2b
+# Harden installation with Essential Eight profile
889f2b
+# For more details and configuration options see
889f2b
+# 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
889f2b
+%addon com_redhat_oscap
889f2b
+        content-type = scap-security-guide
889f2b
+        profile = xccdf_org.ssgproject.content_profile_ism_o
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