RocketChat / RocketChat/Rocket.Chat

LDAP: Auth.info Bind successful but user was not found via search 'DN'

Open
#11,502 12 comments 0 reactions 0 assignees 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:

LDAP: Authentication error

Steps to reproduce:

Login with current AD credentials for any user.

Expected behavior:

Successful login.

Actual behavior:

It returns that message: User not found or incorrect password (only works with old cached passwords - Login Fallback).

Server Setup Information:
  • Version of Rocket.Chat Server: 0.66.2
  • Operating System: Ubuntu 16.04.3 LTS
  • Deployment Method: Snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 8.11.3
  • MongoDB Version: 3.2.7
Additional context

Recent issue - Installed since spring 2017.

Relevant logs:

20180718-17:31:38.427(-3) LDAP Auth.info Authenticating CN=testuser,OU=Users,DC=domain,DC=local
20180718-17:31:38.661(-3) LDAP Search.info Search result count 0
20180718-17:31:38.664(-3) LDAP Auth.info Bind successful but user was not found via search CN=testuser,OU=Users,DC=domain,DC=local { scope: 'sub', filter: PresenceFilter { attribute: 'objectclass', type: [Getter], json: [Getter] } }
20180718-17:31:38.665(-3) LDAPHandler info Wrong password for testuser
20180718-17:31:38.667(-3) LDAPHandler info Fallback to default account system { username: 'testuser' }


Testing:

ldapsearch -H ldap://172.16.100.1 -x -s sub -b 'cn=testuser,ou=Users,dc=domain,dc=local'

extended LDIF

LDAPv3
base <cn=testuser,ou=Users,dc=domain,dc=local> with scope subtree
filter: (objectclass=*)
requesting: ALL

Testuser , Users, domain.local
dn: CN=testuser,OU=Users,DC=domain,DC=local

objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Testuser
[...]

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.

Research direction

No source file or test is named. Start by tracing the LDAP authentication and user-search flow that produces the reported log messages, then reproduce the Active Directory login with the supplied search parameters. Done means a successful bind finds the user and login no longer falls back to the cached-password account system.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.