Reconcile Wi-Fi sessions against UniFi authorizations
Necessary because session windows are now measured in months. Any drift between our rows and UniFi's authorizations used to be washed away by short windows and frequent portal visits; now it persists. Three jobs. Expire rows past expires_at, which was historically written and never read, so a finished row kept consuming one of the person's device slots forever. Reconcile both directions: revoke an authorization UniFi holds with no live row of ours — a device on the network nobody can see and nobody's quota is paying for, which is exactly what the old presence-based sweep produced — and re-assert a row we consider live that UniFi has forgotten, so a controller upgrade does not bounce somebody back to the portal for something that was not their doing. Third, record what UniFi thinks each device is. Reported only, nothing acts on it: UniFi infers dev_cat from observed traffic, so it does not exist at the moment of authorization and the reconciler is the first point at which there is anything to record. It only ever fills in — an unfingerprinted client must not blank a type already recorded, or the answer is lost every time the device happens to be quiet. A controller we cannot reach is not evidence that anything should change, so a failed read returns after the local expiry work rather than concluding that every authorization is an orphan. NOT scheduled. It calls unauthorizeGuest against a live controller, and nothing here has been tested against real hardware — scheduling belongs with the supervised verification session, not with the code.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dashboard/unifi",
|
||||
"description": "UniFi network management, WiFi stats, and captive portal authentication for the Dashboard platform",
|
||||
"version": "1.13.4",
|
||||
"version": "1.13.5",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
|
||||
Reference in New Issue
Block a user