Extensible Messaging and Presence Protocol

From Wikipedia, the free encyclopedia

Extensible Messaging and Presence Protocol, or XMPP, is an open, XML-based protocol for near-real-time, extensible instant messaging and presence information. It is the core protocol of the Jabber Instant Messaging and Presence technology which is currently deployed on thousands of Jabber servers across the Internet and is used by millions of people worldwide.

The Internet Engineering Task Force (IETF) formed an XMPP Working Group in 2002 to formalize the core Jabber protocols as an IETF Instant Messaging and presence technology. The four specifications produced by the XMPP WG were approved by the IESG as Proposed Standards in 2004. RFC 3920 and RFC 3921 are currently undergoing revisions in preparation for advancing them to Draft Standard within the Internet Standards Process. The Jabber Software Foundation is active in proposing and publishing standard XMPP extensions.

Contents

[edit] Specifications

The IETF XMPP working group has produced a number of RFC protocol documents:

  • RFC 3920, Extensible Messaging and Presence Protocol (XMPP): Core which describes client-server messaging using two open ended XML streams. XML streams consist of <presence/>, <message/> and <iq/> (info/query) as illustrated in the example client-server conversation. A connection is authenticated with Simple Authentication and Security Layer (SASL) and encrypted with Transport Layer Security (TLS).
  • RFC 3921, Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence describes instant messaging (IM), the most common application of XMPP.
  • RFC 3922, Mapping the Extensible Messaging and Presence Protocol (XMPP) to Common Presence and Instant Messaging (CPIM) relates XMPP and the Common Presence and Instant Messaging (CPIM) specifications.
  • RFC 3923, End-to-End Signing and Object Encryption for the Extensible Messaging and Presence Protocol (XMPP) describes end to end encryption of XMPP messages using S/MIME. Conflicting this proposal, many clients currently use GPG for encrypting messages (see XEP-0027.

The Jabber Software Foundation (JSF) develops and publishes extensions to XMPP through a standards process centered around XMPP Extension Protocols[1] (XEPs, previously known as Jabber Enhancement Proposals - JEPs). The following extensions are in especially wide use:

XMPP is also currently being extended to handle signalling / negotiation for Voice over internet protocol (VoIP) and other media sessions. This signalling protocol is called Jingle. Jingle is designed to be consistent with the Google Talk service and interoperable with the Session Initiation Protocol.

[edit] Implementations

[edit] Example client-server conversation using the XMPP protocol

A client (Alice) connects to Jabber server (example.org on TCP port 5222), sends a message (Subject: "Hello!" and Body: "Can't wait to see you tomorrow.") to another client (Bob) and logs out.

Alice (client):

<?xml version="1.0"?>
<stream:stream xmlns:stream="http://etherx.jabber.org/streams"
xmlns="jabber:client" to="example.org">

example.org (server):

<stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' from='example.org'
id='1461777714'>

Alice:

<iq type="set" id="auth_2" to="example.org" >
  <query xmlns="jabber:iq:auth">
    <username>alice</username>
    <password>password</password>
    <resource>Work</resource>
  </query>
</iq>

example.org:

<iq from="example.org" id='auth_2' type='result'/>

NOTE: The foregoing authentication example shows the old Non-SASL Authentication process originally defined in the Jabber open-source project and currently documented in XEP-0078. XMPP as formalized within the IETF uses Simple Authentication and Security Layer instead.

Alice:

<message to="bob@example.com" >
  <subject>Hello!</subject>
  <body>Can't wait to see you tomorrow.</body>
</message>
<presence type="unavailable" >
  <status>Logged out</status>
</presence>
</stream:stream>

example.org:

<stream:stream/>

[edit] See also

[edit] External links