[ejabberd] External Auth and Contact List

Phil Stracchino phils at caerllewys.net
Wed Oct 18 16:57:58 MSK 2017

On 10/18/17 09:46, Webert de Souza Lima wrote:
> Hello,
> I'm new to ejabberd and I'm trying to design a cluster that would fit
> well with our existing users base.
> I know that I can provide external authentication, that's a plus.
> The next problem I have is to provide the contact list from my existing
> users db. Is that achievable?
> The existing users database is a MySQL instance that should not be the
> same of ejabberd's.
> I want ejabberd to be able to read-only the global MySQL users DB, and
> have its own MySQL server (local but cluster-wide).

Your question isn't entirely clear.  I don't understand what you mean by
"local but cluster-wide", for example.

However, let me read between the lines here and make some assumptions:

You have an existing schema containing your users, which we'll call
(logically enough) 'users', and your ejabberd will connect to MySQL as
user 'ejabberd' and store its data in the schema 'ejabberd', connecting
to MySQL only from localhost.  All jabberd nodes will also be nodes of
the MySQL cluster.

Is that what you meant?

In that case you can trivially easily do something like this:

GRANT SELECT, UPDATE, INSERT, DELETE ON ejabberd.* TO ejabberd at localhost
IDENTIFIED BY 'ejabberd password goes here';
GRANT SELECT ON users.* TO ejabberd at localhost;

  Phil Stracchino
  Babylon Communications
  phils at caerllewys.net
  phil at co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958

More information about the ejabberd mailing list