%ents; ]>
Stanza Forwarding This document defines a protocol to forward a stanza from one entity to another. &LEGALNOTICE; 0297 Proposed 2012-12-14 Standards Track Standards XMPP Core forwarding &mwild; &ksmith; &stpeter; 0.5 2013-06-05 mw

Incorporated Last Call feedback, including; clarify that client handling of non-message stanzas, add a disco feature, remove references to deferred XEPs, tighten up the schema to allow only stanzas to be forwarded.

0.4 2012-07-05 mw

Added recommendation that forwarded messages as part of another specification should be nested under an element of that protocol's namespace.

Adapted text to indicate that stanzas other than messages may be forwarded. Updated title to reflect this.

0.3 2011-07-11 ks

Made security considerations more explicit.

0.2 2011-07-06 psa

Corrected XML namespace to reflect official publication.

0.1 2011-04-11 psa

Initial published version.

0.0.1 2011-03-22 mw/ks

First draft.

There are many situations is which an entity needs to forward a previously sent stanza to another entity, such as forwarding an interesting message to a friend, or a server forwarding stored messages from an archive. Here we specify a simple encapsulation method for such forwards. This format can be used in other specifications requiring the forwarding of stanzas, or used in isolation for a user to forward a message to another user (rather like email forwards).

Several properties are desirable when forwarding stanzas:

Let us suppose that a Romeo receives a message from Juliet:

Yet I should kill thee with much cherishing. ]]>

To forward this to Mercutio, Romeo would send a new message with a <forwarded/> payload of namespace 'urn:xmpp:forward:0'.

A most courteous exposition! Yet I should kill thee with much cherishing. ]]>
  1. Forwarded stanzas SHOULD include all relevant child elements of the original stanza by default. However, an implementation MAY omit elements it deems irrelevant and safe to discard. An example would be omitting &xep0085; elements from <message> stanzas which typically do not make sense outside the context of a conversation session. However it should be noted that removing such elements can invalidate any digital signature on a stanza. If preserving a signature is important in the context this extension is used then child elements SHOULD NOT be removed.

  2. The forwarding entity SHOULD add a <delay/> child to the <forwarded/> element to indicate to the recipient the date/time that the forwarding entity received the original stanza. The format of this element is described in &xep0203;.

  3. The namespace of the forwarded stanza MUST be preserved (this is typically 'jabber:client'). If no 'xmlns' is set for the stanza then as per XML namespacing rules it would inherit the 'urn:xmpp:forward:0' namespace, which is wrong.

  4. When this extension is employed simply for a user to forward a given message to a contact, the outer <message/> SHOULD contain a body (even if empty) and a receiving client should pay particular attention to ensure it renders both the sender's text and the forwarded message unambiguously.

  5. When a forwarded stanza forms part of an encapsulating protocol, the <forwarded/> element SHOULD be a child of a tag of that protocol, and SHOULD NOT be included as a direct child of the transmitted stanza.

Clients that implement this specification to display simple forwarded messages (i.e. those not part of another extension) SHOULD indicate their support via the 'urn:xmpp:forward:0' feature.

]]> ... ... ]]>

Senders SHOULD NOT forward messages using this protocol to recipients that have not indicated support for it. However they may still format the forward as plain text inside the <body> of a standard message stanza for compatibility with clients lacking support. Such a plain text version SHOULD NOT be included in a stanza using this extension (e.g. as a 'fallback'), as receiving entities are expected to display the <body> of a message as well as any forwarded stanza therein.

Forwarding stanzas can reveal information about the original sender, including possible presence leaks as well as the stanza payloads themselves. Any extensions using this format must therefore consider the implications of this.

Forwarding can either be used as-is, or in the context of another specification, with different security considerations as described below.

Receipt of a forwarded stanza from a third-party does not guarantee that the original stanza was actually received, or that the content has not been modified, by the forwarder. Integrity of the original stanza can only be determined through cryptographic signatures for example, which are beyond the scope of this specification.

Considering the above an end-user client should take special care in its rendering of forwarded stanzas, such as forwarded messages, to ensure that the user cannot mistake it for a message received directly from the original sender.

An entity SHOULD NOT trust that forwards are genuine when receiving them unprovoked (i.e. outside the scope of another specification).

Forwarded stanzas MUST NOT be processed as if they were non-forwarded stanzas. Furthermore a client SHOULD ignore non-<message> stanzas that are not embedded within another extension.

While security considerations are ultimately dependent upon the specifications using the format defined herein, forwarding introduces scope for stanza forgery such that authors of derivative specifications will need to address security considerations themselves. These need to cover which entities a client should accept forwards from, and which entities those are permitted to forward stanzas for. For example, a specification may choose to only trust forwards if they are received from the user's client, another client on the bare JID, or the user's server.

]]>

Thanks to Matt Miller, Florian Zeitz, Jefry Lagrange, Kim Alvefur and Kurt Zeilenga for their feedback.