| Abstract: | This specification defines an XMPP protocol extension for communicating the fact that an XML stanza has been delivered with a delay, for example because a message has been stored on a server while the intended recipient was offline or because a message is contained in the history of a multi-user chat room. |
| Author: | Peter Saint-Andre |
| Copyright: | © 1999 - 2010 XMPP Standards Foundation. SEE LEGAL NOTICES. |
| Status: | Final |
| Type: | Standards Track |
| Version: | 2.0 |
| Last Updated: | 2009-09-15 |
NOTICE: The protocol defined herein is a Final Standard of the XMPP Standards Foundation and can be considered a stable technology for implementation and deployment.
1. Introduction
2. Protocol Definition
3. Examples
4. Implementation Notes
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
7.1. Protocol Namespace
8. XML Schema
9. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Although the XMPP protocol extension defined in Legacy Delayed Delivery [1] provides a way to communicate that an XML stanza (typically a <message/> or <presence/> stanza) has been delivered with a delay, the timestamp format defined in that document does not adhere to the recommended date and time profiles for XMPP protocols defined in XMPP Date and Time Profiles [2]. Therefore, this document defines a replacement for XEP-0091 which enables communication of delayed delivery information while adhering to XEP-0082.
The XML namespace defined herein is used to provide timestamp information about data stored for later delivery. The most common uses of this namespace are to stamp:
Information about the delivery delay is communicated by adding to the <message/> or <presence/> stanza one and only one <delay/> child qualified by a namespace to be issued when this specification advances to a status of Draft. This information is added by the server or component that delivers the stanza. The following attributes are defined for the <delay/> element:
| Attribute | Definition | Inclusion |
|---|---|---|
| from | The Jabber ID of the entity that originally sent the XML stanza or that delayed the delivery of the stanza (e.g., the address of a multi-user chat room). | RECOMMENDED |
| stamp | The time when the XML stanza was originally sent. The format MUST adhere to the dateTime format specified in XEP-0082 and MUST be expressed in UTC. | REQUIRED |
In addition, the <delay/> element MAY contain XML character data that provides a natural-language description of the reason for the delay.
Example 1. Receiving a Message Sent While Offline
<message
from='romeo@montague.net/orchard'
to='juliet@capulet.com'
type='chat'>
<body>
O blessed, blessed night! I am afeard.
Being in night, all this is but a dream,
Too flattering-sweet to be substantial.
</body>
<delay xmlns='urn:xmpp:delay'
from='capulet.com'
stamp='2002-09-10T23:08:25Z'>
Offline Storage
</delay>
</message>
Example 2. Receiving the Last Presence Update of Another Entity
<presence from='juliet@capulet.com/balcony' to='romeo@montague.net'>
<status>anon!</status>
<show>xa</show>
<priority>1</priority>
<delay xmlns='urn:xmpp:delay'
from='juliet@capulet.com/balcony'
stamp='2002-09-10T23:41:07Z'/>
</presence>
Example 3. Receiving Cached Messages from a Conference Room
<message
from='coven@macbeth.shakespeare.lit/secondwitch'
to='macbeth@shakespeare.lit/laptop'
type='groupchat'>
<body>
By the pricking of my thumbs,
Something wicked this way comes.
Open, locks,
Whoever knocks!
</body>
<delay xmlns='urn:xmpp:delay'
from='coven@macbeth.shakespeare.lit'
stamp='2002-09-10T23:05:37Z'/>
</message>
This protocol was designed in a way that makes migration from XEP-0091 straightforward. All attributes present in the 'jabber:x:delay' namespace are present in the namespace defined herein. However, this document specifies a different format for the value of the <stamp> attribute (compliant with XEP-0082).
Implementations that support XEP-0091 should support the protocol defined herein as soon as possible, but should continue to support the protocol defined in XEP-0091 for backwards compatibility until the status of that specification is changed to Obsolete.
Delayed delivery data can expose information about the sender's presence on the network at some time in the past. However, this introduces no new vulnerabilities, since the same information would have been available in real time.
Absent cryptographic signing of stanzas and parts of stanzas, it is possible for delayed delivery notations to be forged. For example, the originator of a message (or the originator's server) could include a notation that makes it appear as if delivery of the message was delayed by the recipient's server. The same is true of delayed delivery notations putatively added by a Multi-User Chat room, which could be forged by the message originator, the originator's server, the recipient's server, or the server that hosts the chatroom service. Although the recipient's server SHOULD discard a delayed delivery notation whose 'from' attribute matches the server's JabberID (or return a <not-acceptable/> error to the originator), this policy does not guard against forging of notations putatively from other entities (such as a chatroom hosted at a different trust domain). Therefore, a recipient SHOULD NOT rely on delayed delivery notations to provide a completely accurate representation of the delivery path or timing of a stanza it has received.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].
The XMPP Registrar [6] includes 'urn:xmpp:delay' in its registry of protocol namespaces (see <http://xmpp.org/registrar/namespaces.html>).
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:delay'
xmlns='urn:xmpp:delay'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0203: http://www.xmpp.org/extensions/xep-0203.html
</xs:documentation>
</xs:annotation>
<xs:element name='delay'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute name='from' type='xs:string' use='optional'/>
<xs:attribute name='stamp' type='xs:dateTime' use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
Thanks to Sergei Golovan for his feedback regarding forged timestamps.
Series: XEP
Number: 0203
Publisher: XMPP Standards Foundation
Status:
Final
Type:
Standards Track
Version: 2.0
Last Updated: 2009-09-15
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0082
Supersedes: XEP-0091
Superseded By: None
Short Name: delay
Schema: <http://www.xmpp.org/schemas/delay.xsd>
Source Control:
HTML
RSS
This document in other formats:
XML
PDF
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0091: Legacy Delayed Delivery <http://xmpp.org/extensions/xep-0091.html>.
2. XEP-0082: XMPP Date and Time Profiles <http://xmpp.org/extensions/xep-0082.html>.
3. XEP-0160: Best Practices for Handling Offline Messages <http://xmpp.org/extensions/xep-0160.html>.
4. XEP-0045: Multi-User Chat <http://xmpp.org/extensions/xep-0045.html>.
5. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
6. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Per a vote of the XMPP Council, advanced specification from Draft to Final; also addressed a security concern about forged timestamps that was provided during the Call for Experience.
(psa)Per a vote of the XMPP Council, advanced from Experimental to Draft.
(psa)Per a vote of the XMPP Council, advanced to Draft; also removed service discovery per Council discussion.
(psa)Added service discovery section.
(psa)Initial version.
(psa)END