netOrk's SSH algorithm fix (NetOrk/netork#1027) takes flagged algorithms out of what sshd offers. On OPNsense the driver has no way to do that:
OPNsense writes /usr/local/etc/ssh/sshd_config itself, from config.xml <system><ssh> (kex, ciphers, macs, keys, keysig, comma-separated), in openssh_configure_do() (src/etc/inc/plugins.inc.d/openssh.inc).
That section is set only on the legacy page system_advanced_admin.php (the menu's Administration entry). No MVC model or API controller reads or writes it, on stable/26.1, stable/26.7 or master.
The HA sync carries it as the "OpenSSH" item (openssh_xmlrpc_sync(): section system.ssh, id ssh), so on a pair the master is set and synced.
So netOrk's fix will say what to set and where (NetOrk/netork#1769, netOrk PR to follow), and takes the page and field names from these attributes, not from a list of its own.
_carp_master moves to virtual_ips.carp_master, next to the CARP reader, so opnsense.py stays under its line ratchet (3058 -> 3055 in the baseline).
Tests
Fixtures only, nothing tested on a device: tests/unit/test_ssh_settings.py (the menu, a field for every algorithm class, no harden_ssh_server). Written first; it failed until the attributes existed. Full suite green (552), ruff, mypy (the new module under strict).
## What
The driver declares where the SSH server's algorithm lists are set, as data:
- `SSH_SETTINGS_MENU = ("System", "Settings", "Administration", "Secure Shell")`
- `SSH_SETTINGS_FIELDS`: each list's field by its algorithm class (`kex`, `cipher`, `mac`, `hostkey`, as in napalm-device-types' `SSH_ALGORITHM_CLASSES`).
Both sit on a new `OPNsenseSshSettingsMixin` (`napalm_opnsense/ssh_settings.py`). The driver still does **not** offer `harden_ssh_server`.
## Why (NetOrk/netork#1769)
netOrk's SSH algorithm fix (NetOrk/netork#1027) takes flagged algorithms out of what sshd offers. On OPNsense the driver has no way to do that:
- OPNsense writes `/usr/local/etc/ssh/sshd_config` itself, from config.xml `<system><ssh>` (`kex`, `ciphers`, `macs`, `keys`, `keysig`, comma-separated), in `openssh_configure_do()` (`src/etc/inc/plugins.inc.d/openssh.inc`).
- That section is set only on the legacy page `system_advanced_admin.php` (the menu's *Administration* entry). No MVC model or API controller reads or writes it, on `stable/26.1`, `stable/26.7` or `master`.
- The HA sync carries it as the "OpenSSH" item (`openssh_xmlrpc_sync()`: section `system.ssh`, id `ssh`), so on a pair the master is set and synced.
So netOrk's fix will say what to set and where (NetOrk/netork#1769, netOrk PR to follow), and takes the page and field names from these attributes, not from a list of its own.
`_carp_master` moves to `virtual_ips.carp_master`, next to the CARP reader, so `opnsense.py` stays under its line ratchet (3058 -> 3055 in the baseline).
## Tests
Fixtures only, nothing tested on a device: `tests/unit/test_ssh_settings.py` (the menu, a field for every algorithm class, no `harden_ssh_server`). Written first; it failed until the attributes existed. Full suite green (552), ruff, mypy (the new module under strict).
Refs NetOrk/netork#1769
OPNsense writes sshd_config from config.xml (<system><ssh>), set on the
legacy Administration page; no API controller reads or writes that
section (26.1, 26.7, master). The driver cannot harden the SSH server,
so it declares, as data, the page and the field of each algorithm list:
SSH_SETTINGS_MENU and SSH_SETTINGS_FIELDS, keyed like device-types'
SSH_ALGORITHM_CLASSES. An application tells a person what to set there.
The CARP master check moves to virtual_ips, next to the CARP reader, so
opnsense.py stays under its line ratchet.
Refs NetOrk/netork#1769
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
The driver declares where the SSH server's algorithm lists are set, as data:
SSH_SETTINGS_MENU = ("System", "Settings", "Administration", "Secure Shell")SSH_SETTINGS_FIELDS: each list's field by its algorithm class (kex,cipher,mac,hostkey, as in napalm-device-types'SSH_ALGORITHM_CLASSES).Both sit on a new
OPNsenseSshSettingsMixin(napalm_opnsense/ssh_settings.py). The driver still does not offerharden_ssh_server.Why (NetOrk/netork#1769)
netOrk's SSH algorithm fix (NetOrk/netork#1027) takes flagged algorithms out of what sshd offers. On OPNsense the driver has no way to do that:
/usr/local/etc/ssh/sshd_configitself, from config.xml<system><ssh>(kex,ciphers,macs,keys,keysig, comma-separated), inopenssh_configure_do()(src/etc/inc/plugins.inc.d/openssh.inc).system_advanced_admin.php(the menu's Administration entry). No MVC model or API controller reads or writes it, onstable/26.1,stable/26.7ormaster.openssh_xmlrpc_sync(): sectionsystem.ssh, idssh), so on a pair the master is set and synced.So netOrk's fix will say what to set and where (NetOrk/netork#1769, netOrk PR to follow), and takes the page and field names from these attributes, not from a list of its own.
_carp_mastermoves tovirtual_ips.carp_master, next to the CARP reader, soopnsense.pystays under its line ratchet (3058 -> 3055 in the baseline).Tests
Fixtures only, nothing tested on a device:
tests/unit/test_ssh_settings.py(the menu, a field for every algorithm class, noharden_ssh_server). Written first; it failed until the attributes existed. Full suite green (552), ruff, mypy (the new module under strict).Refs NetOrk/netork#1769