[JDEV] client authorization

Bjoern Stierand wonderman at iname.com
Wed Aug 15 02:37:45 CDT 2001


Hi Jabber developers,

I want to write an authentication module to authorize jabber
users against an alternative system (with xmlrpc). Inspired
by the "example-transport" from the CVS and the "xdb_ldap" and
"xdb_sql" modules I started to code, but now I'm stuck and I
hope you can help me.

I registered the namespace "jabber:iq:auth" in the jabber.xml
to my new xdb module, but it still seems not to receive the
packets associated with this namespace. The debugging output of the server
shows that the packet is delivered to the "sessions" module
and not directly to my xdb module.

-- snip --
Wed Aug 15 10:31:34 2001  deliver.c:460 DELIVER 4:mydomain.com <route
type='auth' to='bjoern at mydomain.com' from='11 at c2s/80E7FF0'><iq
type='get' id='JCOM_22'><query
xmlns='jabber:iq:auth'><username>bjoern</username></query></iq></route>
Wed Aug 15 10:31:34 2001  deliver.c:649 delivering to instance 'sessions'
-- snap --

After the "sessions" module handled that request, it is send to my xdb module.

-- snip --
Wed Aug 15 10:31:34 2001  deliver.c:460 DELIVER 2:mydomain.com <xdb
type='get' to='bjoern at mydomain.com' from='sessions' ns='jabber:iq:auth'
id='1'/>
Wed Aug 15 10:31:34 2001  deliver.c:649 delivering to instance 'xdb_myauth'
-- snap --

But here all the infos of that packet (in this case the username, which
I could also get out of the packet itself) are lost, so I can´t handle them
in my xdb module (I use plain auth now, so the password is lost also).

Well, apart from that, I get that packet (without the important infos as I
mentioned), and I create the answer packet <iq type='result' id='some_id'>
and deliver it to the instance. The packet is delivered to the sessions module,
but it'll never get to the client. After some time the jabberd sends an error
packet to the client ("Unauthorized") and the connection is closed.

So, now the question : What am I doing wrong ?

Thanks a lot in advance

Greets
Bjoern




More information about the JDev mailing list