secubox-deb/packages/secubox-auth/api
CyberMind-FR 260f0f5d6d fix(auth): ntp_health falls back to timedatectl when chronyc absent (ref #498)
Admin login UI was permanently flagging "Clock not synced" with the
warning "TOTP window widened to ±60s" even when the system clock was
correctly synced. Cause : ntp_health.probe() only knew how to read
chrony, but SecuBox boxes ship systemd-timesyncd by default ; chrony
is the operator-opt-in alternative. On a stock install the probe
caught FileNotFoundError, returned `synced: False`, and the
recommended_totp_window() widened to ±60s on EVERY login.

Added a chrony → timedatectl fallback chain :

  1. Try `chronyc -n tracking` (chrony users).
  2. Fall through to `timedatectl show` reading NTP +
     NTPSynchronized properties (timesyncd users).
  3. Only return the synthetic error if BOTH commands are missing.

The response now carries an extra `source` field
("chrony" / "timedatectl") so the operator can see which backend
answered the probe.
2026-06-08 09:49:51 +02:00
..
routers Initial commit: SecuBox-DEB migration from OpenWrt to Debian 2026-03-21 09:41:06 +01:00
__init__.py Initial commit: SecuBox-DEB migration from OpenWrt to Debian 2026-03-21 09:41:06 +01:00
main.py feat(core,auth): SSO-lite session cookie accepted by require_jwt + set on login (ref #400) 2026-05-28 11:31:38 +02:00
ntp_health.py fix(auth): ntp_health falls back to timedatectl when chronyc absent (ref #498) 2026-06-08 09:49:51 +02:00
totp_pending.py feat(auth): branching /auth/login + MFA + TOTP enrol + set-password (ref #120) 2026-05-13 09:08:56 +02:00