1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00
xeps/inbox/nonza.xml
2015-06-03 08:55:38 -06:00

89 lines
7.6 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Nonzas (are not Stanzas)</title>
<abstract>This specification defines the term "Nonza", describing every top level stream element that is not a Stanza.</abstract>
<legal>
<copyright>This XMPP Extension Protocol is copyright (c) 1999 - 2014 by the XMPP Standards Foundation (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the &quot;Specification&quot;), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at &lt;<link url='http://xmpp.org/extensions/ipr-policy.shtml'>http://xmpp.org/extensions/ipr-policy.shtml</link>&gt; or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).</conformance>
</legal>
<number>xxxx</number>
<status>ProtoXEP</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
<author>
<firstname>Florian</firstname>
<surname>Schmaus</surname>
<email>flo@geekplace.eu</email>
<jid>flo@geekplace.eu</jid>
</author>
<revision>
<version>0.0.1</version>
<date>2015-06-01</date>
<initials>fs</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>The usage of non-Stanza top-level XMPP stream elements is steadily increasing in the last years. Starting with &xep0198;, one of the earliest XEPs which specified and used additional non-Stanza elements, the XMPP community sees an increasing usage of those elements in submitted specifications. Unlike Stanzas which are specified in &rfc6120; § 4.1 "Stream Fundamentals" and § 8. "XML Stanzas", there is no term and definition provided for them.</p>
<p>This leads to the unfortunate situation where some submitted XEPs erroneous refer to non-Stanza top level stream elements as 'Stanzas'. Thus causing confusion, and opening the door to possible interoperability breakage and security vulnerabilities.</p>
<p>This XEP tries to fix this by providing a term, a definition and declaring some rules for those XMPP stream elements.</p>
</section1>
<section1 topic='Nonza Definition' anchor='nonza'>
<p><strong>Nonza:</strong> A Nonza is every XML element found at the XMPP stream's top level which is not a Stanza. The top level of an XMPP stream is the child XML level beneath the last &lt;stream&gt; opening tag as defined in RFC 6120 § 4.2. "Opening a Stream", i.e. at depth=1 of the stream.</p>
<p><strong>Informal definition:</strong> A XMPP stream element is a Nonza, if its element name is not 'message', 'iq' or 'presence'.</p>
<p>The term 'Nonza' originates from the beginning and ending letters of its definition and thus makes it easy to recall that definition: <strong>No</strong>t a Sta<strong>nza</strong>.</p>
</section1>
<section1 topic='Nonza Examples' anchor='nonza-examples'>
<section2 topic='Nonzas used before resource binding' anchor='nonza-examples-before-binding'>
<example caption='The Stream Compression (XEP-0138) &lt;compress/&gt; Nonza'><![CDATA[
<compress xmlns='http://jabber.org/protocol/compress'>
<method>zlib</method>
</compress>]]></example>
</section2>
<section2 topic='Nonzas used after resource binding' anchor='nonza-examples-after-binding'>
<example caption='The Stream Management (XEP-0198) &lt;enable/&gt; Nonza'><![CDATA[
<enable xmlns='urn:xmpp:sm:3'/>]]></example>
<example caption='The Client State Indication (XEP-0352) &lt;active/&gt; Nonza'><![CDATA[
<active xmlns='urn:xmpp:csi:0'/>]]></example>
</section2>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<p>Nonzas are commonly used when it is not necessary to route the exchanged information behind the endpoints of an XMPP stream. For example, one use case is to control the XMPP stream like it is done in <cite>XEP-0198: Stream Management</cite>.</p>
<p>Nonzas sent before resource binding, as defined in RFC 6120 § 7., usually follow a request-response pattern. But after the client successfully bound a resource, they are used in a more "asynchronous" fashion, where a 'request' Nonza does not, or at least not immediately, trigger a 'result' Nonza sent back.</p>
</section1>
<section1 topic='Business Rules' anchor='rules'>
<p>
<ol>
<li>Nonzas MUST NOT be routed, i.e. they are only exchanged between the two endpoints of an XMPP stream.</li>
<li>Nonzas SHOULD NOT have a &apos;from&apos; or &apos;to&apos; attribute.</li>
</ol>
Note that an exception from 2. are the the widely used &lt;db/&gt; Nonzas defined in &xep0220;.
</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>As noted, Nonzas MUST NOT get routed, because this could introduce the ability for third parties to spoof them.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>This document requires no interaction with &REGISTRAR;.</p>
</section1>
</xep>