Commit Graph
57 Commits
Author SHA1 Message Date
Mike Reeves bbc28c88b7 Isolate the Hydra admin API on the soauth docker network
The Hydra admin API creates OAuth clients and introspects tokens without
authentication, relying on network isolation the same way Kratos does, but
so-hydra published 0.0.0.0:4445:4445 and sat on sobridge. With userland-proxy
left at its default of true, Docker ran a proxy listener on the host, so any
container reached the admin API through the manager IP or the bridge gateway
regardless of its docker network.

so-hydra now sits alone on soauth and no longer publishes 4445. 4444 is still
published, so the nginx proxy for /oauth2/token and the well-known endpoints is
unchanged. so-soc is already dual homed from the Kratos change and reaches the
admin API over soauth, so only its hostUrl moves. wait_for_hydra polls the
container address instead of the host port.

so-client reaches the admin API through docker exec, mirroring so-user. Exit
codes still propagate, so the --fail-with-body error handling is unchanged.

so-hydra is removed in up_to_3.4.0 alongside so-kratos and so-soc so the
highstate recreates it with the correct network membership. The auth network
range is already handled by set_soauth_range.
2026-09-17 16:58:49 -04:00
Mike Reeves cf3a4ebc27 Isolate the Kratos admin API on a dedicated soauth docker network
The Kratos admin API is unauthenticated by design and relies on network
isolation, but so-kratos published 0.0.0.0:4434:4434 and daemon.json leaves
userland-proxy at its default of true. Docker therefore ran a proxy listener
on the host, and any container reached the admin API through the manager IP
or the bridge gateway regardless of its docker network.

so-kratos now sits alone on a new soauth network and no longer publishes
4434. 4433 is still published, so nginx is unchanged. so-soc is dual homed
and reaches the admin API over soauth, with publicHostUrl set explicitly.
so-user reaches it through docker exec, and wait_for_kratos polls the
container address instead of the host port.

firewall/iptables.jinja hardcoded sobridge in every generated DNAT, ACCEPT,
masquerade and isolation rule, so it is now driven by a docker:networks map
and a per-container networks list. Containers that do not declare one
default to sobridge, and .ip still resolves to the primary network's
address. soauth is only created on the roles that run so-kratos.

Setup already allows a custom docker range, so it now also prompts for the
auth network range and writes it to the docker pillar. Grids on the default
range need no decision during soup, since they get the same 172.17.2.0/24 a
fresh install would. Grids that set a custom range are prompted, defaulting
to the adjacent /24, and unattended upgrades take that default with a notice
rather than blocking.

so-kratos and so-soc are removed in up_to_3.4.0 so the highstate recreates
them with the correct network membership.
2026-09-09 16:09:00 -04:00
Josh Patterson 6bd3c414bb Add default esheap value so nodes highstate without the pillar value
Previously salt/vars/elasticsearch.map.jinja read the elasticsearch heap
size via a raw pillar access (INIT.PILLAR.elasticsearch.esheap). If the
esheap key was missing from a minion pillar, building GLOBALS raised
'dict object has no attribute esheap', cascading into every state that
imports GLOBALS (elasticsearch.enabled, logstash.config, telegraf.config,
etc.) and blocking highstate entirely.

Add an esheap default ('600m', matching the es_heapsize() floor) to
elasticsearch/defaults.yaml and fall back to it via dict .get() so a
missing pillar value degrades gracefully. The per-node pillar value still
wins when present.
2026-07-23 15:16:26 -04:00
Mike Reeves 3ecd19d085 Move telegraf_output from global pillar to telegraf pillar
The Telegraf backend selector lived at global.telegraf_output but it is
a Telegraf-scoped setting, not a cross-cutting grid global. Move both
the value and the UI annotation under the telegraf pillar so it shows
up alongside the other Telegraf tuning knobs in the Configuration UI.

- salt/telegraf/defaults.yaml:    add telegraf.output: BOTH
- salt/telegraf/soc_telegraf.yaml: add telegraf.output annotation
- salt/global/defaults.yaml:      remove global.telegraf_output
- salt/global/soc_global.yaml:    remove global.telegraf_output annotation
- salt/vars/globals.map.jinja:    drop telegraf_output from GLOBALS
- salt/firewall/map.jinja:        read via pillar.get('telegraf:output')
- salt/postgres/telegraf_users.sls: read via pillar.get('telegraf:output')
- salt/telegraf/etc/telegraf.conf: read via TELEGRAFMERGED.output
- salt/postgres/tools/sbin/so-stats-show: update user-facing docs

No behavioral change — default stays BOTH.
2026-04-20 16:03:02 -04:00
Mike Reeves cefbe01333 Add telegraf_output selector for InfluxDB/Postgres dual-write
Introduces global.telegraf_output (INFLUXDB|POSTGRES|BOTH, default BOTH)
so Telegraf can write metrics to Postgres alongside or instead of
InfluxDB. Each minion authenticates with its own so_telegraf_<minion>
role and writes to a matching schema inside a shared so_telegraf
database, keeping blast radius per-credential to that minion's data.

- Per-minion credentials auto-generated and persisted in postgres/auth.sls
- postgres/telegraf_users.sls reconciles roles/schemas on every apply
- Firewall opens 5432 only to minion hostgroups when Postgres output is active
- Reactor on salt/auth + orch/telegraf_postgres_sync.sls provision new
  minions automatically on key accept
- soup post_to_3.1.0 backfills users for existing minions on upgrade
- so-show-stats prints latest CPU/mem/disk/load per minion for sanity checks
- so-telegraf-trim + nightly cron prune rows older than
  postgres.telegraf.retention_days (default 14)
