0
votes

I am trying to get list of all the users registered on the server. My server is Ejabberd. When I use service discovery on all users node, I get 403 error. Here's my request stanza and error stanza -

Request

<iq id="U7" type="get" to="server.lt" xmlns="jabber:client">
  <query node="all user" xmlns="http://jabber.org/protocol/disco#items" />
</iq>

Response

<iq from="server.lt" to="[email protected]/res" id="U8" type="error" xmlns="jabber:client">
  <query xmlns="http://jabber.org/protocol/disco#items" node="all users" />
  <error code="403" type="auth">
    <forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  </error>
</iq>

When I checked on server, I didn't find any mod_disco there, so I added new mod_disco module. Do I need to do further modification on server or is there any problem in my request stanza?

Update:
I tried by giving my user admin access and the command did work, but it's not practical to give each user an admin access. Is there any way I can do it using client or the server without using admin access for user?

1

1 Answers

1
votes

Access to the all users info node is hard-coded to use the configure access rule. In the default configuration, it's set to only allow server admins:

%% Only admins can use the configuration interface:
{access, configure, [{allow, admin}]}.

There is no way to configure ejabberd to give access to just all users without giving access to configure everything else, it's all or nothing. You'd have to change the source code to achieve what you want.