Allow ejabberd_service (Jabber Component Protocol) to modify user's roster

601 views Asked by At

I'm trying to use ejabberd_service (which is Jabber Component Protocol implementation, http://xmpp.org/extensions/xep-0114.html) to integrate ejabberd with an external application.

The use case is to ask for subscription and add an item to the user's roster by the external application on behalf of the user. I manage both ejabberd cluster and the external application, so I assume they both trust each other.

The problem is that even if stanzas are sent and received properly, no changes are visible in user's roster. This is true even if I set service_check_from option of ejabberd_service to false and add ejabberd_service as manager to mod_roster configuration.

I also don't see any error/warning in ejabberd logs.

I wonder if it is possible, according to XMPP protocol, to modify user's roster by external trusted application on behalf of the user and if yes, how to configure it in ejabberd?

2

There are 2 answers

3
vitalyster On

Remote Roster Management support is included in ejabberd since version 14.x

2
Mickaël Rémond On

Jabber Component Protocol (XEP-0114) clearly states that it cannot act on behalf of users. It can only send packet with a from of its own subdomain.

XEP-0356 Priviledged entity may change that in the future by offering a model for trusted components with more ability inside the attached XMPP server. It is not yet implement in ejabberd however.

I think your best option at the moment is to write a custom ejabberd plugin or implement XEP-0356.