vesse / passport-ldapauth

LDAP authentication strategy for Passport
MIT License
312 stars 100 forks source link

Can`t use ldap for sso, having error when trying to find some user #83

Closed denys-codefresh closed 5 years ago

denys-codefresh commented 5 years ago

Problem: if i use credentials of some user (not admin), lets call him main user, i cant find other users using credentials of main user. All users placed in one OU group and i can find them using cli. After investigation of https://www.npmjs.com/package/ldapjs i figure out that from ldap i receive few messages during auth process, one of them include data about user which i want find so its ok, but last message have status 49 and this cause error in node_modules/ldapjs/lib/client/client.js line 1419.

I need help how avoid this error

Reproduce: Use this docker image for create ldap server https://github.com/rroemhild/docker-test-openldap Options: url: ldapUrl, bindDN: 'cn=Philip J. Fry,ou=people,dc=planetexpress,dc=com', bindCredentials: 'fry', searchBase: 'dc=planetexpress,dc=com', searchFilter: 'mail=hubert@planetexpress.com',

request.body: userName: Fry, password: fry

vesse commented 5 years ago

Snippet from the issue template:

Note: if the issue template is not used, the issue will be closed.