You also fixed a bug, which I have applied to the prosody-modules
version. Thanks:
http://code.google.com/p/prosody-modules/source/detail?r=ca6199d73d68dcffead55b4931590a3daaddc9c2
> I am using ldap_search to find the DN of users, and ldap_bind to test
> the password, which also works when userPassword is hashed.
Great. Send an hg bundle/patch here, or ask us in the Prosody room, so
we can get this into prosody-modules.
I see you create a new LDAP connection. Someone patched lualdap to add
a bind_simple() method to the ldap object:
http://prosody.im/patches/lualdap.patch
The intent for this module was to eventually both work this way, and
to provide added features when we have a non-hashed password
available. We can provide SASL DIGEST-MD5, SCRAM-SHA-1, etc, only when
we have access to a plain password.
> Noticed two things:
> I need to specify 'scope' for ldap-search, else the query fails
> silently on my setup (I see a 'missing scope' message in strace but
> nowhere else, and I have not found a way to get ldap-error-messages in
> lualdap so far).
We should get lualdap fixed then. I wrote mod_auth_ldap, but never
actually got around to testing it and any error cases.
> In core/usermanager.lua, function user_exists (line 77) I need to add
>
> if not host or not hosts[host] then return false; end
>
> else it tries to check for host e.g. 'conference.jabber.stefant.org'
> which does not seem to have an entry in hosts, and in some rare cases
> 'host' and 'username' seem to be empty, which results in a stacktrace
> in the log and no messages are delivered. No idea if this is a problem
> due to my auth_ldap stuff or another bug in my prosody version.
>
I'd like to see the trace.
> I am using the prosody-0.8 debian package (version 1-1~nightly11) with
> lualdap 1.1.0 on debian stable.
>
> Regards, Stefan
>
--
Waqas
Stefan has moved the file, it is now at
http://scm.stefant.org/svn/tools/stuff/trunk/patches/prosody/mod_auth_ldap.lua
.
To avoid future confusion, I've given the file a header and copied it
to http://prosody.im/files/mod_auth_ldap.lua
Thanks Stefan, and to the person who discovered the broken link :)
The plan is still to probably merge these modules (this one and the
one in prosody-modules), but our efforts are all on getting Prosody
0.9 released at the moment.
Regards,
Matthew