1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-30 13:12:15 -05:00
xeps/xep-0407.xml

392 lines
21 KiB
XML
Raw Normal View History

2018-05-21 05:53:33 -04:00
<?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'?>
<?xml-stylesheet type="text/css" href="xmpp.css"?>
<xep>
<header>
2018-05-21 06:47:54 -04:00
<title>Mediated Information eXchange (MIX): Miscellaneous Capabilities</title>
2018-05-21 05:53:33 -04:00
<abstract>This document defines an extension to Mediated Information eXchange (MIX) specified in XEP-0369. It specifies a number of independent optional capabilities that MAY be used with MIX.</abstract>
&LEGALNOTICE;
<number>0407</number>
<status>Deferred</status>
2018-05-21 05:53:33 -04:00
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
<spec>XEP-0004</spec>
<spec>XEP-0030</spec>
<spec>XEP-0054</spec>
<spec>XEP-0060</spec>
<spec>XEP-0084</spec>
<spec>XEP-0128</spec>
<spec>XEP-0198</spec>
<spec>XEP-0292</spec>
<spec>XEP-0297</spec>
<spec>XEP-0313</spec>
2018-05-21 06:47:54 -04:00
<spec>XEP-0369</spec>
2018-05-21 05:53:33 -04:00
<spec>XEP-0372</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>MIX-MISC</shortname>
&ksmithisode;
&skille;
<revision>
<version>0.1.1</version>
<date>2018-11-03</date>
<initials>pep</initials>
<remark>Fix a bunch of typos, batch-style.</remark>
</revision>
2018-05-21 05:53:33 -04:00
<revision>
<version>0.1.0</version>
<date>2018-05-14</date>
<initials>sek</initials>
<remark><p>
Split out from MIX 0.10.0;
</p></remark>
</revision>
2018-05-22 09:19:59 -04:00
2018-05-21 05:53:33 -04:00
</header>
<section1 topic='Introduction' anchor='intro'>
2018-05-21 06:47:54 -04:00
<p>The Mediated Information eXchange (MIX) protocol framework and core capabilities are specified in &xep0369; (MIX-CORE). This specification defines six extensions to this core:
2018-05-22 09:19:59 -04:00
2018-05-21 05:53:33 -04:00
</p>
2018-05-22 09:19:59 -04:00
2018-05-21 06:47:54 -04:00
<ol>
<li>Avatar Publishing.</li>
<li>Nick Registration.</li>
<li>Retracting a Message. </li>
<li>Telling another user about a channel.</li>
<li>Invitation by reference.</li>
<li>Converting 1:1 conversation to a channel.</li>
</ol>
2018-05-22 09:19:59 -04:00
2018-05-21 06:47:54 -04:00
<p>These extensions are independent. An implementation of this specification should identify clearly which extensions are implemented.</p>
2018-05-22 09:19:59 -04:00
2018-05-21 06:47:54 -04:00
</section1>
2018-05-21 05:53:33 -04:00
2018-05-21 06:47:54 -04:00
<section1 topic="Avatar Publishing" anchor="avatar">
<p>
2018-05-22 09:20:12 -04:00
&xep0369; defines a framework of nodes associated with each channel, where new nodes can be added to provide new services.
2018-05-21 06:47:54 -04:00
Two nodes defined in this specification MAY bey used to support Avatars. These nodes and their use is defined in &xep0084;. These nodes MAY be created as part of a MIX channel, where it is desired to publish an avatar associated with the channel.
</p>
<table caption="MIX Nodes for Avatar Support">
<tr><th>Name</th><th>Node</th><th>Description</th></tr>
<tr><td>Avatar Data</td><td>'urn:xmpp:avatar:data'</td><td>For publishing an Avatar</td></tr>
<tr><td>Avatar Metadata</td><td>'urn:xmpp:avatar:metadata'</td><td>For publishing Avatar metadata</td></tr>
</table>
2018-05-22 09:19:59 -04:00
2018-05-21 05:53:33 -04:00
</section1>
2018-05-22 09:19:59 -04:00
2018-05-21 06:47:54 -04:00
<section1 topic='Registering a Nick' anchor='usecase-user-register'>
<p>A nick MAY be associated with a user's bare JID. A user can register a nick with the MIX service. Nick registration can be used ensure that a user is able to use the same nick in all channels in the service and to prevent other users from using a registered nick. This can help achieve a consistent experience across a set of channels and prevent user confusion. Support for nick registration by a MIX service is OPTIONAL. Where nick registration is supported, nick registration MAY be OPTIONAL or MANDATORY.
2018-05-21 05:53:33 -04:00
Where a user has registered a Nick with the MIX service, it MAY be used by each channel according to policy for the channel. A channel MAY enforce use of a registered nick. A channel MUST NOT use a registered nick for any other participant.
</p>
<p>
In order to determine if a Nick is allowed to be registered, the user MAY use disco to determine capabilities of the MIX service.
</p>
<example caption="User Determines features of the MIX service"><![CDATA[
<iq type='get'
from='hag66@shakespeare.example/UUID-a1j/7533'
to='mix.shakespeare.example'
id='7nve413p'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
<iq type='result'
to='hag66@shakespeare.example/UUID-a1j/7533'
from='mix.shakespeare.example'
id='7nve413p'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
2018-05-21 06:47:54 -04:00
<feature var='urn:xmpp:mix:misc:0#nick-register'/>
2018-05-21 05:53:33 -04:00
</query>
</iq>
]]></example>
<p>
2018-05-21 06:47:54 -04:00
The response will be a list of features of the MIX channel. If Nick Registration is supported, then the result set will include &lt;feature var="urn:xmpp:mix:misc:0#nick-register"/&gt;.
2018-05-21 05:53:33 -04:00
</p>
<p>
To register a nick with the MIX service the user sends
2018-05-21 06:47:54 -04:00
a register command to the service. This is encoded as a &lt;register/&gt; child element of an &lt;iq/&gt; element. The &lt;register/&gt; element is qualified by the urn:xmpp:mix:misc:0' namespace. The nick is encoded in a &lt;nick/&gt; child element of the &lt;register/&gt; element. </p>
2018-05-21 05:53:33 -04:00
<example caption="User Registers with Service"><![CDATA[
<iq type='set'
from='hag66@shakespeare.example/UUID-a1j/7533'
to='mix.shakespeare.example'
id='7nve413p'>
2018-05-21 06:47:54 -04:00
<register xmlns='urn:xmpp:mix:misc:0'>
2018-05-21 05:53:33 -04:00
<nick>thirdwitch</nick>
</register>
</iq>
]]></example>
<p>On success, the service informs the user of its nick. MIX SHOULD apply the "nickname" profile of the PRECIS OpaqueString class, as defined in &rfc7700; to the requested nick. This means that nick that is issued might be different from the nick that was requested.</p>
<p>
When an Nick is assigned, the MIX server MUST update the Participants Node in the channel to reflect this change. Any users subscribed to this node will be notified of the change of Nick.
</p>
<p>The following example shows an example of reporting successful Nick assignment.</p>
<example caption="Service Returns User of Nick"><![CDATA[
<iq type='result'
to='mix.shakespeare.example'
from='hag66@shakespeare.example/UUID-a1j/7533'
id='7nve413p'>
2018-05-21 06:47:54 -04:00
<register xmlns='urn:xmpp:mix:misc:0'>
2018-05-21 05:53:33 -04:00
<nick>thirdwitch</nick>
</register>
</iq>
]]></example>
<p>If the requested nick is already taken and the MIX service does not assign an alternate nick, the MIX service MUST return a &lt;conflict/&gt; error:</p>
<example caption="Nick is Taken">
<![CDATA[<iq type='error'
to='mix.shakespeare.example'
from='hag66@shakespeare.example/UUID-a1j/7533'
id='7nve413p'>
<error type='cancel'>
<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
<p>If the register request does not contain a &lt;nick/&gt; element, then the MIX service MUST assign one. It is RECOMMENDED that the assigned nick is a UUID following &rfc4122;.
</p>
2018-05-21 06:47:54 -04:00
</section1>
2018-05-22 09:19:59 -04:00
2018-05-21 05:53:33 -04:00
2018-05-21 06:47:54 -04:00
<section1 topic="Retracting a Message" anchor="usecase-retract">
2018-05-21 05:53:33 -04:00
<p>
A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. A MIX channel MAY limit the time frame in which a message is allowed to be retracted, for example to prevent retraction of very old messages. When a messages is retracted the original message MAY be replaced by a tombstone. Message retraction is done by sending a special message that identifies the original message. This mechanism allows the retraction to be distributed on the same path as the original message so that all participating servers and clients MAY honour the retraction. The protocol to request retraction does this by adding to a message a &lt;retract&gt; element qualified by the 'urn:xmpp:mix:misc:0' namespace. A retract messages MUST NOT have a body. The &lt;retract&gt; element MUST include an 'id' attribute that holds the MAM-ID of the original message. The message sender will need to look up the MAM-ID. The MAM-ID is the convenient message identification for message recipients. A message and its retraction shown in the following example.
2018-05-21 05:53:33 -04:00
</p>
<example caption="User Retracts a Message"><![CDATA[
<message from='hag66@shakespeare.example/UUID-a1j/7533'
to='coven@mix.shakespeare.example'
id='abcde'>
<body> A Message I did not mean to send </body>
</message>
<message from='hag66@shakespeare.example/UUID-a1j/7533'
to='coven@mix.shakespeare.example'
id='92vax143g'>
2018-05-21 06:47:54 -04:00
<retract id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD' xmlns='urn:xmpp:mix:misc:0'/>
2018-05-21 05:53:33 -04:00
</message>
]]></example>
<p>
The MIX channel will allow a user to retract a message sent by the user if the 'Allow User Message Retraction' option is configured. The MIX channel will allow an administrative user to retract any message if the user is in the group specified by the 'Administrator Message Retraction Rights' option.
</p>
<p>
If the retraction message is accepted, it MUST be distributed to channel participants. This will allow retraction to happen in the MAM archive of each channel participant and to reflect the retraction in client GUI. A client receiving a retraction message SHOULD ensure that the retracted message is no longer displayed to the end user.
</p>
<p>
Two approaches to message retraction can be used. In the first approach, the retracted message is simply removed. This is appropriate where retraction is provided as a user service and the user has rights to remove messages sent from the record.
</p>
<p>
The second approach is to leave a tombstone, which if taken MUST be done in the following manner. It is recommended to use a tombstone, as simply deleting the message may cause confusion with MAM queries. Use of a tombstone is appropriate where it is desired to leave a record of the message that was redacted.
2018-05-21 06:47:54 -04:00
With this approach, the original message &lt;body&gt; is removed and replaced with a tombstone using the &lt;retracted&gt; element qualified by the 'urn:xmpp:mix:misc:0' namespace that shows the JID of user performing the retraction and the time of the retraction.
2018-05-21 05:53:33 -04:00
</p>
<example caption="Retracted message tombstone in a MAM result"><![CDATA[
<message id='aeb213' to='juliet@capulet.example/UUID-e3r/9264'>
<result xmlns='urn:xmpp:mam:2' queryid='f27' id='28482-98726-73623'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
<message xmlns='jabber:client' from="hag66@shakespeare.example"
to="macbeth@shakespeare.example">
2018-05-21 06:47:54 -04:00
<retracted xmlns='urn:xmpp:mix:misc:0' by='hag66@shakespeare.example'
2018-05-21 05:53:33 -04:00
time='2010-07-10T23:08:25Z'/>
</message>
</forwarded>
</result>
</message>
]]></example>
2018-05-21 06:47:54 -04:00
</section1>
2018-05-21 05:53:33 -04:00
2018-05-21 06:47:54 -04:00
<section1 topic='Telling another User about a Channel' anchor='usecase-user-tell'>
2018-05-21 05:53:33 -04:00
<p>
A convenient way to reference another channel is to use &xep0372; which enables the JID of a channel to be shared. This might be used simply to inform the message recipient about the channel or as mechanism to invite the user to join the channel. This is useful as an invitation mechanism to a channel that any user can join or where the invitee knows that the user is allowed to join (e.g., because the channel is for all users in an organization).
</p>
2018-05-21 06:47:54 -04:00
</section1>
<section1 topic='Inviting another User to join a Channel that the user does not have Permission to Join' anchor='usecase-user-invite'>
2018-05-21 05:53:33 -04:00
<p> Invitation by reference, as described in the previous section, is a convenient approach to invite a user to join a channel that the user has permission to join. This section describes the approach used when the inviter has permission to grant rights for the invitee to become a channel participant. This might be because the inviter is an administrator of the channel or the channel or if the inviter is a channel participant and the channel allows invitation by participants (this channel capability is controlled by the channel configuration variable 'Participation Addition by Invitation from Participant'). Invitation by reference is used to avoid cluttering the allowed node with JIDs of users who are invited to join, but do not accept the invitation.
When a channel participant(the inviter) invites another user (the invitee) to join a channel, the following sequence of steps is followed:
</p>
<ol>
<li>The inviter checks using capability discovery that the invitee supports MIX.</li>
<li>The channel inviter sends to the channel requesting an invite for the invitee.</li>
<li>The channel sends an invitation to the inviter.</li>
<li>The inviter sends the invitation to the invitee.</li>
<li>The invitee MAY use the invitation to join the channel.</li>
<li>The invitee MAY send a response to the inviter, indicating if the invitation was accepted or declined.</li>
</ol>
<p>
2018-05-21 06:47:54 -04:00
The first step is for the inviter to request an invitation from the channel. The invitation contains inviter, invitee and a token. The channel will evaluate if the inviter has rights to issue the invitation. This will be because the inviter is a channel administrator or if the inviter is a channel participant and the channel allows invitation by participants. If the inviter has rights to make the invitation, the channel will return a token. The token is a string that the channel can subsequently use to validate an invitation. The format of the token is not specified in this standard. The encoded token MAY reflect a validity time. The invitation request is encoded as an &lt;invite/&gt; child element of an &lt;iq/&gt; element. The &lt;invite/&gt; element is qualified by the 'urn:xmpp:mix:misc:0' namespace. &lt;invite/&gt; contains an &lt;invitation/&gt; child element, which contain &lt;inviter/&gt;, &lt;invitee/&gt;, &lt;channel/&gt; and &lt;token/&gt; child elements.
2018-05-21 05:53:33 -04:00
</p>
<example caption='Inviter Requests and Receives Invitation'><![CDATA[
<iq from='hag66@shakespeare.example/UUID-h5z/0253'
id='kl2fax27'
to='coven@mix.shakespeare.example'
type='get'>
2018-05-21 06:47:54 -04:00
<invite xmlns='urn:xmpp:mix:misc:0'>
2018-05-21 05:53:33 -04:00
<invitee>cat@shakespeare.example</invitee>
</invite>
</iq>
<iq from='coven@mix.shakespeare.example'
id='kl2fax27'
to='hag66@shakespeare.example/UUID-h5z/0253'
type='result'>
2018-05-21 06:47:54 -04:00
<invite xmlns='urn:xmpp:mix:misc:0'>
2018-05-21 05:53:33 -04:00
<invitation>
<inviter>hag66@shakespeare.example</inviter>
<invitee>cat@shakespeare.example</invitee>
<channel>coven@mix.shakespeare.example</channel>
<token>ABCDEF</token>
</invitation>
<invite/>
</iq>
]]></example>
<p>
The inviter can now send the invitee a message containing the invitation within the &lt;message/&gt; element, as shown in the following example.
</p>
<example caption='Inviter sends Invitation to Invitee'><![CDATA[
<message from='hag66@shakespeare.example/UUID-h5z/0253'
id='f5pp2toz'
to='cat@shakespeare.example'>
<body>Would you like to join the coven?<body>
2018-05-21 06:47:54 -04:00
<invitation xmlns='urn:xmpp:mix:misc:0'>
2018-05-21 05:53:33 -04:00
<inviter>hag66@shakespeare.example</inviter>
<invitee>cat@shakespeare.example</invitee>
<channel>coven@mix.shakespeare.example</channel>
<token>ABCDEF</token>
</invitation>
</iq>
]]></example>
<p>The invitation can now be used by the invitee to join a channel. The &lt;invitation/&gt; child element is simply added to the standard channel &lt;join/&gt; element, so that the channel can validate the invitation using the token. If the allowed node is present and the invitee is not matched against any item, the channel MUST add the invitee to the allowed node as part of the join.</p>
<example caption="User Joins a Channel with an Invitation"><![CDATA[
<iq type='set'
from='cat@shakespeare.example'
to='coven@mix.shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-21 06:47:54 -04:00
<join xmlns='urn:xmpp:mix:misc:0'>
2018-05-21 05:53:33 -04:00
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<invitation>
<inviter>hag66@shakespeare.example</inviter>
<invitee>cat@shakespeare.example</invitee>
<channel>coven@mix.shakespeare.example</channel>
<token>ABCDEF</token>
</invitation>
</join>
</iq>
]]></example>
<p>The invitee MAY send an acknowledgement back to the inviter, noting the status of the invitation.
2018-05-21 06:47:54 -04:00
This is encoded as an &lt;invitation-ack/&gt; child element of &lt;message/&gt; element. The &lt;invitation-ack/&gt; element is qualified by the 'urn:xmpp:mix:misc:0' namespace. The &lt;invitation-ack/&gt; has an &lt;invitation/&gt; child element that encodes the invitation being acknowledged and a &lt;value/&gt; child element to encode the acknowledgement value.
2018-05-21 05:53:33 -04:00
&lt;value/&gt; has the following values:</p>
<ul>
<li>'Joined': The invitee has joined the channel.</li>
<li>'Declined': The invitee is not taking up the invitation.</li>
<li>'Acknowledged': The invitation is acknowledged, without information on action taken or planned.</li>
</ul>
<example caption='Invitee sends Acknowledgement to Inviter'><![CDATA[
<message from='cat@shakespeare.example/UUID-l1w/8813'
id='b6p9llze'
to='hag66@shakespeare.example/UUID-h5z/0253'>
<body>No Thanks - too busy chasing mice....<body>
2018-05-21 06:47:54 -04:00
<invitation-ack xmlns='urn:xmpp:mix:misc:0'>
2018-05-21 05:53:33 -04:00
<value>Declined</value>
<invitation>
<inviter>hag66@shakespeare.example</inviter>
<invitee>cat@shakespeare.example</invitee>
<channel>coven@mix.shakespeare.example</channel>
<token>ABCDEF</token>
</invitation>
</invitation-ack>
</iq>
]]></example>
2018-05-21 06:47:54 -04:00
</section1>
2018-05-21 05:53:33 -04:00
2018-05-22 09:19:59 -04:00
2018-05-21 06:47:54 -04:00
<section1 topic="Converting a 1:1 Conversation to a Channel" anchor="usecase-admin-converting-chat">
2018-05-21 05:53:33 -04:00
<p>
A common use case for an ad hoc channel is where two users are engaged in a 1:1 chat and wish to broaden the discussion. Prior to bringing more users into a channel, using standard invitation process, there is a need to create and populate a channel. The first step is for one of the two users to create an ad hoc channel, as described in the previous section. The other user will then be invited, and can switch to the new channel.
</p>
<p>
It can also be useful to share some or all of the messages from the 1:1 discussion into the new channel. The mechanism to do this is to forward messages to be shared to the channel using &xep0297;. A body SHOULD NOT be used in the outer message.
Sharing history is optional. If history is shared, it MUST be done by the user creating the channel before the other user is invited. Any other use of forwarded messages MUST be treated as a channel participant forwarding a message to the channel and MUST NOT be treated as history sharing.
</p>
<example caption="Forwarding a message to create History" ><![CDATA[
<message from='hag66@shakespeare.example/UUID-a1j/7533'
to='A1B2C345@mix.shakespeare.example'
id='92vax143g'
type='groupchat'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
<message from='hag67@shakespeare.example/pda'
id='0202197'
to='hag66@shakespeare.example/UUID-a1j/7533'
type='chat'
xmlns='jabber:client'>
<body>Harpier cries: 'tis time, 'tis time.</body>
</message>
</forwarded>
</message>
]]></example>
<p>
2018-05-22 09:20:12 -04:00
There are a number of security considerations with sharing 1:1 history in a channel. There may be sensitive information in the 1:1 history, and the user sharing this history should ensure that none of this is sensitive, prior to sharing in this way. The user creating the channel has potential to inject history messages which were not part of the history. It is recommended that the second user joining the channel to validate that the messages match the history and to take appropriate action if they do not.
2018-05-21 05:53:33 -04:00
</p>
2018-05-21 06:47:54 -04:00
</section1>
2018-05-21 05:53:33 -04:00
<section1 topic='Internationalization Considerations' anchor='i18n'>
2018-05-22 09:20:12 -04:00
<p>See considerations in &xep0369;.
2018-05-21 05:53:33 -04:00
</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
2018-05-22 09:20:12 -04:00
<p>See considerations in &xep0369;.</p>
2018-05-21 05:53:33 -04:00
<p>
When converting a 1:1 conversation to a channel there is potential to expose sensitive information and to present invalid information.
</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>None.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>The urn:xmpp:mix namespace needs to be registered.</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<p>To be supplied when MIX progresses to proposed standard.</p>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
2018-05-22 09:20:12 -04:00
<p>See &xep0369; for a list of contributors to the MIX Family of specifications.</p>
2018-05-21 05:53:33 -04:00
</section1>
</xep>