<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc compact="yes"?>
<?rfc strict="yes"?>
<?rfc symrefs="yes"?>
<rfc ipr="trust200902" docName="draft-cridland-xmpp-session-00" category='std'>
<front>
<title abbrev="XMPP Session">Here Lies Extensible Messaging and Presence Protocol (XMPP) Session Establishment</title>
<author initials="D.A." surname="Cridland" fullname="Dave Cridland">
<organization>Surevine Limited</organization>
<address>
        <postal>
		<street>PO Box 1136</street>
                <city>Guildford</city>
                <region>Surrey</region>
		<code>GU1 9ND</code>
                <country>UK</country>
        </postal>
        <email>dave.cridland@surevine.com</email>
</address>
</author>
<date month="June" year="2014"/>
<area>Applications</area>
<abstract><t>
The Extensible Messaging and Presence Protocol (XMPP) historically had a Session
Establishment request defined in RFC 3921 which clients were required to perform at the beginning of a session. RFC 6121 dropped this entirely. This specification reinstates it as an optional no-op to aid backwards compability, matching commonly deployed workarounds.
</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>Within this specification, we refer to "Old" clients and servers meaning those conforming to the <xref target="RFC3921"/> particularly with respect to its Section 3 (Session Establishment). We refer to "New" clients and servers meaning those conforming to the newer definition of Session Establishment within this document.</t>
<t>While <xref target='RFC6121'/> removed Session Establishment entirely from XMPP, there exist deployed clients which expect the feature to be advertised, and will refuse to proceed if it is not. Similarly, where the feature is advertised, clients were advised to use it, as deployed Old servers may require it.</t>
<t>This has led to a situation where although deprecated by RFC 6121, the status quo is unchanged.</t>
<t>A number of servers advertise it with a discussed (but not standardized) &lt;optional/&gt; subelement to the feature, which clients can use as a hint that they may elide Session Establishment without penalty.</t>
<t>This document formalizes this and acts as the tombstone for Session Establishment, deprecating it in a manner where one can see where it used to be.</t>
</section>
<section title='The Session Establishment Tombstone'>
<t>This specification formalizes the &lt;optional/&gt; marker and explicitly defines the Session Establishment request itself as a no-op.</t>
<section title='Feature Advertisement'>
<t>Session Establishment SHALL be advertised within the Stream Features element as an element of local name "session", qualified by the "urn:ietf:params:xml:ns:xmpp-session" XML namespace. This element MUST contain a child element within the same namespace with local name "optional"i, known as the "&lt;optional/&gt; marker. Clients SHALL ignore such advertisements.</t>
<t>If a client sees an advertisement which does not contain the &lt;optional/&gt; marker, however, this indicates an Old server, and it MUST perform Session Establishment as detailed in the next section.</t>
<t>Also, note that Old Clients will also perform the protocol despite the existence of the &lt;optional/&gt; marker.</t>
</section>
<section title="Session Establishment Request">
<t>A Old client connecting to a New server, or a New client against a Old server, issues a Session Establishment request. This consists of an IQ stanza od type "set" containing an empty &lt;session/&gt; child element qualified by the "urn:ietf:params:xml:ns:xmpp-session" namespace:</t>
<figure>
<preamble>Step 1: Client requests session with server:</preamble>
<artwork><![CDATA[
<iq to='example.com' type='set' id=sess_1'>
  <session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
]]>
</artwork>
</figure>
<t>A New server MUST treat this as a no-op; that is, it MUST NOT perform any special processing which has any effect on the session. The only behaviour allowed and required by this specification is the empty result:</t>
<figure>
<preamble>Step 2: Server informs client of success:</preamble>
<artwork><![CDATA[
<iq from='example.com' type='result' id='sess_1'/>
]]>
</artwork>
</figure>
<t>Note that this specification does not allow any error to be generated at this point in response to a syntactically valid request.</t>
</section>
</section>
<section title="Security Considerations">
<t>This document defines, in effect, a no-op, and therefore it is thought not to have any security impact.</t>
</section>
<section title="IANA Considerations">
   
   <t>This document supercedes the original definition of the XML namespace defined in RFC 3921, therefore the IANA is requested to update the registry as follows:</t>

<section title='XML Namespace Name for Session Data'>
<t>A URN sub-namespace for session-related data in the Extensible Messaging and Presence Protocol (XMPP) is defined as follows. (This namespace name aheres to the format defined in The IETF XML Registry <xref target='RFC3688'/>.)</t>
<figure>
<artwork><![CDATA[
URI: urn:ietf:params:xml:ns:xmpp-session
Specification: This document
Description: Here lies the XML namespace name for session-related data
   in the Extensible Messaging and Presence Protocol (XMPP), as defined
   in "this document".
Registrant Contact: IETF, XMPP Working Group, <xmpp@ietf.org>]]>
</artwork>
</figure>
</section>
  
</section>
<section title="Acknowledgements">
<t>The examples and some of the text were lifted from RFC 3921 by Peter Saint-Andre. The optional marker was proposed some time ago and was implemented by Curtis King and Waqas Hussein amongst others.</t>
</section>

</middle>
<back>
<references title='Normative References'>
<?rfc include="reference.RFC.6121"?>
</references>
<references title="Informative References">
<?rfc include="reference.RFC.3921"?>
<?rfc include="reference.RFC.3688"?>
</references>
</back>
</rfc>
