Skip to content

Commit cd8e658

Browse files
committed
update userdata
1 parent 29d6f84 commit cd8e658

File tree

1 file changed

+30
-39
lines changed

1 file changed

+30
-39
lines changed

rocky-fips/userdata.stig

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
#cloud-config
2-
install:
3-
reboot: true
4-
poweroff: false
52
stylus:
6-
vip:
7-
skip: false
83
managementMode: local
94
featureGate: UserDataForm
10-
installationMode: airgap
11-
stages:
125

6+
install:
7+
poweroff: true
8+
9+
# Set grub options
10+
grub_options:
11+
# additional Kernel option cmdline to apply
12+
extra_cmdline: "fips=1"
13+
14+
stages:
1315
after-install:
16+
- name: "Disable NetworkManager Enable Systemd Networkd"
17+
commands: |
18+
systemctl disable --now NetworkManager
19+
systemctl enable -- systemd-networkd
1420
- name: "Copy in security rule files"
1521
files:
1622
- path: "/var/lib/spectro/new-palette-agent.te"
@@ -90,6 +96,12 @@ stages:
9096
allow perm=execute exe=/opt/spectrocloud/updates/4.8.1/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/usr/bin/ trust=1
9197
allow perm=execute exe=/opt/spectrocloud/updates/4.8.1/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/usr/sbin/ trust=0
9298
allow perm=execute exe=/opt/spectrocloud/updates/4.8.1/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/usr/sbin/ trust=1
99+
allow perm=execute exe=/opt/spectrocloud/updates/4.8.8/opt/spectrocloud/bin/palette-agent trust=0 : dir=/opt/spectrocloud/ trust=0
100+
allow perm=execute exe=/opt/spectrocloud/updates/4.8.8/opt/spectrocloud/bin/palette-agent trust=0 : dir=/system/ trust=0
101+
allow perm=execute exe=/opt/spectrocloud/updates/4.8.8/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/usr/bin/ trust=0
102+
allow perm=execute exe=/opt/spectrocloud/updates/4.8.8/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/usr/bin/ trust=1
103+
allow perm=execute exe=/opt/spectrocloud/updates/4.8.8/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/usr/sbin/ trust=0
104+
allow perm=execute exe=/opt/spectrocloud/updates/4.8.8/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/usr/sbin/ trust=1
93105
allow perm=execute exe=/system/providers/agent-provider-kubeadm trust=0 : dir=/usr/bin/ trust=0
94106
allow perm=execute exe=/system/providers/agent-provider-kubeadm trust=0 : dir=/opt/spectrocloud/ trust=0
95107
allow perm=execute exe=/usr/bin/k9s trust=0 : dir=/usr/bin/ trust=0
@@ -107,6 +119,7 @@ stages:
107119
allow perm=open exe=/opt/spectrocloud/updates/4.7.13/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/opt/spectrocloud/ trust=0
108120
allow perm=open exe=/opt/spectrocloud/updates/4.7.16/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/opt/spectrocloud/ trust=0
109121
allow perm=open exe=/opt/spectrocloud/updates/4.8.1/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/opt/spectrocloud/ trust=0
122+
allow perm=open exe=/opt/spectrocloud/updates/4.8.8/opt/spectrocloud/bin/stylus-agent trust=0 : dir=/opt/spectrocloud/ trust=0
110123
allow perm=open exe=/usr/local/nvidia/toolkit/nvidia-container-cli.real trust=0 : dir=/usr/local/nvidia/toolkit/ trust=0
111124
- path: "/var/lib/spectro/configure-firewalld.sh"
112125
permissions: 0700
@@ -166,30 +179,6 @@ stages:
166179

167180
# Reload firewalld cache
168181
firewall-cmd --reload
169-
- path: "/etc/NetworkManager/system-connections/scbr-100.nmconnection"
170-
permissions: 0600
171-
owner: 0
172-
group: 0
173-
content: |
174-
[connection]
175-
id=scbr-100
176-
uuid=144787b5-4b3a-33f1-addb-dcf19859d7f6
177-
type=vxlan
178-
interface-name=scbr-100
179-
timestamp=1759919846
180-
[ethernet]
181-
cloned-mac-address=7A:22:F5:3B:76:B1
182-
[vxlan]
183-
id=2
184-
local=100.64.192.2
185-
[ipv4]
186-
address1=100.64.192.2/23
187-
address2=100.64.192.1/23
188-
method=manual
189-
[ipv6]
190-
addr-gen-mode=default
191-
method=auto
192-
[proxy]
193182
- path: "/etc/sysctl.d/99-zzz-override_cilium.conf"
194183
permissions: 0600
195184
owner: 0
@@ -283,8 +272,10 @@ stages:
283272
- name: "Harden OS"
284273
commands:
285274
- |
275+
# Ensure EPEL repository is available for scap-security-guide and openscap
276+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm || true
286277
dnf -y install scap-security-guide openscap
287-
oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_stig /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
278+
oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_stig /usr/share/xml/scap/ssg/content/ssg-rl9-ds.xml
288279
fips-mode-setup --enable
289280
sed -i -e 's/# ec2-user/ec2-user/g' /etc/sudoers.d/90-cloud-init-users
290281
sed -i -e 's/# azureuser/azureuser/g' /etc/sudoers.d/90-cloud-init-users
@@ -313,13 +304,13 @@ stages:
313304
cp -f /var/lib/spectro/00-palette.rules /etc/fapolicyd/rules.d/00-palette.rules
314305
nmcli connection reload
315306
sysctl --system
316-
initramfs:
307+
initramfs:
317308
- users:
318-
kairos:
319-
groups:
320-
- wheel
321-
passwd: kairos
322-
name: "Configure user"
309+
kairos:
310+
groups:
311+
- sudo
312+
passwd: kairos
313+
name: Create user and assign to sudo group
323314
- name: "Update kernel parameter to allow GPU operator to run."
324315
commands:
325316
- |
@@ -335,4 +326,4 @@ stages:
335326
sed -i -e 's/^#net.ipv4.ip_forward/net.ipv4.ip_forward/g' /etc/sysctl.d/99-sysctl.conf
336327
sed -i -e 's/^#net.ipv4.conf.all.forwarding/net.ipv4.conf.all.forwarding/g' /etc/sysctl.conf
337328
sed -i -e 's/^#net.ipv4.conf.all.forwarding/net.ipv4.conf.all.forwarding/g' /etc/sysctl.d/99-sysctl.conf
338-
sysctl --system
329+
sysctl --system

0 commit comments

Comments
 (0)