2026-04-15 14:32:10 -04:00
Mike Reeves 2dfa83dd7d Wire postgres credentials into SOC module config
- Create vars/postgres.map.jinja for postgres auth globals
- Add POSTGRES_GLOBALS to all manager-type role vars
  (manager, eval, standalone, managersearch, import)
- Add postgres module config to soc/defaults.yaml
- Inject so_postgres credentials from auth pillar into
  soc/defaults.map.jinja (conditional on auth pillar existing)
2026-04-09 14:09:32 -04:00
Josh Patterson 4dc377c99f DOCKER to DOCKERMERGED 2026-03-17 15:06:06 -04:00
Josh Patterson 44a5b3b1e5 MANAGERHYPE setup is now complete! 2025-03-12 21:05:04 -04:00
m0duspwnens 213df68d04 merge with 120 dev and fix conflicts 2025-01-23 10:56:48 -05:00
Jason Ertel 5e6dd2e8b3 connect 2024-10-23 16:49:02 -04:00
m0duspwnens a28ac3bee6 virt 2024-08-09 11:53:07 -04:00
m0duspwnens 9d2c5d54b0 hype changes 2024-08-07 10:43:53 -04:00
reyesj2 fbd3cff90d Make global.pipeline use GLOBALMERGED value
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
2024-04-12 11:21:19 -04:00
reyesj2 3955587372 Use global.pipeline for redis / kafka states
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
2024-04-11 16:20:09 -04:00
reyesj2 446f1ffdf5 merge 2.4/dev
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
2024-03-25 13:55:48 -04:00
m0duspwnens 08f2b8251b add GLOBALS.is_sensor 2024-03-05 09:53:35 -05:00
m0duspwnens 37dcb84a09 add missing comma 2024-01-30 10:50:01 -05:00
m0duspwnens d118ff4728 add GLOBALS.pcap_engine 2024-01-29 16:54:08 -05:00
reyesj2 8cf29682bb Update to merge in 2.4/dev
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
2023-11-29 13:41:23 -05:00
reyesj2 86dc7cc804 Kafka init
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
2023-11-29 13:34:25 -05:00
m0duspwnens 1c3d3d703c add desktop.map.jinja for global vars 2023-08-29 08:56:01 -04:00
m0duspwnens 00483018ca change docker bip to gateway 2023-07-24 13:38:14 -04:00
m0duspwnens 36a936d3d6 docker ips changes 2023-07-21 16:06:52 -04:00
Mike Reeves 5a642b151b Add Debian 2023-07-07 12:51:17 -04:00
m0duspwnens 469390696e 2.4 receiver changes 2023-06-15 11:04:16 -04:00
m0duspwnens 00d1ca0b62 configure and enable/disable sensoroni via ui 2023-05-12 14:26:46 -04:00
Josh Brower af392681e3 Merge remote-tracking branch 'remotes/origin/2.4/dev' into fleet-sa 2023-04-03 07:27:04 -04:00
m0duspwnens 0d87a5d739 import sensor vars in import vars 2023-03-27 12:51:29 -04:00
m0duspwnens 5a2ef21ce4 add sensor vars to eval 2023-03-22 09:55:30 -04:00
m0duspwnens 903ad530fe move zeek bpf from zeek pillar to bpf pillar 2023-03-20 15:28:33 -04:00
m0duspwnens e6167dc34a heavynode changes 2023-03-02 15:09:59 -05:00
Mike Reeves 7f2d263046 fix nginx config 2023-02-23 10:16:34 -05:00
m0duspwnens bf8e6c64d6 add sobip to global vars 2023-02-22 14:41:14 -05:00
Mike Reeves 68708accde change playbook to use hostname 2023-02-22 14:32:49 -05:00
Josh Brower b62cc32b1a Initial support for IDH 2023-02-21 11:52:37 -05:00
m0duspwnens d2dd68eb44 add global vars for managersearch 2023-02-01 11:31:36 -05:00
m0duspwnens 8dc7a9da9e add searchnode global vars 2023-01-31 10:52:35 -05:00
Josh Brower a71cbcfc9b Pull in upstream changes 2023-01-27 07:53:53 -05:00
Josh Brower 29aa6dceed Add logstash 2023-01-27 07:49:21 -05:00
m0duspwnens b23575d85e add global vars for manager 2023-01-24 11:03:03 -05:00
m0duspwnens d4c6834cd0 merge with 2.4/dev 2023-01-06 14:01:58 -05:00
m0duspwnens cb1822a62d change ref to DOCKER.sosrange 2023-01-05 15:57:06 -05:00
Mike Reeves 3f0ded0638 Merge pull request #9464 from Security-Onion-Solutions/mkr24
Add global annotation and influx support
2022-12-22 13:57:56 -05:00
Mike Reeves a924d48408 Specify Influxdb host 2022-12-22 13:12:19 -05:00
doug 9d8951ceb8 fix import 2022-12-19 16:55:16 -05:00
doug b9e51fc7cf first round of fixes for eval mode 2022-12-16 13:24:02 -05:00
m0duspwnens deba743ef0 fix elasticsearch auth globals 2022-10-13 13:54:52 -04:00
m0duspwnens 04b4030eb6 only add elasticsearch.auth to elasticsearch global var if auth exists 2022-10-13 12:31:41 -04:00
m0duspwnens 6a17f201a2 changes for backup state 2022-10-12 11:31:42 -04:00
m0duspwnens b526532ab6 use global vars in states 2022-10-11 11:57:15 -04:00