-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapenhancement
Description
Idea
Have a single trusted table for users.
It should contain:
- id: Snowflake ID, can be used later as foreign key
- login: current uid
- email: user primary email address
- status: enabled/disabled
- source: provider who created the user (Database, LDAP…), maybe with a
last_sync - last_seen: timestamp of last ping on Nextcloud (not updated on all requests)
- last_login: last successful connection on Nextcloud
Why
It's often difficult to find information about users because it needs to fetch information from several backends.
Examples:
- is this user exists? We have to check in all backends
- is this user disabled? It's stored as a preference
- get a list of user who actually connect? Also a preference
- search a user? We need to search in all backends
This table should be a single source of truth for users.
The related class can cache users so it becomes easier to know if a user exists or not.
Challenge
External backends like LDAP can add and remove user at any time. Our table must stay in sync with the backends.
This can be a background job but we have to find a good frequency.
It will introduce a latency between user added/deleted from backend and user actually in Nextcloud database.
The class should probably introduce a fallback for some important operations like login.
Ornanovitch
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapenhancement