Repository navigation
Track user sessions - #21592
Track user sessions#21592MorrisJobke wants to merge 4 commits into
Conversation
|
By analyzing the blame information on this pull request, we identified @rullzer, @icewind1991 and @tanghus to be potential reviewers |
|
Do you have performance tests for that? Duplicating sessions in ownCloud doesn't sound like a good idea from a scalability point of view. |
|
By the way. Please mention me at big low level changes like that :-) |
I will do some.
This is a blue one, because some other blue tickets are relying on such a feature (for example LDAP password change enforce, remote log out a given user, ...) |
BTW: I tested this with few queries in mind - for example I added a 5 second timeout for recurring DB queries (both to add updated timestamps and checks if the session was killed). So a page load with e.g. 100 requests will only result in one additional queries and not 100 additional queries. Those 5 seconds are still to tweak - was just a first guesstimate ;) |
|
O.K. Thanks. So this is basically a feature that was requested and not a bugfix? |
Sadly it's needed to allow the relation of "sessionID <-> user" :( |
Yep. But this change would have prevent stuff like https://github.com/owncloud/enterprise/issues/940 and https://github.com/owncloud/enterprise/issues/445 even before they became an actual problem. |
|
@MorrisJobke any reason for the 5 seconds? Or just some number had to be picked? |
|
Things coming to my mind when looking at this:
|
correct. |
Probabaly a good idea to look into http://php.net/manual/en/class.sessionhandlerinterface.php then. |
|
@karlitschek I'd like to address this topic in the dev cycle of 9.1 including proper analysis of opportunities and impact - this touches too many pieces which are connected. Objections? @MorrisJobke Thanks for the work on this! |
|
Performance tests are running: https://github.com/owncloud/administration/tree/octo-weasel/ansible/octo-weasel Now we have to wait 🕐 |
|
agreed. let's move it to 9.1 |
@MorrisJobke any results? 😉 |
| <name>session_id</name> | ||
| <type>text</type> | ||
| <default></default> | ||
| <length>128</length> |
|
|
||
| <field> | ||
| <name>created_at</name> | ||
| <type>integer</type> |
* introduced a timeout for writing the updated session information to DB (at most every 5 seconds) * logout and session regeneration will result in dropping the session from DB * IP and user agent of the session starting request is stored (for information about the session)
* allows to drop the session from the database and then kill the active session automatically * this check is done at most once every 5 seconds * ref #18410
d448e57 to
b4cd518
Compare
Ummm I will check later. |
|
While this is awesome. I still think we should do it right from the start and implement a session handle (http://php.net/manual/en/class.sessionhandlerinterface.php). That way ownCloud handles all of the session. |
|
Session handler is out of scope currently from my pov. The arch impact is too big. |
|
Not sure how much overlaps with @ChristophWurst's work ? |
done
done, once per minute though
done
only the user agent is saved for the session token
users are logged out if the password was changed (user backend is queried once per 5 minues) |
|
@ChristophWurst This means, that you implemented all of this already? That would be super nice. I want to talk to you about this anyway :) |
Nor sure if it's all, but most of it I think ;-) |
|
#24189 is a lot better and my PR is superseeded by this -> closing |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
missing items:
cc @DeepDiver1975 @PVince81 @LukasReschke