[ejabberd] Shared Roster / Groups with External Authentication: Possible?

Tom Lancaster tom at tnhvietnam.com
Tue Jan 3 14:18:21 MSK 2012


Esteemed list members,

I have been wracking my brain and reading everything I can to
establish whether I can accomplish the following using ejabberd:

1) Everyone in a shared roster (ie: all users of my website can see
each other through an xmpp client)
2) Roster groups pre-set through the web interface

I am authenticating users against my web application, which is a
community site with interest groups and a group of moderators. I use
an external auth script to do this.

I have tried setting up roster groups through the web interface,
specifically, I've tried to add all the moderator usernames to a
"mods" group. When I log in via iChat or Adium as one of these users I
expect to see a list of the other users; I don't see any contacts.

I understand that ejabberd would need to have a list of "all users"
specified in order to be able to feed them as a roster to others. I've
seen references to doing this for LDAP using ejabberdctl. Is there a
way to accomplish the same for my web app's user list?

Here is the vhost configuration from ejabberd.cfg:

{acl, admin, {user, "grubby", "chat.xemzi.com"}}.
{access, configure, [{allow, admin}]}.
{acl, xemzi, {server, "chat.xemzi.com"}}.
{acl, xemzi, {server, "muc.chat.xemzi.com"}}.
{acl, xemzi_admin, {user, "grubby", "chat.xemzi.com"}}.

{host_config, "chat.xemzi.com", [
    {extauth_program,
"/var/www/vhosts/xemzi.com/httpdocs/scripts/ejabberd_external_auth.php"},
% adapt path!
    {auth_method, external},
    {access, xemzi_muc, [{allow, xemzi}]}, % multi user chat only for
phpbb users
    {access, xemzi_muc_admin, [{allow, xemzi_admin}]}, % multi user
chat administration only for phpbb admin
    {{add, modules}, [
        {mod_http_bind, []}, % provides a BOSH server
        {mod_muc, [ % multi user chat
                  {host, "muc.chat.xemzi.com"},
                  {access, xemzi_muc}, % TODO: not working yet!
                  {access_create, xemzi_muc},
                  {access_persistent, xemzi_muc},
                  {access_admin, xemzi_muc_admin},
                  {max_users, 500},
                {default_room_options,
                        [
                          {allow_change_subj, true},
                          {allow_private_messages, true},
                          {allow_user_invites, true},
                          {anonymous, true},
                          {members_by_default, true},
                          {persistent, true},
                          {public, true},
                          {public_list, false}
                        ]},
        {mod_disco, [{extra_domains, ["muc.chat.xemzi.com"]}]}
        ]}
    ]}
]}.

===

Thanks in advance for any pointers.

Best regards,


Tom


More information about the ejabberd mailing list