1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-12 02:42:16 -05:00
xeps/xep-0249.xml

240 lines
11 KiB
XML
Raw Permalink Normal View History

<?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>Direct MUC Invitations</title>
<abstract>This specification defines a method for inviting a contact to a multi-user chat room directly, instead of sending the invitation through the chat room.</abstract>
&LEGALNOTICE;
<number>0249</number>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0045</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>x-conference</shortname>
<schemaloc>
<url>http://xmpp.org/schemas/x-conference.xsd</url>
</schemaloc>
&stpeter;
2011-08-16 17:15:34 -04:00
<revision>
2011-09-22 18:09:33 -04:00
<version>1.2</version>
<date>2011-09-22</date>
2011-08-16 17:15:34 -04:00
<initials>psa</initials>
<remark><p>Added continue and thread attributes for feature parity with mediated invitations when converting a one-to-one chat to a groupchat.</p></remark>
</revision>
<revision>
<version>1.1</version>
<date>2009-12-07</date>
<initials>psa</initials>
<remark><p>Added password attribute for feature parity with mediated invitations.</p></remark>
</revision>
<revision>
<version>1.0</version>
<date>2009-06-25</date>
<initials>psa</initials>
<remark><p>Per a vote of the XMPP Council, advanced specification from Experimental to Draft.</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2009-06-22</date>
<initials>psa</initials>
<remark><p>Defined several possible security attacks along with solutions.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2009-03-30</date>
<initials>psa</initials>
<remark><p>Added optional reason attribute for feature parity with XEP-0045.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2008-09-03</date>
<initials>psa</initials>
<remark><p>Initial published version.</p></remark>
</revision>
<revision>
<version>0.0.5</version>
<date>2008-09-02</date>
<initials>psa</initials>
<remark><p>Modified to use old jabber:x:conference namespace.</p></remark>
</revision>
<revision>
<version>0.0.4</version>
<date>2008-08-18</date>
<initials>psa</initials>
<remark><p>Added note about handling multiple invitations.</p></remark>
</revision>
<revision>
<version>0.0.3</version>
<date>2008-08-16</date>
<initials>psa</initials>
<remark><p>Added implementation note about members-only rooms.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2008-08-14</date>
<initials>psa</initials>
<remark><p>Changed venue element to conference element.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2008-08-12</date>
<initials>psa</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>&xep0045; defines a protocol for groupchat over XMPP. That specification includes a method for inviting a contact to a room, where the invitation is mediated by the room itself: the user sends the invitation to the room, which in turn sends it to the contact. Unfortunately, a mediated invitation might not be delivered to the contact, for example if the contact blocks communication with entities not in its roster as specified in &xep0016;. As privacy lists have become more common, MUC invitations have been increasingly blocked at the server side, resulting in an undesirable user experience. Therefore, this specification defines a method for sending an invitation directly from the user to the contact, which re-uses the original 'jabber:x:conference' namespace in use before <cite>XEP-0045</cite> was written (with the addition of 'reason', 'continue', and 'thread' attributes for feature parity with mediated invitations).</p>
</section1>
<section1 topic='How It Works' anchor='howitworks'>
<p>A user invites a contact to a room by sending a &MESSAGE; stanza containing only an &lt;x/&gt; element qualified by the 'jabber:x:conference' namespace.</p>
<example caption="A direct invitation"><![CDATA[
<message
from='crone1@shakespeare.lit/desktop'
to='hecate@shakespeare.lit'>
<x xmlns='jabber:x:conference'
jid='darkcave@macbeth.shakespeare.lit'
password='cauldronburn'
reason='Hey Hecate, this is the place for all good witches!'/>
</message>
]]></example>
<p>The 'jid' attribute, which is REQUIRED, specifies the address of the groupchat room to be joined.</p>
<p>The 'password' attribute, which is OPTIONAL, specifies a password needed for entry into a password-protected room and maps to the &lt;password/&gt; element in a mediated invitation.</p>
<p>The 'reason' attribute, which is OPTIONAL, specifies a human-readable purpose for the invitation and maps to the &lt;reason/&gt; element in a mediated invitation.</p>
2011-08-16 17:15:34 -04:00
<p>The 'continue' and 'thread' attributes, which are OPTIONAL, specify that the groupchat room continues a one-to-one chat having the designated thread; these map to the &lt;continue/&gt; element (with 'thread' attribute) in a mediated invitation. Note that the 'continue' attribute has a datatype of boolean. &BOOLEANNOTE;</p>
<example caption="A direct invitation that continues a one-to-one chat"><![CDATA[
<message
from='crone1@shakespeare.lit/desktop'
to='hecate@shakespeare.lit'>
<x xmlns='jabber:x:conference'
continue='true'
jid='darkcave@macbeth.shakespeare.lit'
password='cauldronburn'
reason='Hey Hecate, this is the place for all good witches!'
thread='e0ffe42b28561960c6b12b944a092794b9683a38'/>
</message>
]]></example>
<p>Upon receiving a direct invitation, the contact's client SHOULD present the invitation to the contact so that the contact can accept it or decline it. If the contact accepts the invitation, the contact's client shall join the room as described in <cite>XEP-0045</cite>. If the contact declines the invitation, it shall silently discard the invitation.</p>
</section1>
<section1 topic='Determining Support' anchor='support'>
<p>If an entity supports the protocol specified herein, it MUST advertise that fact by returning a feature of "jabber:x:conference" in response to &xep0030; information requests &NSNOTE;.</p>
<example caption="Service discovery information request"><![CDATA[
<iq from='crone1@shakespeare.lit/desktop'
id='disco1'
to='hecate@shakespeare.lit/broom'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption="Service discovery information response"><![CDATA[
<iq from='hecate@shakespeare.lit/broom'
id='disco1'
to='crone1@shakespeare.lit/desktop'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='jabber:x:conference'/>
</query>
</iq>
]]></example>
<p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<p>Before inviting a contact to a members-only room, a user SHOULD check to see if the contact is already a member and, if not, add the contact to the member list (or ask a room administrator to do so).</p>
<p>If a client receives multiple invitations to the same room (e.g., a mediated invitation as defined in <cite>XEP-0045</cite> and a direct invitation as defined here), the client SHOULD present only one of the invitations to a human user. If a client receives an invitation to a room in which the user is already an occupant, the client SHOULD silently discard the invitation.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>The following attacks are possible, in roughly the order of probability. See also &xep0205; and &rfc3552;.</p>
<ol>
<li><p>The sender of an invitation could overload the 'reason' attribute with malicious or offensive text. The recipient can mitigate this attack by blocking the sender using technologies such as &xep0016; and &xep0191;.</p></li>
<li><p>A passive attacker could flood the recipient with a large number of chatroom invitations. This attack, too, can be mitigated with <cite>Privacy Lists</cite> or <cite>Simple Communications Blocking</cite>.</p></li>
<li><p>A passive attacker could use a mimicked JID to fool the recipient into thinking that the sender is a known or trusted contact. This attack requires knowledge of the recipient's known or trusted contacts, and can be mitigated by following the recommendations in &xep0165;.</p></li>
<li><p>In the absence of end-to-end encryption, a passive attacker could eavesdrop on the chatroom invitations that a user sends or receives. This is especially threatening if the invitation includes a 'password' attribute for a password-protected room.</p></li>
<li><p>In the absence of end-to-end encryption or signing, an active attacker could modify the invitation in transit so that the recipient is directed to a different room than intended by the sender.</p></li>
</ol>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>The &REGISTRAR; includes 'jabber:x:conference' in its registry of protocol namespaces at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='jabber:x:conference'
xmlns='jabber:x:conference'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0249: http://www.xmpp.org/extensions/xep-0249.html
</xs:documentation>
</xs:annotation>
<xs:element name='x'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='empty'>
2011-08-16 17:15:34 -04:00
<xs:attribute
name='continue'
type='xs:boolean'
use='optional'/>
<xs:attribute
name='jid'
type='xs:string'
use='required'/>
<xs:attribute
name='password'
type='xs:string'
use='optional'/>
<xs:attribute
name='reason'
type='xs:string'
use='optional'/>
2011-08-16 17:15:34 -04:00
<xs:attribute
name='thread'
type='xs:string'
use='optional'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Joe Hildebrand for his feedback.</p>
</section1>
</xep>