mod_rest: external auth_method, access_commands internal server error

I'm using as auth_method an external python script, which checks if the user exists in the database. Using the REST module with 'access_commands' doesn't work and only returns 'internal server error'. The user exists in the database.
Turning off the external auth script and using the internal method the REST module works with 'access_commands'.

jabberd.cfg:

  {auth_method, external}.
  {extauth_program, "/etc/ejabberd/check_mysql.py"}.

[...]

  {acl, restuser, {user, "bot", "example.com"}}.
  {access, restapi, [{allow, restuser}]}.

[...]

  {modules, [
    {mod_rest, [
      {access_commands, [ {restapi, all, []} ]}
     ]}
   ]}.

Workaround

For a the people that searching for that problem, i've a small workaround.

First changing the auth method to external and fallback internal mode:

  {auth_method, [external, internal]}.

Remove the user "bot" from your external database and create the account locally via the 'ejabberdctl register' command

  $ ejabberdctl register bot example.com secret

Now you can use the 'access_commands' for the mod_rest to manage the acl stuff :-)

Syndicate content