0

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?

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
pzieba
  • 171
  • 1
  • 11

2 Answers2

0

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

vitalyster
  • 4,980
  • 3
  • 19
  • 27
  • Yes, I've seen it. Unfortunately it requires asking for user's permission by remote entity, which I need to avoid. – pzieba Jun 12 '15 at 21:42
  • That is not implemented :) you just need to add your component jid as "manager" to mod_roster configuration and server will accept roster changes from it – vitalyster Jun 13 '15 at 08:59
  • I tried setting the component as mod_roster's "manager". It didn't work. Now I think I might not add @ sign and the server name to the component name. I'll try to add it. – pzieba Jun 20 '15 at 17:01
0

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.

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
  • It works perfectly unless user's roster is involved. E.g. sending presence stanzas works as expected. – pzieba Jun 20 '15 at 16:57
  • That's exactly my point. Roster operations requires your component to send stanza on behalf of domain users, not on behalf of component. This is not allowed by XEP-0114. – Mickaël Rémond Jun 21 '15 at 20:41