CI / test (3.10) (pull_request) Failing after 20s
CI / test (3.11) (pull_request) Failing after 18s
CI / test (3.12) (pull_request) Failing after 19s
CI / test (3.10) (push) Successful in 28s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 29s
OpenMediaVault generates sshd_config from its own database; a drop-in netOrk wrote would be dropped by the next apply of the SSH settings without a word. harden_ssh_server = None makes netOrk's capability probe answer no. Requires napalm-linux 0.5.0; bumps to 0.1.1. NetOrk/netork#1027
17 lines
663 B
Python
17 lines
663 B
Python
"""OpenMediaVault writes sshd_config itself, from its own database.
|
|
|
|
The Linux driver offers to harden the SSH server by writing a drop-in under
|
|
/etc/ssh/sshd_config.d (NetOrk/netork#1027). On OMV the next apply of the SSH
|
|
settings (``omv-salt deploy run ssh``) would regenerate the configuration and
|
|
take the change back without a word, so this driver opts out: netOrk's
|
|
capability probe asks ``callable(harden_ssh_server)``.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from napalm_openmediavault.openmediavault import OpenMediaVaultDriver
|
|
|
|
|
|
def test_does_not_offer_ssh_hardening():
|
|
assert not callable(getattr(OpenMediaVaultDriver, "harden_ssh_server", None))
|