RocketChat / RocketChat/Rocket.Chat

LDAP Existing user data not updated on Background Sync

Open
#13,069 9 comments 4 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

area: authentication
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

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:
  1. Identify an existing user in your RocketChat install.
  2. Change their avatar in Active Directory/LDAP.
  3. Go to Administration>LDAP>Sync/Import
  4. Click Execute Synchronization Now.
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:
  • Version of Rocket.Chat Server: 0.73.1
  • Operating System: Linux Ubuntu 16.04.5 LTS
  • Deployment Method: tar, manual deployment
  • Number of Running Instances: 4
  • DB Replicaset Oplog:
  • NodeJS Version: 8.11.4
  • MongoDB Version: 3.6.6
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.
I20190103-16:39:39.300(-6) LDAP ➔ Connection.info Init setup I20190103-16:39:39.304(-6) LDAP ➔ Connection.info Connecting ldap://corp.perfect-10.tv:389 I20190103-16:39:39.310(-6) LDAP ➔ Connection.info LDAP connected I20190103-16:39:39.311(-6) LDAP ➔ Bind.info Binding UserDN MIS_Wiki@corp.perfect-10.tv I20190103-16:39:39.316(-6) LDAP ➔ Search.info Searching user * I20190103-16:39:40.874(-6) LDAP ➔ Search.info Page I20190103-16:39:40.874(-6) LDAP ➔ Search.info Page I20190103-16:39:41.289(-6) LDAPSync ➔ info Import running. Users imported until now: 100 I20190103-16:39:41.405(-6) LDAPSync ➔ info Import running. Users imported until now: 200 I20190103-16:39:42.168(-6) LDAP ➔ Search.info Final Page I20190103-16:39:42.170(-6) LDAP ➔ Search.info Final Page I20190103-16:39:42.204(-6) LDAPSync ➔ info Import running. Users imported until now: 300 I20190103-16:39:42.273(-6) LDAPSync ➔ info Import running. Users imported until now: 400 I20190103-16:39:42.344(-6) LDAPSync ➔ info Import running. Users imported until now: 500 I20190103-16:39:42.407(-6) LDAPSync ➔ info Import running. Users imported until now: 600 I20190103-16:39:42.455(-6) LDAPSync ➔ info Import finished. Users imported: 662 I20190103-16:39:42.456(-6) LDAPSync ➔ info Import finished. Users imported: 662 I20190103-16:39:43.456(-6) LDAP ➔ Search.info Idle I20190103-16:39:43.458(-6) LDAP ➔ Connection.info Disconecting I20190103-16:39:43.460(-6) LDAP ➔ Search.info Closed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.