Commit Graph
25 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 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
Jason Ertel 5e6dd2e8b3 connect 2024-10-23 16:49:02 -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
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
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 00d1ca0b62 configure and enable/disable sensoroni via ui 2023-05-12 14:26:46 -04: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
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 a924d48408 Specify Influxdb host 2022-12-22 13:12:19 -05: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
Mike Reeves 32034078fa Fix sensoroni Agent 2022-09-19 10:48:36 -04:00
Mike Reeves e3e6e7b4e8 Fix sensoroni Agent 2022-09-19 10:41:01 -04:00
Mike Reeves f4508aa534 Fix sensoroni Agent 2022-09-19 10:22:32 -04:00
Mike Reeves 2bd9dd80e2 Move In Day 2022-09-07 09:06:25 -04:00