feat(ssh): SSHD_CONFIG_GENERATED keeps the hardening to the drop-in (#88), release 4.26.0 #89

Merged
christianmanivong merged 2 commits from fix/ssh-hardening-generated-config into main 2026-11-03 07:00:40 +00:00
Owner

Closes #88.

  • OpenSshServerMixin.SSHD_CONFIG_GENERATED (default False). When True, harden_ssh_server writes only /etc/ssh/sshd_config.d/00-netork-ssh-hardening.conf; a sshd_config without that include is left untouched, and the result (applied=False) says why.
  • For OpenMediaVault (NAPALM/napalm-openmediavault#20), whose generated sshd_config includes sshd_config.d and whose salt state leaves that directory alone (NetOrk/netork#1950).
  • Second commit: release 4.26.0 (version + changelog), so napalm-openmediavault can require it.

Tests: two new mixin tests (drop-in still written; no include → nothing touched, no reload). Full suite 1196 passed; ruff, mypy clean.

Closes #88. - `OpenSshServerMixin.SSHD_CONFIG_GENERATED` (default False). When True, `harden_ssh_server` writes only `/etc/ssh/sshd_config.d/00-netork-ssh-hardening.conf`; a `sshd_config` without that include is left untouched, and the result (`applied=False`) says why. - For OpenMediaVault (NAPALM/napalm-openmediavault#20), whose generated `sshd_config` includes `sshd_config.d` and whose salt state leaves that directory alone (NetOrk/netork#1950). - Second commit: release 4.26.0 (version + changelog), so napalm-openmediavault can require it. Tests: two new mixin tests (drop-in still written; no include → nothing touched, no reload). Full suite 1196 passed; ruff, mypy clean.
christianmanivong added 2 commits 2026-11-03 06:56:54 +00:00
A platform that writes sshd_config from its own database (OpenMediaVault)
had to opt out of harden_ssh_server altogether. Where that generated file
includes /etc/ssh/sshd_config.d, the drop-in is safe; only the fallback
that rewrites sshd_config itself would be undone on the next apply. With
SSHD_CONFIG_GENERATED set, a sshd_config without the include is left alone
and the result says why.
chore(release): 4.26.0
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 17s
driver / types (pull_request) Successful in 2m9s
driver / test (3.13) (pull_request) Successful in 2m2s
driver / test (3.12) (pull_request) Successful in 2m10s
driver / lowest (pull_request) Successful in 36s
driver / build (pull_request) Successful in 35s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 3m28s
driver / publish (pull_request) Skipped
25f28297e4
christianmanivong merged commit 8e9d21c368 into main 2026-11-03 07:00:40 +00:00
christianmanivong deleted branch fix/ssh-hardening-generated-config 2026-11-03 07:00:40 +00:00
Sign in to join this conversation.