Hi Matthieu,

On 1 April 2013 14:45, Matthieu Rakotojaona
<[email protected]> wrote:
> Hello everyone,
>
> If I read XEP-0033 correctly, all the forwarded messages MUST have
> original client's "from" ([email protected]/work in the XEP). It is
> explicitely stated in the XEP:

Yes, I read it that way too.

>> A multicast service MUST NOT change the 'from' address on the outer stanza. 
>> Note that this will limit third-party relaying across server-to-server 
>> connections as a side-effect.
>
> However, XEP-0114 (http://xmpp.org/extensions/xep-0114.html), the one
> that specifies how a component connects to a server, says this :
>
>> All stanzas sent to the server MUST possess a 'from' attribute and a 'to' 
>> attribute, as in the 'jabber:server' namespace. The domain identifier 
>> portion of the JID contained in the 'from' attribute MUST match the hostname 
>> of the component.
>
> So, since XEP-0033 says my component shouldn't change the "from", it
> means that I can only use it from the multicast.domain.tld domain...
> This rules works perfectly well if the multicast services lives in the
> server, but it seems to me one cannot create an external component
> that provides this functionality.
>
> Am I missing something ? These rules seem to be impossible to work
> together, is there any way I can develop a XEP-0033 service as an
> external component ?

No, you're right, this seems like an issue. XEP-0033 is an old one,
and though I'm barely old enough to remember it, the original jabberd
server was essentially a collection of components. Since they were all
part of the server, they were ultimately trusted. XEP-0114 and the
concept of 'external' components grew from this, but obviously the
level of trust was diminished.

Nevertheless, I know that at least two servers that don't always
perform the check on component 'from' addresses. In Prosody it is
configurable (strict by default), and unless it changed I don't think
ejabberd restricts them at all.

I mention this because perhaps it's worth relaxing that MUST in
XEP-0114 at least to a 'SHOULD' or 'OUGHT TO'[1]. We kept the ability
in Prosody to allow things like external XEP-0033 to be possible if
the server admin so wished, and it seems it isn't the only
implementation doing so.

On the other hand, I think external XEP-0033 is a little uncommon.
Part of the reason for it is efficiency on the wire, it makes sense
for the server to be able to handle it directly and emit stanzas,
instead of going through the overhead of passing them out to a
component and then being bombarded with the resulting stanzas. That
said, I don't know your use-case and perhaps you won't have as many
recipients as I'm fearing :)

Regards,
Matthew

[1]: http://tools.ietf.org/html/rfc6919

Reply via email to