This specification defines methods for communicating via end-to-end XML streams over a logical or physical connection that provides a reliable transport between two endpoints.
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Series: XEP
Number: 0246
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.1
Last Updated: 2008-06-18
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED
Registry:
<http://www.xmpp.org/registrar/NOT_YET_ASSIGNED.html>
Wiki Page: <http://wiki.jabber.org/index.php/End-to-End XML Streams (XEP-0246)>
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.
Errata may be sent to <editor@xmpp.org>.
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 following 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. Introduction
2. Initiating an e2e Stream
3. Stream Encryption
4. Exchanging Stanzas
5. Ending an e2e Stream
6. Security Considerations
7. IANA Considerations
8. XMPP Registrar Considerations
Notes
Revision History
XMPP as defined in RFC 3920 [1] does not support direct interaction between endpoints, since it requires a client to authenticate an XML stream with a "home" server and send of all of its outbound XML stanzas through that server (which potentially can route those stanzas through a peer server for delivery to the intended recipient). However, in some scenarios it is desirable to establish end-to-end XML streams between two endpoints instead of relying on the standard client-server architecture. These scenarios include:
The first scenario is addressed by Link-Local Messaging [2]. The second and third scenarios are addressed by Jingle XML Streams [3]. Both of those technologies result in the establishment of a direct or mediated connection between two endpoints, such as a direct TCP connection, a bytestream through SOCKS5 (SOCKS5 Bytestreams [4]) or XMPP itself (In-Band Bytestreams [5]), or other future transport methods such as TCP Candidates with Interactive Connectivity Establishment (ICE) [6].
Once two endpoints have opened a direct or mediated connection, they can establish an XML stream over that connection for end-to-end "("e2e") communication. We call this an "e2e stream".
The initiator and recipient essentially follow the process defined in RFC 3920 to establish XML streams between themselves.
First, the initiator opens an XML stream to the recipient over the negotiated transport.
<stream:stream
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
from='romeo@forza'
to='juliet@pronto'
version='1.0'>
In accordance with rfc3921bis [7], the initial stream header SHOULD include the 'to' and 'from' attributes. In the case of XEP-0174, these SHOULD be the username@machine-name advertised in the PTR record. In the case of Jingle XML Streams, these SHOULD be the bare JIDs (<localpart@domain.tld> or <domain.tld>) of the entities as communicated via XMPP.
If the initiator supports stream features and the other stream-related aspects of XMPP 1.0 as specified in RFC 3920, then it SHOULD include the version='1.0' flag as shown in the previous example.
The recipient then responds with a stream header as well:
Example 2. Stream Header Response
<stream:stream
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
from='juliet@pronto'
to='romeo@forza'
version='1.0'>
If both the initiator and recipient included the version='1.0' flag, the recipient SHOULD also send stream features as specified in RFC 3920:
Example 3. Recipient Sends Stream Features
<stream:features> <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/> </stream:features>
The mere exchange of stream headers results in an unencrypted and unauthenticated channel between the two entities. The entities SHOULD upgrade the channel to an encrypted stream using the XMPP STARTTLS command defined in XMPP Core [8] using RFC 4346 [9], optionally followed by SASL negotiation for mutual authentication (see RFC 4422 [10]).
End-to-end XML streams can be negotiated between two XMPP clients, between an XMPP client and a remote XMPP service (i.e., a service with which a client does not have a direct XML stream, such as a remote Multi-User Chat [11] room), or between two remote XMPP services. Therefore, if standard X.509 certificates are used then a party to an e2e XML stream will present either a client certificate or a server certificate as appropriate. If X.509 certificates are used, they MUST at a minimum be generated and validated in accordance with the certificate guidelines guidelines provided in rfc3920bis [12]; however, applications of end-to-end XML streams MAY define supplemental guidelines for certificate validation in the context of particular architectures, such as XEP-0174 for link-local streams and XEP-0247 for direct or mediated streams negotiated through XMPP servers.
To ease the transition from the PGP-based object encryption method specified in Current Jabber OpenPGP Usage [13], clients using TLS for e2e streams MAY use the OpenPGP TLS extension defined in RFC 5081 [14] (if available).
Use of other TLS extensions MAY be appropriate as well, including those defined in RFC 4346 [15] and RFC 5054 [16].
Once the streams are established, either entity then can send XMPP message, presence, and IQ stanzas, with or without 'to' and 'from' addresses.
<message from='romeo@forza' to='juliet@pronto'> <body>M'lady, I would be pleased to make your acquaintance.</body> </message>
<message from='juliet@pronto' to='romeo@forza'> <body>Art thou not Romeo, and a Montague?</body> </message>
To end the stream, either party closes the XML stream:
</stream:stream>
The other party then closes the stream in the other direction as well:
</stream:stream>
Both parties then SHOULD close the logical or physical connection between them.
End-to-end streams SHOULD be encrypted; see the Stream Encryption section of this document.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [17].
This document requires no interaction with the XMPP Registrar [18].
1. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc3920>.
2. XEP-0174: Link-Local Messaging <http://www.xmpp.org/extensions/xep-0174.html>.
3. XEP-0247: Jingle XML Streams <http://www.xmpp.org/extensions/xep-0247.html>.
4. XEP-0065: SOCKS5 Bytestreams <http://www.xmpp.org/extensions/xep-0065.html>.
5. XEP-0047: In-Band Bytestreams <http://www.xmpp.org/extensions/xep-0047.html>.
6. TCP Candidates with Interactive Connectivity Establishment (ICE) <http://tools.ietf.org/html/draft-ietf-mmusic-ice-tcp>. Work in progress.
7. rfc3921bis: proposed revisions to Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/draft-saintandre-rfc3921bis>. (work in progress)
8. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc3920>.
9. RFC 4346: The Transport Layer Security (TLS) Protocol Version 1.1 <http://tools.ietf.org/html/rfc4346>.
10. RFC 4422: Simple Authentication and Security Layer (SASL) <http://tools.ietf.org/html/rfc4422>.
11. XEP-0045: Multi-User Chat <http://www.xmpp.org/extensions/xep-0045.html>.
12. rfc3920bis: proposed revisions to Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/draft-saintandre-rfc3920bis>. (work in progress)
13. XEP-0027: Current Jabber OpenPGP Usage <http://www.xmpp.org/extensions/xep-0027.html>.
14. RFC 5081: Using OpenPGP Keys for Transport Layer Security (TLS) Authentication <http://tools.ietf.org/html/rfc5081>.
15. RFC 4346: The Transport Layer Security (TLS) Protocol Version 1.1 <http://tools.ietf.org/html/rfc4346>.
16. RFC 5054: Using the Secure Remote Password (SRP) Protocol for TLS Authentication <http://tools.ietf.org/html/rfc5054>.
17. 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/>.
18. 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://www.xmpp.org/registrar/>.
Initial published version.
(psa)First draft, split off from XEP-0174.
(psa)END