Blame SOURCES/scap-security-guide-0.1.56-add_rhel7_stig_kickstarts-PR_7026.patch

a8c580
From 8b7da9c093c80844ccbf7f5031a91bd1669ed4f0 Mon Sep 17 00:00:00 2001
a8c580
From: Gabriel Becker <ggasparb@redhat.com>
a8c580
Date: Thu, 20 May 2021 13:16:07 +0200
a8c580
Subject: [PATCH] Add kickstart files for RHEL7 STIG and STIG with GUI.
a8c580
a8c580
---
a8c580
 rhel7/kickstart/ssg-rhel7-stig-ks.cfg     | 129 ++++++++++++++++++++++
a8c580
 rhel7/kickstart/ssg-rhel7-stig_gui-ks.cfg | 128 +++++++++++++++++++++
a8c580
 2 files changed, 257 insertions(+)
a8c580
 create mode 100644 rhel7/kickstart/ssg-rhel7-stig-ks.cfg
a8c580
 create mode 100644 rhel7/kickstart/ssg-rhel7-stig_gui-ks.cfg
a8c580
a8c580
diff --git a/rhel7/kickstart/ssg-rhel7-stig-ks.cfg b/rhel7/kickstart/ssg-rhel7-stig-ks.cfg
a8c580
new file mode 100644
a8c580
index 00000000000..68b777c8337
a8c580
--- /dev/null
a8c580
+++ b/rhel7/kickstart/ssg-rhel7-stig-ks.cfg
a8c580
@@ -0,0 +1,129 @@
a8c580
+# Install a fresh new system (optional)
a8c580
+install
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
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
a8c580
+#       "--bootproto=static" must be used. For example:
a8c580
+# 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
a8c580
+#
a8c580
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
a8c580
+
a8c580
+# Set the system's root password (required)
a8c580
+# Plaintext password is: server
a8c580
+# Refer to e.g. http://fedoraproject.org/wiki/Anaconda/Kickstart#rootpw to see how to create
a8c580
+# encrypted password form for different plaintext password
a8c580
+rootpw --iscrypted $6$rhel6usgcb$aS6oPGXcPKp3OtFArSrhRwu6sN8q2.yEGY7AIwDOQd23YCtiz9c5mXbid1BzX9bmXTEZi.hCzTEXFosVBI5ng0
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)
a8c580
+# --enableshadow	enable shadowed passwords by default
a8c580
+# --passalgo		hash / crypt algorithm for new passwords
a8c580
+# See the manual page for authconfig for a complete list of possible options.
a8c580
+authconfig --enableshadow --passalgo=sha512
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)
a8c580
+# Plaintext password is: password
a8c580
+# Refer to e.g. http://fedoraproject.org/wiki/Anaconda/Kickstart#rootpw to see how to create
a8c580
+# encrypted password form for different plaintext password
a8c580
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$rhel6usgcb$kOzIfC4zLbuo3ECp1er99NRYikN419wxYMmons8Vm/37Qtg0T8aB9dKxHwqapz8wWAFuVkuI/UJqQBU92bA5C0
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
a8c580
+#
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)
a8c580
+part /boot --fstype=xfs --size=512
a8c580
+part pv.01 --grow --size=1
a8c580
+
a8c580
+# Create a Logical Volume Management (LVM) group (optional)
a8c580
+volgroup VolGroup --pesize=4096 pv.01
a8c580
+
a8c580
+# Create particular logical volumes (optional)
a8c580
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=12288 --grow
a8c580
+# CCE-26557-9: Ensure /home Located On Separate Partition
a8c580
+logvol /home --fstype=xfs --name=LogVol02 --vgname=VolGroup --size=1024 --fsoptions="nodev"
a8c580
+# CCE-26435-8: Ensure /tmp Located On Separate Partition
a8c580
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
a8c580
+# CCE-26639-5: Ensure /var Located On Separate Partition
a8c580
+logvol /var --fstype=xfs --name=LogVol03 --vgname=VolGroup --size=2048 --fsoptions="nodev"
a8c580
+# CCE-26215-4: Ensure /var/log Located On Separate Partition
a8c580
+logvol /var/log --fstype=xfs --name=LogVol04 --vgname=VolGroup --size=1024 --fsoptions="nodev"
a8c580
+# CCE-26436-6: Ensure /var/log/audit Located On Separate Partition
a8c580
+logvol /var/log/audit --fstype=xfs --name=LogVol05 --vgname=VolGroup --size=512 --fsoptions="nodev"
a8c580
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
a8c580
+
a8c580
+# The full id of DISA STIG profile is used because otherwise there would be
a8c580
+# a conflict with rhelh-stig.
a8c580
+%addon org_fedora_oscap
a8c580
+        content-type = scap-security-guide
a8c580
+        profile = xccdf_org.ssgproject.content_profile_stig
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
a8c580
diff --git a/rhel7/kickstart/ssg-rhel7-stig_gui-ks.cfg b/rhel7/kickstart/ssg-rhel7-stig_gui-ks.cfg
a8c580
new file mode 100644
a8c580
index 00000000000..55f74479fda
a8c580
--- /dev/null
a8c580
+++ b/rhel7/kickstart/ssg-rhel7-stig_gui-ks.cfg
a8c580
@@ -0,0 +1,128 @@
a8c580
+# Install a fresh new system (optional)
a8c580
+install
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
+# NOTE: Usage of DHCP will fail CCE-27021-5 (DISA FSO RHEL-06-000292). To use static IP configuration,
a8c580
+#       "--bootproto=static" must be used. For example:
a8c580
+# 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
a8c580
+#
a8c580
+network --onboot yes --device eth0 --bootproto dhcp --noipv6
a8c580
+
a8c580
+# Set the system's root password (required)
a8c580
+# Plaintext password is: server
a8c580
+# Refer to e.g. http://fedoraproject.org/wiki/Anaconda/Kickstart#rootpw to see how to create
a8c580
+# encrypted password form for different plaintext password
a8c580
+rootpw --iscrypted $6$rhel6usgcb$aS6oPGXcPKp3OtFArSrhRwu6sN8q2.yEGY7AIwDOQd23YCtiz9c5mXbid1BzX9bmXTEZi.hCzTEXFosVBI5ng0
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)
a8c580
+# --enableshadow	enable shadowed passwords by default
a8c580
+# --passalgo		hash / crypt algorithm for new passwords
a8c580
+# See the manual page for authconfig for a complete list of possible options.
a8c580
+authconfig --enableshadow --passalgo=sha512
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)
a8c580
+# Plaintext password is: password
a8c580
+# Refer to e.g. http://fedoraproject.org/wiki/Anaconda/Kickstart#rootpw to see how to create
a8c580
+# encrypted password form for different plaintext password
a8c580
+bootloader --location=mbr --append="crashkernel=auto rhgb quiet" --password=$6$rhel6usgcb$kOzIfC4zLbuo3ECp1er99NRYikN419wxYMmons8Vm/37Qtg0T8aB9dKxHwqapz8wWAFuVkuI/UJqQBU92bA5C0
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
a8c580
+#
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)
a8c580
+part /boot --fstype=xfs --size=512
a8c580
+part pv.01 --grow --size=1
a8c580
+
a8c580
+# Create a Logical Volume Management (LVM) group (optional)
a8c580
+volgroup VolGroup --pesize=4096 pv.01
a8c580
+
a8c580
+# Create particular logical volumes (optional)
a8c580
+logvol / --fstype=xfs --name=LogVol06 --vgname=VolGroup --size=12288 --grow
a8c580
+# CCE-26557-9: Ensure /home Located On Separate Partition
a8c580
+logvol /home --fstype=xfs --name=LogVol02 --vgname=VolGroup --size=1024 --fsoptions="nodev"
a8c580
+# CCE-26435-8: Ensure /tmp Located On Separate Partition
a8c580
+logvol /tmp --fstype=xfs --name=LogVol01 --vgname=VolGroup --size=1024 --fsoptions="nodev,noexec,nosuid"
a8c580
+# CCE-26639-5: Ensure /var Located On Separate Partition
a8c580
+logvol /var --fstype=xfs --name=LogVol03 --vgname=VolGroup --size=2048 --fsoptions="nodev"
a8c580
+# CCE-26215-4: Ensure /var/log Located On Separate Partition
a8c580
+logvol /var/log --fstype=xfs --name=LogVol04 --vgname=VolGroup --size=1024 --fsoptions="nodev"
a8c580
+# CCE-26436-6: Ensure /var/log/audit Located On Separate Partition
a8c580
+logvol /var/log/audit --fstype=xfs --name=LogVol05 --vgname=VolGroup --size=512 --fsoptions="nodev"
a8c580
+logvol swap --name=lv_swap --vgname=VolGroup --size=2016
a8c580
+
a8c580
+%addon org_fedora_oscap
a8c580
+        content-type = scap-security-guide
a8c580
+        profile = xccdf_org.ssgproject.content_profile_stig_gui
a8c580
+%end
a8c580
+
a8c580
+# Packages selection (%packages section is required)
a8c580
+%packages
a8c580
+# Graphical User Interface package group
a8c580
+@^graphical-server-environment
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