Commit Graph
68 Commits
Author SHA1 Message Date
Josh Patterson 21222ff119 FIX: use /sbin/nologin for service accounts
These accounts existed only for container UID mapping and filesystem
ownership, but user.present omitted shell:, so Salt fell through to the
platform useradd default and every one of them got /bin/bash. Pin them to
/sbin/nologin so none can be used as an interactive login or `su -` target.

socore keeps /bin/bash: `su socore -c '/usr/sbin/so-repo-sync'` in soup and
so-kernel-upgrade execs the account's passwd shell, and operator docs tell
users to su to socore. soqemussh keeps /bin/bash as an SSH login account.

elastic-agent, elastic-agent-pr and kafka are included alongside the accounts
named in the issue, being the same class with the same unset shell, so the
default is uniform.

Cron is unaffected: cronie runs jobs via the crontab SHELL (default /bin/sh),
not the passwd shell. suricata is the only account changed here that owns a
crontab, and somon has shipped as nologin with a working cron job already.
The zeek `runuser -l zeek` calls all run inside so-zeek via docker.run/exec,
so they resolve the shell from the image, not the host.

Verified on a 3.4.0 managersearch + sensor grid: highstate converges with the
shell as the only change and no failures, is idempotent on a second run, all
containers stay up, SOC still issues a Kratos login flow, and the suricata
surilogcompress cron job runs post-change ((suricata) CMD/CMDEND in
/var/log/cron) while `su - suricata` is now refused.

Closes #16256
2026-09-25 09:23:09 -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 405dc52587 move up restart policy for so-kratos 2026-07-14 13:34:19 -04:00
Josh Patterson 730c828bec Merge remote-tracking branch 'origin/jertel/wip' into saltthangs 2026-05-19 10:23:45 -04:00
Jason Ertel 61ca60a94c prep for soc db config 2026-05-13 17:28:07 -04:00
Josh Patterson 034711d148 Merge remote-tracking branch 'origin/3/dev' into saltthangs 2026-04-28 10:47:29 -04:00
Josh Patterson 070d150420 readonly soc and kratos enabled 2026-04-24 13:56:35 -04:00
Mike Reeves a0cf0489d6 reduce highstate frequency with active push for rules and pillars
- schedule highstate every 2 hours (was 15 minutes); interval lives in
  global:push:highstate_interval_hours so the SOC admin UI can tune it and
  so-salt-minion-check derives its threshold as (interval + 1) * 3600
- add inotify beacon on the manager + master reactor + orch.push_batch that
  writes per-app intent files, with a so-push-drainer schedule on the manager
  that debounces, dedupes, and dispatches a single orchestration
- pillar_push_map.yaml allowlists the apps whose pillar changes trigger an
  immediate targeted state.apply (targets verified against salt/top.sls);
  edits under pillar/minions/ trigger a state.highstate on that one minion
- host-batch every push orchestration (batch: 25%, batch_wait: 15) so rule
  changes don't thundering-herd large fleets
- new global:push:enabled kill-switch tears down the beacon, reactor config,
  and drainer schedule on the next highstate for operators who want to keep
  highstate-only behavior
- set restart_policy: unless-stopped on 23 container states so docker
  recovers crashes without waiting for the next highstate; leave registry
  (always), strelka/backend (on-failure), kratos, and hydra alone with
  inline comments explaining why
2026-04-10 15:43:16 -04:00
Josh Patterson 9ec4a26f97 define options in annotation files 2026-04-09 10:18:36 -04:00
Josh Patterson bfeefeea2f ensure bool sliders for kratos 2026-03-19 14:36:05 -04:00
Josh Patterson c2c5aea244 ensure bool sliders for each state:enabled annotation 2026-03-19 12:35:38 -04:00
Josh Patterson 74ad2990a7 Merge remote-tracking branch 'origin/3/dev' into delta 2026-03-18 13:05:02 -04:00
Josh Patterson e19e83bebb allow user defined ulimits 2026-03-18 10:38:15 -04:00
Doug Burks 930985b770 update helpLink references for new documentation 2026-03-18 09:46:45 -04:00
Josh Patterson 2349750e13 DOCKER to DOCKERMERGED 2026-03-17 16:19:02 -04:00
Josh Patterson 00986dc2fd Merge remote-tracking branch 'origin/delta' into customulimit 2026-03-17 16:04:09 -04:00
Mike ReevesandClaude Opus 4.6 2d97dfc8a1 Add customizable ulimit settings for all Docker containers
Add ulimits as a configurable advanced setting for every container,
allowing customization through the web UI. Move hardcoded ulimits
from elasticsearch and zeek into defaults.yaml and fix elasticsearch
ulimits that were incorrectly nested under the environment key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 15:10:42 -04:00
Josh Patterson 4dc377c99f DOCKER to DOCKERMERGED 2026-03-17 15:06:06 -04:00
Jason Ertel 5028729e4c suppress config diffs to avoid false positive errors 2026-01-06 12:50:18 -05:00
Jason Ertel b05de22f58 expose login form lifespan in config scr 2025-12-24 14:39:55 -05:00
Jason Ertel 3a2ceb0b6f retry kratos pulls since this is the first image to install during setup 2025-09-25 15:40:00 -04:00
reyesj2 30c4acb828 group 2025-04-21 16:38:16 -05:00
reyesj2 4ec185a9c7 make logstash and kratos homedirs 2025-04-21 16:26:20 -05:00
Jason Ertel f5a8e917a4 researching install failures 2025-04-21 14:32:33 -04:00
Jason Ertel bf19c6e730 ca download; ignore shard errors on startup; clarify oidc id 2025-02-05 15:04:04 -05:00
Jason Ertel 92ddf2ec6c MFA issuer name shouldn't be an advanced setting 2024-11-19 09:27:26 -05:00
Jason Ertel 12168531a1 avoid double SSO clicks on initial OIDC login 2024-10-16 12:33:03 -04:00
Jason Ertel 4913df2297 adjustments for support of PKCE OIDC 2024-10-01 08:54:14 -04:00
Jason Ertel cce9e162d4 remove colon to avoid yaml parsing problems 2024-09-16 15:30:14 -04:00
Jason Ertel 217bb388a0 Clarify enabled settings 2024-09-16 10:05:17 -04:00
Jason Ertel 9f17bd2255 lks/fps 2024-01-24 11:17:32 -05:00
Jason Ertel d42b5ef901 remove unused url props to avoid kratos complaining about invalid urls when they're blank 2023-10-27 11:18:56 -04:00
Jason Ertel a66006c8a6 minor updates 2023-10-25 09:04:23 -04:00
Jason Ertel a5c4783564 oidc 2023-07-27 18:36:50 -04:00
Jason Ertel aa36e9a785 oidc 2023-07-27 08:40:27 -04:00
Jason Ertel 6d56deb2e4 oidc 1 2023-07-25 08:12:45 -04:00
Jason Ertel b129b4ceaa prepare for alt login 2023-07-14 17:03:20 -04:00
Jason Ertel b4e5ac9796 Add note to advise against changing settings 2023-06-14 16:11:50 -04:00
Jason Ertel 21a7b76352 webauthn 2023-06-14 13:33:31 -04:00
Mike Reeves 5315c51197 Allow additional docker parameters 2023-05-18 16:52:38 -04:00
Mike Reeves 0fd9fb9294 Allow additional docker parameters 2023-05-18 15:19:09 -04:00
m0duspwnens b033f0d20f fix import 2023-05-12 16:57:31 -04:00
m0duspwnens b71b4225c4 enabled/disable kratos in ui 2023-05-12 16:53:18 -04:00
Jason Ertel 03c89a02ad Add privileged session config option to kratos config UI 2023-04-28 14:01:19 -04:00
Jason Ertel 666d4ea260 Add privileged session config option to kratos config UI 2023-04-28 13:56:28 -04:00
Jason Ertel 4c58aa2ccf Add privileged session config option to kratos config UI 2023-04-28 13:14:30 -04:00
m0duspwnens a37f0fd0c0 rename sosbridge to sobridge 2023-02-03 10:07:07 -05:00
m0duspwnens 6033e9a0de use port_bindings from docker defaults in docker states 2023-01-13 10:15:10 -05:00
m0duspwnens 24876eecd9 change refs from sosnet to sosbridge 2022-12-22 14:02:40 -05:00
m0duspwnens accc293c8a 2.4 firewall changes 2022-12-21 15:03:45 -05:00