Merge pull request #14933 from Security-Onion-Solutions/reyesj2/ol9stg

profile update
This commit is contained in:
Jorge Reyes
2025-08-15 16:26:11 -05:00
committed by GitHub
8 changed files with 181312 additions and 161869 deletions

View File

@@ -9,3 +9,6 @@ fleetartifactdir:
- user: 947 - user: 947
- group: 939 - group: 939
- makedirs: True - makedirs: True
- recurse:
- user
- group

View File

@@ -9,6 +9,9 @@
{% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %} {% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
{% set node_data = salt['pillar.get']('node_data') %} {% set node_data = salt['pillar.get']('node_data') %}
include:
- elasticfleet.artifact_registry
# Add EA Group # Add EA Group
elasticfleetgroup: elasticfleetgroup:
group.present: group.present:

View File

@@ -67,6 +67,8 @@ so-elastic-fleet-auto-configure-artifact-urls:
elasticagent_syncartifacts: elasticagent_syncartifacts:
file.recurse: file.recurse:
- name: /nsm/elastic-fleet/artifacts/beats - name: /nsm/elastic-fleet/artifacts/beats
- user: 947
- group: 947
- source: salt://beats - source: salt://beats
{% endif %} {% endif %}

View File

@@ -1,7 +1,7 @@
# NTP server list # NTP server list
{%- for SERVER in NTPCONFIG.servers %} {%- for SERVER in NTPCONFIG.servers %}
server {{ SERVER }} iburst server {{ SERVER }} iburst maxpoll 10
{%- endfor %} {%- endfor %}
# Config options # Config options
@@ -9,3 +9,5 @@ driftfile /var/lib/chrony/drift
makestep 1.0 3 makestep 1.0 3
rtcsync rtcsync
logdir /var/log/chrony logdir /var/log/chrony
port 0
cmdport 0

View File

@@ -18,11 +18,19 @@ include:
# This directory needs to exist regardless of whether STENO is enabled or not, in order for # This directory needs to exist regardless of whether STENO is enabled or not, in order for
# Sensoroni to be able to look at old steno PCAP data # Sensoroni to be able to look at old steno PCAP data
# if stenographer has never run as the pcap engine no 941 user is created, so we use socore as a placeholder.
# /nsm/pcap is empty until stenographer is used as pcap engine
{% set pcap_id = 941 %}
{% set user_list = salt['user.list_users']() %}
{% if 'stenographer' not in user_list %}
{% set pcap_id = 939 %}
{% endif %}
pcapdir: pcapdir:
file.directory: file.directory:
- name: /nsm/pcap - name: /nsm/pcap
- user: 941 - user: {{ pcap_id }}
- group: 941 - group: {{ pcap_id }}
- makedirs: True - makedirs: True
pcapoutdir: pcapoutdir:

View File

@@ -13,7 +13,11 @@
{% from 'allowed_states.map.jinja' import allowed_states %} {% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states and GLOBALS.os == 'OEL' %} {% if sls.split('.')[0] in allowed_states and GLOBALS.os == 'OEL' %}
{% if 'stg' in salt['pillar.get']('features', []) %} {% if 'stg' in salt['pillar.get']('features', []) %}
{% if GLOBALS.role != 'so-desktop' %}
{% set OSCAP_PROFILE_NAME = 'xccdf_org.ssgproject.content_profile_stig' %} {% set OSCAP_PROFILE_NAME = 'xccdf_org.ssgproject.content_profile_stig' %}
{% else %}
{% set OSCAP_PROFILE_NAME = 'xccdf_org.ssgproject.content_profile_stig_gui' %}
{% endif %}
{% set OSCAP_PROFILE_LOCATION = '/opt/so/conf/stig/sos-oscap.xml' %} {% set OSCAP_PROFILE_LOCATION = '/opt/so/conf/stig/sos-oscap.xml' %}
{% set OSCAP_OUTPUT_DIR = '/opt/so/log/stig' %} {% set OSCAP_OUTPUT_DIR = '/opt/so/log/stig' %}
oscap_packages: oscap_packages:
@@ -49,7 +53,7 @@ update_stig_profile:
{% if not salt['file.file_exists'](OSCAP_OUTPUT_DIR ~ '/pre-oscap-report.html') %} {% if not salt['file.file_exists'](OSCAP_OUTPUT_DIR ~ '/pre-oscap-report.html') %}
run_initial_scan: run_initial_scan:
cmd.run: cmd.run:
- name: 'oscap xccdf eval --profile {{ OSCAP_PROFILE_NAME }} --results {{ OSCAP_OUTPUT_DIR }}/pre-oscap-results.xml --report {{ OSCAP_OUTPUT_DIR }}/pre-oscap-report.html {{ OSCAP_PROFILE_LOCATION }}' - name: 'oscap xccdf eval --profile {{ OSCAP_PROFILE_NAME }} --results {{ OSCAP_OUTPUT_DIR }}/pre-oscap-results.xml --report {{ OSCAP_OUTPUT_DIR }}/pre-oscap-report.html /usr/share/xml/scap/ssg/content/ssg-ol9-ds.xml'
- success_retcodes: - success_retcodes:
- 2 - 2
{% endif %} {% endif %}

File diff suppressed because one or more lines are too long

View File

@@ -22,7 +22,8 @@ zeek:
user.present: user.present:
- uid: 937 - uid: 937
- gid: 937 - gid: 937
- home: /home/zeek - home: /opt/so/conf/zeek
- createhome: False
# Create some directories # Create some directories
zeekpolicydir: zeekpolicydir: