Commit Graph

794 Commits

Author SHA1 Message Date
Mike Reeves b25b221076 postsalt: move PG-canonical enable to AFTER the install highstate
Supersedes the pre-install placement (right after secrets_pillar) from
the previous commit, which was broken: salt's ext_pillar overlay
shadowed disk pillar's elasticsearch subtree before so-pillar-import
had populated PG, so elasticsearch.enabled.sls failed rendering on
ELASTICSEARCHMERGED.auth.users.so_elastic_user.pass — that key lives
in elasticsearch/auth.sls, which is on the importer's secrets
allowlist and never makes it into so_pillar.pillar_entry. The install
would then hang forever waiting for the elasticsearch container that
the broken state never deployed.

The new placement is right after the final state.highstate completes:
  1. drop adv_postgres.sls flipping the flag to True
  2. salt-call saltutil.refresh_pillar so the next state sees it
  3. salt-call state.apply postgres.schema_pillar — deploys schema,
     ALTERs role login passwords, installs psycopg2 into salt's
     bundled python, runs so-pillar-import, writes
     /opt/so/conf/so-yaml/mode=postgres
  4. salt-call state.apply salt.master — re-renders engines.conf
     with the pg_notify_pillar engine block, drops master.d
     ext_pillar config, watch_in restarts salt-master and ext_pillar
     takes over

verify_setup runs after this so its final checks see PG-canonical
mode in place. Same end state as the previous commit's intent, just
without the bootstrap chicken-and-egg.
2026-05-04 21:02:08 -04:00
Mike Reeves 7b9ab2d9d1 postsalt: enable PG-canonical pillar mode by default during so-setup
Drops a local pillar override (postgres.so_pillar.enabled = True) right
after secrets_pillar so the install-time highstate brings up
schema_pillar, ext_pillar_postgres, and the pg_notify_pillar engine
without operator intervention. Without this the whole PG-canonical
stack stays gated off on the default-False flag and the install lands
in legacy disk-pillar mode — which defeats the point of being on the
postsalt branch at all.

The new enable_so_pillar_postgres() function in so-functions is
idempotent (overwrites adv_postgres.sls with a fixed body) and the
generated file is mode 0644 socore:socore so it merges into pillar
under the existing local-pillar directory ownership convention.

Rollback path: edit /opt/so/saltstack/local/pillar/postgres/adv_postgres.sls
to set enabled: False, or delete the file. The schema and engine
config states will tear themselves down on the next highstate via
their existing else-branch absent states.
2026-05-04 19:56:14 -04:00
Mike Reeves 3a4b7b50de ensure python3-pyyaml is installed before continuing setup 2026-04-30 10:15:09 -04:00
Jason Ertel cdd217283d numeric test description 2026-04-24 08:13:36 -04:00
Jason Ertel da7c2995b0 include trailing numbers as an additional test 2026-04-13 17:09:10 -04:00
Jason Ertel 5634aed679 support minion node descriptions containing spaces 2026-04-13 15:19:39 -04:00
Mike Reeves d2cee468a0 Remove support for non-Oracle Linux 9 operating systems
Security Onion now exclusively supports Oracle Linux 9. This removes
detection, setup, and update logic for Ubuntu, Debian, CentOS, Rocky,
AlmaLinux, and RHEL.
2026-03-16 16:44:07 -04:00
DefensiveDepth 5e7b0cfe0e Cleanup idstools 2026-02-26 09:05:54 -05:00
reyesj2 b3d1dd51a4 initialize specific indices as needed 2026-01-29 15:41:39 -06:00
Josh Patterson a192455fae Merge remote-tracking branch 'origin/2.4/dev' into bravo 2026-01-19 17:17:58 -05:00
Josh Patterson 17532fe49d run a final highstate on managers prior to verify 2026-01-16 17:42:58 -05:00
Josh Patterson b9ff1704b0 the great ssl refactor 2025-12-11 17:30:06 -05:00
Josh Patterson aed27fa111 reserve group ids 2025-12-03 11:19:46 -05:00
Josh Patterson be11c718f6 configure salt then install it 2025-11-12 18:06:55 -05:00
Jason Ertel d95122ca01 ensure previous setup outcomes are cleared 2025-11-04 16:02:39 -05:00
Josh Patterson 1fb558cc77 managerhype br0 setup 2025-09-25 16:06:25 -04:00
Josh Patterson c5db0a7195 more ed25519 to ecdsa 2025-08-07 15:02:45 -04:00
Josh Patterson 1e9f3a65a4 Merge remote-tracking branch 'origin/2.4/dev' into vlb2 2025-06-25 15:35:30 -04:00
Jason Ertel 21d9964827 fix logging 2025-06-24 11:03:08 -04:00
Jason Ertel b052a75e64 refactor airgap playbook to eliminate dupe code and shrink ISO 2025-06-24 09:34:57 -04:00
Josh Patterson 07359ad6ec Merge remote-tracking branch 'origin/2.4/dev' into vlb2 2025-06-09 14:48:26 -04:00
Josh Brower a3b5db5945 Add support for Airgap for Playbooks 2025-06-06 16:17:14 -04:00
Josh Patterson 6988f03ebc setup bridge and fix salt before first highstate for hypervisors 2025-05-16 14:24:07 -04:00
Josh Patterson 8f3664f26c need to sync 2025-04-04 09:00:22 -04:00
Josh Patterson 3083e3bc63 sync runners and create soqemussh user ssh keypair for manager and managerhype 2025-04-03 13:42:02 -04:00
Josh Patterson 44a5b3b1e5 MANAGERHYPE setup is now complete! 2025-03-12 21:05:04 -04:00
m0duspwnens feb700393e merge with 2.4.120, fix merge conflicts 2024-10-25 15:09:38 -04:00
m0duspwnens 4d902da931 call airgap_rules if airgap. log rsync and git commands 2024-10-23 15:58:11 -04:00
defensivedepth 3567dfc0dc Move Airgap later in setup 2024-09-26 15:48:50 -04:00
m0duspwnens 576d218cd9 dont restart suricata during setup. retry rule reload for 3 minutes 2024-09-06 08:10:59 -04:00
m0duspwnens f9eeb76518 mine for hyper 2024-08-12 14:58:10 -04:00
m0duspwnens 64a0c171f3 ssh user, build cloud profiles and providers 2024-08-12 12:47:04 -04:00
m0duspwnens fcf859ffed start adding bridge for hyper 2024-08-05 14:53:11 -04:00
m0duspwnens 52e52f35f7 hyper setup init 2024-07-31 15:49:32 -04:00
Jason Ertel 7dfb75ba6b remove unused test parameters from setup 2024-07-22 11:02:56 -04:00
weslambert 6dec9b4cf7 Merge pull request #12986 from Security-Onion-Solutions/fix/old_strelka
Remove old Strelka configuration for YARA
2024-05-14 09:27:19 -04:00
m0duspwnens 649f52dac7 create_local_directories in soup too 2024-05-13 10:37:56 -04:00
Jason Ertel 074d063fee tests will retry on any rule import failure 2024-05-09 14:52:58 -04:00
Wes 6ed82d7b29 Remove YARA download in setup 2024-05-09 17:27:46 +00:00
Jason Ertel 8364b2a730 update for testing 2024-05-07 14:30:52 -04:00
Jason Ertel 4ebe070cd8 test regexes for detections 2024-05-06 19:03:12 -04:00
m0duspwnens 442a717d75 orchit 2024-05-03 12:08:57 -04:00
Jason Ertel 7c64fc8c05 do not prompt about telemetry on airgap installs 2024-04-03 18:08:42 -04:00
Jason Ertel 3aea2dec85 analytics 2024-04-01 09:50:18 -04:00
DefensiveDepth d7ecad4333 Initial cut to remove Playbook and deps 2024-03-25 19:42:31 -04:00
Josh Brower c6baa4be1b Airgap Support - Detections module 2024-02-26 16:19:32 -05:00
m0duspwnens ccfdafea0a enable startup_states: highstate on managers during setup and not with salt 2024-01-04 16:24:48 -05:00
m0duspwnens 7b9ac7ae6d remove checkin_at_boot function 2023-12-19 14:05:19 -05:00
Jason Ertel b99c7ce76e improve verbosity of setup logs 2023-11-06 11:22:35 -05:00
Josh Brower 0dec6693dc Merge pull request #11678 from Security-Onion-Solutions/2.4/fleetreset
Add Elastic Fleet reset script
2023-11-02 11:33:58 -04:00