feat(login-sources): where a device checks a login, and what each place asks for, 4.50.0 (NetOrk/netork#662) #140

Merged
christianmanivong merged 1 commits from feature/web-login-auth into main 2026-11-28 07:06:53 +00:00
Owner

For NetOrk/netork#662 (decided 2026-11-28: OPNsense next, and the weaker way in decides).

  • login_sources: LoginSourceDict (name, kind in the device's own words, factors: password | password_otp | external | unknown, all four in LOGIN_FACTORS) and WebLoginAuthDict (sources, in the device's order), the shape a driver's get_web_login_auth returns. There is no mixin, so hasattr stays truthful.
  • SshServerAuthDict takes two optional keys, password_sources and server_enabled, for a platform that writes sshd_config itself (OPNsense). They sit in a total=False base, because NotRequired under postponed annotations is invisible at runtime.
  • Version 4.50.0, CHANGELOG and README.

Tests: tests/test_login_sources.py; the full suite passes (2029).

For NetOrk/netork#662 (decided 2026-11-28: OPNsense next, and the weaker way in decides). - `login_sources`: `LoginSourceDict` (`name`, `kind` in the device's own words, `factors`: `password` | `password_otp` | `external` | `unknown`, all four in `LOGIN_FACTORS`) and `WebLoginAuthDict` (`sources`, in the device's order), the shape a driver's `get_web_login_auth` returns. There is no mixin, so `hasattr` stays truthful. - `SshServerAuthDict` takes two optional keys, `password_sources` and `server_enabled`, for a platform that writes sshd_config itself (OPNsense). They sit in a `total=False` base, because `NotRequired` under postponed annotations is invisible at runtime. - Version 4.50.0, CHANGELOG and README. Tests: `tests/test_login_sources.py`; the full suite passes (2029).
christianmanivong added 1 commit 2026-11-28 07:02:20 +00:00
feat(login-sources): where a device checks a login, and what each place asks for, 4.50.0 (NetOrk/netork#662)
driver / standard (pull_request) Successful in 20s
driver / lint (pull_request) Successful in 17s
driver / types (pull_request) Successful in 1m1s
driver / test (3.12) (pull_request) Successful in 1m22s
driver / test (3.13) (pull_request) Successful in 1m13s
driver / lowest (pull_request) Successful in 43s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 3m0s
driver / publish (pull_request) Skipped
d778c805c1
LoginSourceDict names one source with the device's word for its kind and what
it asks for: password, password_otp, external or unknown. WebLoginAuthDict is
what a driver's get_web_login_auth returns, every source the web interface
tries, in the device's order. SshServerAuthDict takes password_sources and
server_enabled for a platform that writes sshd_config itself.
christianmanivong merged commit 917e9e570d into main 2026-11-28 07:06:53 +00:00
christianmanivong deleted branch feature/web-login-auth 2026-11-28 07:06:53 +00:00
Sign in to join this conversation.