Configuring ejabberd pour pubsub
Posted: 23 March 2008 11:32 PM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2008-03-23

Hello,

I am not sure being in the right place because the topic of the forum is “modules development”. But in the meantime, I don’t see a forum dedicated simply to ejabberd.

Anyway I hope I could find some help here.
Here is my issue: I have a ejabberd server (v 2.0.0), mainly for my own use and for friends (I don’t host massively, I cannot bear such a responsibility as for now) and for test purpose. I am currently writing a program which needs to publish to a Jabber node.

A few weeks ago, for test, I know I managed to create some collection nodes. But now that I nearly finished my program and needed to create the nodes I need, I realized I don’t manage to create nodes anymore. I don’t understand: did I change something in my server configuration? I don’t think so. I mainly kept the default conf:

%% Everybody can create pubsub nodes
{access, pubsub_createnode, [{allow, all}]}.

{mod_pubsub, [ % requires mod_caps
{access_createnode, pubsub_createnode},
{plugins, ["default", “pep"]}
]},

What I do to create a pubsub collection node is (following XEP 60):

<iq type=’set’
from=’account@server/resource’
to=’pubsub.server’
id=’create3’>
<pubsub xmlns=’http://jabber.org/protocol/pubsub’>
<create node=’test’>
<configure>
<x xmlns=’jabber:x:data’ type=’submit’>
<field var=’FORM_TYPE’ type=’hidden’>
<value>http://jabber.org/protocol/pubsub#node_config</value>
</field>
<field var=’pubsub#node_type’>
<value>collection</value>
</field>
</x>
</configure>
</pubsub>
</iq>

And I get:

<iq from=’pubsub.server’ to=’account@server/resource’ type=’error’ id=’create3’>
<pubsub xmlns=’http://jabber.org/protocol/pubsub’>
<create node=’test’>
<configure>
<x xmlns=’jabber:x:data’ type=’submit’>
<field var=’FORM_TYPE’ type=’hidden’>
<value>http://jabber.org/protocol/pubsub#node_config</value>
</field>
<field var=’pubsub#node_type’>
<value>collection</value>
</field>
</x>
</configure>
</pubsub>
<error code=’403’ type=’auth’>
<forbidden xmlns=’urn:ietf:params:xml:ns:xmpp-stanzas’/>
</error>
</iq>

I get the same kind of ‘auth’ error with a leaf node. And more I am not able anymore to delete the nodes I created previously! I again get a ‘auth’ error! And I cannot find who is the owner of these nodes to see why I have no right on them.

What do I do wrong here? Why is there an authorization issue though I apparently set the server with right to everyone to create nodes (moreover the address I am using is the admin of the server!)?

Is there a xmpp issue (but I am using exactly the commands from the XEP!)? Or a server’s configuration issue? I don’t get it.

P.S.: by the way, do you know some Jabber server where there is a pubsub server with general authorization to create nodes?
if I try for instance at pubsub.jabber.org and with such a command:

<iq type=’set’
from=’my_jid’
to=’pubsub.jabber.org’
id=’create1’>
<pubsub xmlns=’http://jabber.org/protocol/pubsub’>
<create node=’princely_musings’>
<configure>
</pubsub>
</iq>

I get this response which corresponds to no sort of error according to the XEP:

<iq from=’pubsub.jabber.org’ to=’my_jid’ type=’error’ id=’create1’>
<pubsub xmlns=’http://jabber.org/protocol/pubsub’>
<create node=’princely_musings’>
<configure>
</pubsub>
<error code=’400’ type=’modify’>
<bad-request xmlns=’urn:ietf:params:xml:ns:xmpp-stanzas’/>
</error>
</iq>

Profile
 
 
Posted: 24 March 2008 02:21 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  2
Joined  2008-03-23

Hello,

I think I asked at the wrong forum as I noticed the community site at ejabberd.im. Moreover I also discovered this page about the pattern of the nodes: http://www.ejabberd.im/node/1643

And for my specific case, I could create a node at the jabber.org server, but only with a jabber.org account and this command:

<iq type=’set’
from=’jehan@jabber.org/Gajim’
to=’pubsub.jabber.org’
id=’create3’>
<pubsub xmlns=’http://jabber.org/protocol/pubsub’>
<create node=’home/jabber.org/jehan’>
</pub

But the exact same command applied to my personnal server won’t work. I still try to figure why.

Profile