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

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