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
LDAP Existing user data not updated on Background Sync #13069
Comments
FYI, I have a commit pending for this -- I just have to sort out my fork's branches. |
What a perfect bug report. |
@reetp I wrote it backwards. I identified the code, fixed it, and then wrote the bug report. I put the references to the lines of code in the PR to make the issue more readable, to increase the chance a less technical person could recognize their own situation. I don’t consider it a stellar bug report example precisely because I wrote it with hindsight on my side and the code ready to go. I knew what details were relevant from my own hunt. And I was freed from needing to sell the bug as valid and solvable. The ldap sync features have so many permutations of chat server and ldap server configs that it is more likely it would have been closed due to the obnoxiousness of reproducing it. What this issue does do is offer insight to justify my PR. Which is why I followed the template. |
@ohmonster did you marked the setting |
Yes |
@ohmonster what happens if you disable the |
@rodrigok when I make those changes, and click the button on the LDAP settings page, it has essentially the same effect -- users I expect to see updated are not updated, but new users are imported. However, in looking at the code again, it looks as if the cron job uses a code block not called by anything else -- sync.js, function sync(). So I bumped my Background Sync Interval to a higher frequency, and watched that. At that point, users I would expect to have updates. But the logs aren't very informative. Here's a sample: |
+1 |
same problem. mark. |
Description:
We use LDAP exclusively for user data and authentication. When an existing user logs in, any changes on the LDAP side (avatars and data we map to custom fields), get updated. When we perform a background sync -- manually from Administration or from the cron job -- new users are added. However, users that already exist do not have their data updated.
Steps to reproduce:
Expected behavior:
I expect the user in step 1 above to have a new avatar, matching the one in LDAP. With tracing turned on, I expect to see a log line indicating an avatar was updated.
Actual behavior:
No update to the user takes place. No errors are logged.
Server Setup Information:
LDAP settings
LDAP Enable: true
Login Fallback: false
Find user after login: true
Merge Existing users: true
Logging: trace
Sync user data: true
Sync user avatar: true
Background sync: true
Background Sync import new users: true
Background sync update existing users: true
Relevant logs:
Here is the log from the code that doesn't work.
�[34mI20190103-16:39:39.300(-6) LDAP ➔ Connection.info Init setup �[34mI20190103-16:39:39.304(-6) LDAP ➔ Connection.info Connecting ldap://corp.perfect-10.tv:389 �[34mI20190103-16:39:39.310(-6) LDAP ➔ Connection.info LDAP connected �[34mI20190103-16:39:39.311(-6) LDAP ➔ Bind.info Binding UserDN MIS_Wiki@corp.perfect-10.tv �[34mI20190103-16:39:39.316(-6) LDAP ➔ Search.info Searching user * �[34mI20190103-16:39:40.874(-6) LDAP ➔ Search.info Page �[34mI20190103-16:39:40.874(-6) LDAP ➔ Search.info Page �[34mI20190103-16:39:41.289(-6) LDAPSync ➔ info Import running. Users imported until now: 100 �[34mI20190103-16:39:41.405(-6) LDAPSync ➔ info Import running. Users imported until now: 200 �[34mI20190103-16:39:42.168(-6) LDAP ➔ Search.info Final Page �[34mI20190103-16:39:42.170(-6) LDAP ➔ Search.info Final Page �[34mI20190103-16:39:42.204(-6) LDAPSync ➔ info Import running. Users imported until now: 300 �[34mI20190103-16:39:42.273(-6) LDAPSync ➔ info Import running. Users imported until now: 400 �[34mI20190103-16:39:42.344(-6) LDAPSync ➔ info Import running. Users imported until now: 500 �[34mI20190103-16:39:42.407(-6) LDAPSync ➔ info Import running. Users imported until now: 600 �[34mI20190103-16:39:42.455(-6) LDAPSync ➔ info Import finished. Users imported: 662 �[34mI20190103-16:39:42.456(-6) LDAPSync ➔ info Import finished. Users imported: 662 �[34mI20190103-16:39:43.456(-6) LDAP ➔ Search.info Idle �[34mI20190103-16:39:43.458(-6) LDAP ➔ Connection.info Disconecting �[34mI20190103-16:39:43.460(-6) LDAP ➔ Search.info Closed
The text was updated successfully, but these errors were encountered: