websafety icon indicating copy to clipboard operation
websafety copied to clipboard

captive portal v2: Captive Portal now support only 'fixed duration' expiration of sessions

Open ra-at-diladele-com opened this issue 2 years ago • 1 comments

To support 'idle period' expiration - we need to somehow get all log records and then update time of last access (when) at each log record.

It could be done from the session authenticator itself maybe - by dumping some temporary storage in temp folder for example? Maybe then the session purger that is run every 15 seconds anyway by the realtime.py daemon could then update the when time?

Need to think.

ra-at-diladele-com avatar Mar 23 '22 10:03 ra-at-diladele-com

The problem here is that to mark the session as "continuing" we need to update the timestamp from the portal_auth app. And in current squid's architecture there can be multiple portal_auth instances running.

Several possibilities:

  • implement file locking among instances of auth_portal
  • store the state in the shared database
  • make auth_portal say REST talk to a single captive portal daemon

The last way is preffered and we will implement it during work on #2011. Note this will also let us get rid of portal purger in traffic monitor realtime.py - which actually does not belong there.

ra-at-diladele-com avatar Mar 07 '23 13:03 ra-at-diladele-com