You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Store all known users from all user managers in a single table #21282
Current issue in a LDAP scenario (also applies to other user managers):
Only local users are stored in oc_users
LDAP users are stored separately in mapping tables, the tables are LDAP specific
No easy way to work with all users on SQL-level (repair steps, etc)
On PHP level, additional round trips required to all user managers when doing user searches, for example for share autocomplete
Proposed solution:
Either reuse oc_users or provide new tables to store all users (and maybe groups too) that are known to this ownCloud instance. The table itself will have a "externalUserId" and "externalUserType" to be able to link it to other user-manager specific tables (ex: LDAP).
This is also important to be able to properly map users to their storages. Currently LDAP users have no entries in oc_users, so if you start with a storage in the DB and want to go back to the user data you're out of luck.
oc_users are and should be kept for local users. There are other information we like to store as well in a unified way and still user backends will continue to take care of their affairs (managing users) in their systems. So it's best to imagine oc_users is an external resource as well.
#19600 mixes up user names and login names. The problem is programtic: developers used to expect that the login name matches the user name which is even not always true for internal users as you can login with JABBAtheHUTT but your username still is 'jabbathehutt'.
In that table we can store all the user related information, like displayname, email, maybe user directory path, and keep the user backends in charge to keep the information up to date. It will be difficult for search, because user backends (like LDAP) offer more advanced search functions that are run on backend side. For just internally done searches (in user or display names) the table will suffice.
With the new auto-complete for federated sharing across ownClouds we create a carddav address book with all system users. We can use this address book in the future for other stuff as well.
Be able to work with all users on SQL-level (repair steps, etc)
On PHP level, additional round trips required to all user managers when doing user searches, for example for share autocomplete
Further possibilities
assist user backends in providing a unique ownCloud username that follows constraints (e.g. allowed characters). LDAP does it by itself, which leads to code duplication and complexity.
Integration in current procedures
User backends may keep their private, specialized tables (e.g. to map the ownCloud name to one or more backend-native features like DN and UUID).
rows must only be removed on a successful user deletion operation, triggered by core (in other words, user backends must not delete from the table).
user exists calls must to be done against the user backend, after a successful lookup in this table. Possible "isDeleted" (see below) field should not be taken into account (possible Undos or Backups on server side).
Population: full and active vs. on demand
How shall the table be populated?
Some user backends do not have a user listing thus are not be able to provide user information without knowing a user by login.
An automatic sync requires cron. Triggered by Ajax over huge user backends does not sound right.
An incomplete (i.e. not up to date) table can be only used for maintenance and background tasks
A combination of both (backends with listings populated and keep up to date automatically, backends without populate+update on logins and changes)
Search
LDAP allows to search in several, configurable attributes (e.g. email adresses, different combinations of first and last name, license plate number, …). Despite having a central table it must be possible to provide a server-side search.
This contradicts goal 2.
Plain lookups without a search string may operate on this table.
email - currently saved in preferences, app "settings"
homeDirectory - name/path of the user home directory (LDAP allows to override whole path). Basically the return value of the backend's getHome().
backendName
Additional candidates ("nice to have")
lastLogin - currently saved in preferences, app "login"
firstLoginAccomplished - a mark that is set when the first login is done. (Currently saved LDAP specific in oc_preferences. FirstRunWizard does something else.)
isDeleted - a flag that can be set by the userbackend, if a user is not accessible on the backend anymore. Currently, LDAP uses this in oc_preferences.
Activity
PVince81 commentedon Dec 18, 2015
This is also important to be able to properly map users to their storages. Currently LDAP users have no entries in oc_users, so if you start with a storage in the DB and want to go back to the user data you're out of luck.
DeepDiver1975 commentedon Dec 18, 2015
related #18227
blizzz commentedon Dec 18, 2015
oc_users are and should be kept for local users. There are other information we like to store as well in a unified way and still user backends will continue to take care of their affairs (managing users) in their systems. So it's best to imagine oc_users is an external resource as well.
#19600 mixes up user names and login names. The problem is programtic: developers used to expect that the login name matches the user name which is even not always true for internal users as you can login with JABBAtheHUTT but your username still is 'jabbathehutt'.
In that table we can store all the user related information, like displayname, email, maybe user directory path, and keep the user backends in charge to keep the information up to date. It will be difficult for search, because user backends (like LDAP) offer more advanced search functions that are run on backend side. For just internally done searches (in user or display names) the table will suffice.
MTRichards commentedon Jan 7, 2016
The bigger sledgehammer needs a milestone so it gets considered. Setting to 9.1.
schiessle commentedon Jan 7, 2016
With the new auto-complete for federated sharing across ownClouds we create a carddav address book with all system users. We can use this address book in the future for other stuff as well.
blizzz commentedon Mar 21, 2016
Thoughts from LDAP PoV
What are the use cases/goals?
To start with. Taken from above:
Further possibilities
Integration in current procedures
Population: full and active vs. on demand
Search
Table Fields
Not necessarily complete, suggestions.
Field suggestions
Additional candidates ("nice to have")
Further considerations
PVince81 commentedon Mar 24, 2016
A rough design has been proposed here: #23558
blizzz commentedon Mar 30, 2016
@PVince81 should we close this one in favor of #23558?
DeepDiver1975 commentedon Jun 9, 2016
yes
lock commentedon Aug 4, 2019
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.