RocketChat / RocketChat/Rocket.Chat
LDAPSync Error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
All RocketChat servers with LDAP auth have LDAPSync errors.
Steps to reproduce:
Setup LDAP Auth and check logs
Expected behavior:
No errors
Actual behavior:
`I20201121-22:00:21.463(2) server.js:204 LDAPSync ➔ error Error creating user errorClass [Error]: Username already exists. [403] at handleError (packages/accounts-password/password_server.js:110:17) at checkForCaseInsensitiveDuplicates (packages/accounts-password/password_server.js:257:7) at createUser (packages/accounts-password/password_server.js:1125:3) at AccountsServer.Accounts.createUser (packages/accounts-password/password_server.js:1197:10) at addLdapUser (app/ldap/server/sync.js:472:29) at app/ldap/server/sync.js:538:5 at Array.forEach () at app/ldap/server/sync.js:505:13 at runWithEnvironment (packages/meteor.js:1286:24) { isClientSafe: true, error: 403, reason: 'Username already exists.', details: undefined, errorType: 'Meteor.Error' }
Server Setup Information:
- Version of Rocket.Chat Server: 3.8.0
- Operating System: Ubuntu 20.04
- Deployment Method: tar
- Number of Running Instances: 1
- DB Replicaset Oplog: -
- NodeJS Version: 12.18.4
- MongoDB Version: 4.0.21
Client Setup Information
- Desktop App or Browser Version: Safari 14
- Operating System: macOS 11
Additional context
Relevant logs:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/ldap/server/sync.js around addLdapUser at line 472 and the sync loop near lines 505-538. Reproduce with LDAP Auth enabled and inspect the logs, then read the username-duplicate handling in packages/accounts-password/password_server.js. Done means LDAP synchronization no longer reports an error for the affected user scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100