feat(login-auth): how people log in to the firewall, from config.xml (NetOrk/netork#662)
driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Failing after 18s
driver / types (pull_request) Successful in 58s
driver / test (3.13) (pull_request) Successful in 1m1s
driver / test (3.12) (pull_request) Successful in 1m10s
driver / lowest (pull_request) Successful in 32s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m2s
CI / driver (pull_request) Failing after 2m21s
driver / publish (pull_request) Skipped

get_web_login_auth() names the auth servers <system><webgui><authmode> tries,
in order (the Local Database when it names none), each with what it asks for:
password for local, ldap and voucher, password_otp for totp and ldap-totp,
external for radius, unknown otherwise. A name no server has is skipped, as
OPNsense skips it. get_ssh_server_auth() reads <system><ssh> as
openssh_configure_do writes sshd_config: on only with enabled, password and
challenge-response login with passwordauth, root with permitrootlogin, a key
always. An SSH password goes through the same servers (password_sources).
Needs napalm-device-types 4.50.0.
This commit is contained in:
Christian Manivong committed 2026-11-28 08:03:18 +01:00
1 parent 6c1aaf1690
commit 6c612a427b
6 files changed
+405 -1

No files matched your search

+11
View File
@@ -7,6 +7,17 @@ All notable changes to this driver. The format follows
## [Unreleased]
### Added
- How people log in (NetOrk/netork#662), in napalm-device-types 4.50.0's shapes, read from
config.xml over `/api/core/backup/download/this`. `get_web_login_auth()` returns the auth
servers `<system><webgui><authmode>` names, in their order, and the Local Database when it
names none. Each server comes with what it asks for: `password` for `local`, `ldap` and
`voucher`, `password_otp` for `totp` and `ldap-totp`, `external` for `radius`, and
`unknown` for any other type. A name no server has is skipped, as OPNsense skips it.
`get_ssh_server_auth()` returns sshd's settings as `openssh_configure_do` writes them:
`server_enabled` from `enabled`, password and challenge-response login from
`passwordauth`, and root login from `permitrootlogin`, each tested for presence as
OPNsense does. A key is always on. `password_sources` lists the same servers, because an
SSH password goes through them.
- The firewall's configuration history (NetOrk/netork#2511): `get_config_revisions()`
lists the revisions OPNsense keeps of config.xml, newest first, each with its id, its
time in UTC, its description, its user and its size; `get_config_revision(id)`