-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inGroup and getUserGroups have different cache keys and implementations #30
Comments
From what I see the cache would be memcache |
I tried to force clear partially the cache and found out that |
and "inGroup-members" ... |
Here are steps to reproduce, it is a bit difficult because it needs a special sharing scenario: owncloud/core#26683 (comment) It is likely that we can find other easier code path that would trigger |
Also observed on a real env where |
We need to rewrite this caching thing to make more sense and only cache a single info once. |
@IljaN I'd like you to have a look at this. You can setup a test LDAP docker using these scripts: https://github.com/owncloud/administration/tree/master/ldap-testing (start.sh then run the zombie spawner scripts). See inside the scripts for the LDAP credentials. You'll also need to setup a memcache in ownCloud. Let me know if you need more info about the setup, how to setup LDAP or details about this issue. |
Postponed until owncloud/core#23558 is done. Memcache usage will be obsoleted by the introduction of the central user+group account table" |
Due to the nature of how caching is done here using hashing keys, it is not possible to cache everything only in a single location because we can't look up / search hashed values. (ex: find all groups in which user1 is in) |
The user account table is in 10.0 but we'll also need a group table to be able to resolve this. |
@jvillafanez is the new adjusted LDAP impl still using memcache for anything ? |
I'd expect
Group_LDAP::inGroup
to simply useGroup_LDAP::getUserGroups
or at least use the same cache keys.This means that it could happen that the cache contains slightly different values, leading to bugs like owncloud/core#26683 where one API which uses
getUserGroups()
sees that the user is member of a group, butinGroup
says the user isn't.@jvillafanez @owncloud/ldap
The text was updated successfully, but these errors were encountered: