Ask HN: Method of tracking login time for a web app?

3 points by Jonnax ↗ HN
Are there any good solutions for tracking the time people are logged into and using a web app?

Got a scenario where we want to share the cost of a floating licence fairly between multiple teams. And rather than us logging into a spreadsheet manually, I was wondering if there's a tool that could do that easily.

Would an SSO tool be able to do that?

I know there's browser extensions but it feels like a hassle to set up.

Perhaps a web proxy? Would it be possible to set something good up with nginx, Apache or HA Proxy, that would sit in front of the web app?

Perhaps a firewall could do the job? Somehow counting sessions per IP? But then it gets tricky to work backwards to user, and would have to MITM the traffic?

Or maybe there's some nice opensource tool that does this in a really nice and easy way?

1 comment

[ 0.22 ms ] story [ 13.9 ms ] thread
You could create an nginx proxy configuration that for each request for a certain webpage, it not only redirects to the webpage but also sends a subquery to another server or microservice that you need to implement, which would log the origin IP and timestamp. Then you use/process that information.