[ejabberd] Auth issue when migrated from ejabberd 14 to 17

Abhay Jain abhayj1303 at gmail.com
Mon May 8 21:35:21 MSK 2017


Appreciate your efforts to write mysplauth.erl sample, but I am not very
sure if this will solve my issue. Let me explain,

When my xmpp client used to send the above mentioned <stream:stream>
packet, the old ejabberd used to send it to the first definition of
"ejabberd_receiver:process_data" (which is "Data processing for connectors
directly generating xmlelement in Erlang data structure.")

But now, the new ejabberd sends it to the second definition of
"ejabberd_receiver:process_data" (which is "Data processing for connectors
receivind data as string.")



The difference is, older version used to process my <stream:stream> packet
recursively. First parent element <stream:stream> was processed and fsm
state used to change to 'wait_for_features' and then child element
<mysplauth> was processed during that fsm state.

But now, this packet is being sent directly as string so my child element
<mysplauth> becomes irrelevant.



I hope I am able to explain my issue.

On Mon, May 8, 2017 at 10:46 PM, Evgeny Khramtsov <xramtsov at gmail.com>
wrote:

> Mon, 8 May 2017 20:59:58 +0530
> Bhag Chandra <bhag.chandra.erl at gmail.com> wrote:
>
> > In my previous ejabberd setup, I used to send the <auth> along with
> > the stream initiation request from client. So xmpp packet looked like
> > this :
> >
> >
> >
> > <stream:stream to="server" xml:lang="*" version="1.0" xmlns:stream="
> > http://etherx.jabber.org/streams" xmlns="jabber:client">
> >
> > <mysplauth xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
> > <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">
> > string_string_base64_string</auth>
> > <version xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> 1.0 </version>
> > <resource xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> resource
> > </resource> </mysplauth>
> >
> >
> >
> > I know this way of sending auth in stream initiation is not
> > conventional way of doing it, but I was doing it and it worked fine.
> >
> > But the 17.04 is more modular and I can understand how to implement
> > same thing in it. 17.04 completely ignores my auth stanza.
>
> Adding new tags to the xmpp library is described here:
> https://github.com/processone/xmpp/issues/9
>
> The specification for your element will look similar to this:
> https://gist.github.com/zinid/12775db809d3aeb653920730f382f17c
> (adjust 'min' and 'max' parameters if you need your elements to be
> mandatory).
>
> With this schema applied, you will receive your element in the form:
>
> #mysplauth{version = {1,0},
>            resource = <<"resource">>,
>            auth = #sasl_auth{mechanism = <<"PLAIN">>,
>                              text = <<"some_data">>}}
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>



-- 
Abhay Jain

Class of 2011, Netaji Subhas Institute of Technology,
University of Delhi, India

http://about.me/abhay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20170509/df952118/attachment.html>


More information about the ejabberd mailing list