RocketChat / RocketChat/Rocket.Chat

Setting Search Page Size in LDAP options makes ldap logins fail

Open
#8,929 7 comments 9 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:

Using 0.59.3 with LDAP authentication enabled, using "Page Size" causes all ldap based logins to fail with:

 20171123-09:46:49.279(0) LDAP ➔ Search.info Searching user testuser
 20171123-09:46:49.280(0) LDAP ➔ Search.debug searchOptions { filter: '(&(&(objectclass=WEBIDUSER)(ENTITLEMENTGRANTED=SomeFlag--NR))(uid=testuser))',   scope: 'sub',   sizeLimit: 1000,   paged: { pageSize: 500, pagePause: false } } 
 20171123-09:46:49.281(0) LDAP ➔ Search.debug BaseDN o=Customers 
 20171123-09:46:49.455(0) rocketchat_logger rocketchat_logger.js:375 LDAP ➔ Search.error { [PagedError: missing paged control] name: 'PagedError' } 
 20171123-09:46:49.462(0) rocketchat_logger rocketchat_logger.js:375 LDAPHandler ➔ error { [PagedError: missing paged control] name: 'PagedError' } 
 20171123-09:46:49.464(0) LDAPHandler ➔ info Fallback to default account system { username: 'testuser' } 
Server Setup Information:
  • Version of Rocket.Chat Server: 0.59.3
  • Operating System: Linux
  • Deployment Method(snap/docker/tar/etc): docker image
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Disabled
  • Node Version: v4.8.4
Expected behavior:

LDAP search should succeed (user search does succeed when paging is disabled)

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

Start by reproducing an LDAP login with Page Size enabled and inspect the logged searchOptions, paged settings, and missing paged control error. Compare the same user search with paging disabled; done means LDAP authentication succeeds while paging is enabled without the reported PagedError.

Written by the indexing model from the issue text.

Assessment

Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.