[ejabberd] parallelized external authentication

Badlop badlop at gmail.com
Wed Jul 28 23:29:01 MSD 2010


2010/7/19 Jesse Thompson <jesse.thompson at doit.wisc.edu>:
> I implemented a patch for extauth.erl so that it is capable of spawning
> multiple scripts for any given domain.
>
> I laid out the details on this blog.
>
> http://zjt.blogspot.com/2010/07/ejabberd-parallelized-external-script.html
>
> Comments and suggestions are welcome.


New ticket:
https://support.process-one.net/browse/EJAB-1280

I applied your patch to ejabberd 2.0.5, and tested with check_pass_null.pl

Suggestion:
You exported some functions, but that seems unnecessary.

Bug:
There is some problem getting the proper Num when handling an auth request.
The number is correctly got when starting ejabberd, because I see the
proper number of scripts running.

When I configure extauth_n to 3, I get approximately 1 error out of
every 3 login attempts:
...
** Reason for termination =
** {badarg,[{extauth,call_port,2},
            {ejabberd_auth,check_password_loop,2},
            {ejabberd_c2s,wait_for_auth,2},

When configured to 2, i get approximately 50% of failed attempts.
When configured to 1 or not configured, all connection attempts fail
with that error.


Comment:
You were telling a nice story:
> ejabberd's external authentication mechanism [...] is serial.
> this is a problem for us
> I'm a Perl developer
> I eventually figured out enough Erlang
> Here is the diff.
> ...
> I haven't put this into production

Oh, why doesn't your story have a happy ending?


---
Badlop
ProcessOne


More information about the ejabberd mailing list