Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix authentication issues (fix #47) #60

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

lneveu
Copy link
Contributor

@lneveu lneveu commented Jul 11, 2019

This pull request fixes authentication issues reported in #47.
As I explained in the comments:

It seems to be related with LDAP bind requests and concurrency. I can reproduce the bug when multiple authentications are made "simultaneously" (try to disable cache to reproduce the issue more easily).

Using only one instance of LdapAuth causes this. A new instance need to be created for each new authentication like it was before this pull request: #42 . See vesse/node-ldapauth-fork#23 and ldapjs/node-ldapjs#318 for more informations. The cache is now manage by the plugin itself.

Changes made here are heavly inspirated by this PR: #46 (but seems to be abandoned).

Since I use my fork (for more than 6 months now) everything works fine and I don't have any authentication issues anymore.

Note that unbinding connections (ldapClient.closeAsync) do nothing on Node 10 (see ldapjs/node-ldapjs#483), but a fix have been proposed (ldapjs/node-ldapjs#497)

@Alexandre-io
Copy link
Owner

thanks 👍

@Alexandre-io Alexandre-io merged commit fb87334 into Alexandre-io:master Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants