mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-24 18:22:24 -05:00
0.6
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1398 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
ac137a388a
commit
8256ad0862
158
xep-0168.xml
158
xep-0168.xml
@ -24,6 +24,12 @@
|
||||
<shortname>TO BE ASSIGNED</shortname>
|
||||
&stpeter;
|
||||
&hildjj;
|
||||
<revision>
|
||||
<version>0.6</version>
|
||||
<date>2007-11-19</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Documented optional pubsub transport for RAP data.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.5</version>
|
||||
<date>2007-11-15</date>
|
||||
@ -120,60 +126,133 @@
|
||||
<p>What is needed is a way for the user's clients to indicate that the application priority for the three resources is different from the standard XMPP priority. Such information can also be used by an XMPP server to route XMPP &MESSAGE; stanzas directed to a user's bare JID (&BAREJID;). This document defines such a mechanism via an optional XMPP presence extension.</p>
|
||||
<p>In addition, this document also defines a way for an XMPP server to flag which resource it considers to be primary for any given application type, if it has information -- such as communication preferences -- that can help it determine the primary resource.</p>
|
||||
</section1>
|
||||
<section1 topic='Application Priority' anchor='primary'>
|
||||
<p>Application priority is encapsulated by a <rap/> element qualified by the 'http://www.xmpp.org/extensions/xep-0168.html#ns' namespace &NSNOTE;. The attributes of the <rap/> element are as follows.</p>
|
||||
<table caption='RAP Attributes'>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Definition</th>
|
||||
<th>Inclusion</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ns</td>
|
||||
<td>The primary namespace of the application type.</td>
|
||||
<td>REQUIRED</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>num</td>
|
||||
<td>The resource's priority for this application type. <note>This protocol uses a 'num' attribute rather than a 'priority' attribute to reduce confusion with standard XMPP presence.)</note></td>
|
||||
<td>REQUIRED</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>The following business rules apply to resource application presence provided by the client:</p>
|
||||
<ol start='1'>
|
||||
<li><p>A client SHOULD include a <rap/> element for each application type for which it wishes to advertise a priority, but SHOULD NOT do so if the priority for that application is the same as the resource's standard XMPP priority.</p></li>
|
||||
<li><p>A client MUST NOT generate a <rap/> element that has a 'ns' attribute whose value is "jabber:client" or that has no 'ns' attribute (since the default 'ns' is "jabber:client").</p></li>
|
||||
<li><p>The <rap/> element SHOULD be empty.</p></li>
|
||||
</ol>
|
||||
<p>Consider the three resources ("desktop", "pda", and "mobile") mentioned above. The presence stanzas received by a contact for those three resources would be as follows.</p>
|
||||
<example caption='Contact receives presence from user'><![CDATA[
|
||||
<presence from='juliet@capulet.com/desktop' to='romeo@montague.net/home'>
|
||||
<section1 topic='Application Priority' anchor='rap'>
|
||||
<section2 topic='Format' anchor='rap-format'>
|
||||
<p>Application priority is encapsulated by a <rap/> element qualified by the 'http://www.xmpp.org/extensions/xep-0168.html#ns' namespace &NSNOTE;. The attributes of the <rap/> element are as follows.</p>
|
||||
<table caption='RAP Attributes'>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Definition</th>
|
||||
<th>Inclusion</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ns</td>
|
||||
<td>The primary namespace of the application type.</td>
|
||||
<td>REQUIRED</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>num</td>
|
||||
<td>The resource's priority for this application type. <note>This protocol uses a 'num' attribute rather than a 'priority' attribute to reduce confusion with standard XMPP presence.)</note></td>
|
||||
<td>REQUIRED</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>An example follows.</p>
|
||||
<example caption='Data format'><![CDATA[
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
num='5'/>
|
||||
]]></example>
|
||||
</section2>
|
||||
<section2 topic='Generation' anchor='rap-gen'>
|
||||
<p>The following business rules apply to the generation of resource application priority by the client:</p>
|
||||
<ol start='1'>
|
||||
<li><p>A client SHOULD include a <rap/> element for each application type for which it wishes to advertise a priority, but SHOULD NOT do so if the priority for that application is the same as the resource's standard XMPP priority.</p></li>
|
||||
<li><p>A client MUST NOT generate a <rap/> element that has a 'ns' attribute whose value is "jabber:client" or that has no 'ns' attribute (since the default 'ns' is "jabber:client").</p></li>
|
||||
<li><p>The <rap/> element SHOULD be empty.</p></li>
|
||||
</ol>
|
||||
<p>As explained in the following sections, there are two possible transports for RAP data: standard XMPP presence and the XMPP publish-subscribe extension.</p>
|
||||
</section2>
|
||||
<section2 topic='Presence Transport' anchor='rap-presence'>
|
||||
<p>RAP data MAY be included as extended content within a standard XMPP presence stanza. This is consistent with the rule that presence stanzas must be related to the network availability or communication preferences of the entity that provides presence information.</p>
|
||||
<p>For the three resources ("desktop", "pda", and "mobile") mentioned above, the presence stanzas received by a contact would be as follows.</p>
|
||||
<example caption='Contact receives presence from user'><![CDATA[
|
||||
<presence from='juliet@capulet.lit/desktop' to='romeo@montague.lit/home'>
|
||||
<priority>10</priority>
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
num='5'/>
|
||||
</presence>
|
||||
|
||||
<presence from='juliet@capulet.com/pda' to='romeo@montague.net/home'>
|
||||
<presence from='juliet@capulet.lit/pda' to='romeo@montague.lit/home'>
|
||||
<priority>5</priority>
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
num='-1'/>
|
||||
</presence>
|
||||
|
||||
<presence from='juliet@capulet.com/mobile' to='romeo@montague.net/home'>
|
||||
<presence from='juliet@capulet.lit/mobile' to='romeo@montague.lit/home'>
|
||||
<priority>-1</priority>
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
num='10'/>
|
||||
</presence>
|
||||
]]></example>
|
||||
]]></example>
|
||||
</section2>
|
||||
<section2 topic='Pubsub Transport' anchor='rap-pubsub'>
|
||||
<p>Alternatively, RAP data MAY be provided via the XMPP &xep0060; publish-subscribe extension, specifically the &xep0163; profile thereof.</p>
|
||||
<p>For the three resources ("desktop", "pda", and "mobile") mentioned above, the pubsub notifications received by a contact would be as follows.</p>
|
||||
<example caption='Contact receives pubsub notifications from user'><![CDATA[
|
||||
<message from='juliet@capulet.lit'
|
||||
to='romeo@montague.lit/orchard'
|
||||
type='headline'
|
||||
id='rap1'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0168.html#ns'>
|
||||
<item>
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
num='5'/>
|
||||
</item>
|
||||
</items>
|
||||
</event>
|
||||
<addresses xmlns='http://jabber.org/protocol/address'>
|
||||
<address type='replyto' jid='juliet@capulet.lit/desktop'/>
|
||||
</addresses>
|
||||
</message>
|
||||
|
||||
<message from='juliet@capulet.lit'
|
||||
to='romeo@montague.lit/orchard'
|
||||
type='headline'
|
||||
id='rap2'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0168.html#ns'>
|
||||
<item>
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
num='-1'/>
|
||||
</item>
|
||||
</items>
|
||||
</event>
|
||||
<addresses xmlns='http://jabber.org/protocol/address'>
|
||||
<address type='replyto' jid='juliet@capulet.lit/pda'/>
|
||||
</addresses>
|
||||
</message>
|
||||
|
||||
<message from='juliet@capulet.lit'
|
||||
to='romeo@montague.lit/orchard'
|
||||
type='headline'
|
||||
id='rap3'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='http://www.xmpp.org/extensions/xep-0168.html#ns'>
|
||||
<item>
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
num='10'/>
|
||||
</item>
|
||||
</items>
|
||||
</event>
|
||||
<addresses xmlns='http://jabber.org/protocol/address'>
|
||||
<address type='replyto' jid='juliet@capulet.lit/mobile'/>
|
||||
</addresses>
|
||||
</message>
|
||||
]]></example>
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='Flagging the Primary Resource' anchor='flag'>
|
||||
<p>The user's server may have special information that enables it to flag a resource as primary for a given application type. For instance, the server may include a communication policy service that enables the user to define (outside the context of any presence priorities) that she would prefer to be called at her desktop computer only between the hours of 9:00 AM and 5:00 PM local time, prefer to be called on her mobile phone at all other times, and so on.</p>
|
||||
<p>To flag the primary resource related to a specific application type, the server shall add a <primary/> child to the relevant RAP element. Here is an example:</p>
|
||||
<example caption='Primary resource flag'><![CDATA[
|
||||
<presence from='juliet@capulet.com/mobile'>
|
||||
<presence from='juliet@capulet.lit/mobile'>
|
||||
<priority>-1</priority>
|
||||
<rap xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'
|
||||
@ -197,8 +276,8 @@
|
||||
<p>For example, consider a &xep0155; request sent from one user (Romeo) to another (Juliet), where the users do not share presence. Romeo wants the request to be delivered to the highest-priority resource for the "http://www.xmpp.org/extensions/xep-0167#ns" application type.</p>
|
||||
<example caption="User requests session"><![CDATA[
|
||||
<message type='headline'
|
||||
from='romeo@montague.net/orchard'
|
||||
to='juliet@capulet.com'>
|
||||
from='romeo@montague.lit/orchard'
|
||||
to='juliet@capulet.lit'>
|
||||
<route xmlns='http://www.xmpp.org/extensions/xep-0168.html#ns-raproute'
|
||||
ns='http://www.xmpp.org/extensions/xep-0167#ns'/>
|
||||
<thread>ffd7076498744578d10edabfe7f4a866</thread>
|
||||
@ -222,8 +301,8 @@
|
||||
<p>In order to discover whether a server or other entity supports this protocol, an entity MUST use &xep0030; or the dynamic profile of service discovery defined in &xep0115;.</p>
|
||||
<example caption='Entity queries a server regarding protocol support'><![CDATA[
|
||||
<iq type='get'
|
||||
from='juliet@capulet.com/balcony'
|
||||
to='capulet.com'
|
||||
from='juliet@capulet.lit/balcony'
|
||||
to='capulet.lit'
|
||||
id='disco1'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
||||
</iq>
|
||||
@ -235,8 +314,8 @@
|
||||
</ul>
|
||||
<example caption='Server communicates protocol support for RAP'><![CDATA[
|
||||
<iq type='result'
|
||||
from='capulet.com'
|
||||
to='juliet@capulet.com/balcony'
|
||||
from='capulet.lit'
|
||||
to='juliet@capulet.lit/balcony'
|
||||
id='disco1'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||
...
|
||||
@ -248,7 +327,8 @@
|
||||
]]></example>
|
||||
</section1>
|
||||
<section1 topic='Security Considerations' anchor='security'>
|
||||
<p>Neither client publishing of resource application priority nor server flagging of the primary resource introduces any known security vulnerabilities or compromises of user privacy.</p>
|
||||
<p>When the pubsub transport is used, client publishing of resource application priority may result in a presence leak if the node access model is "open". Care should be taken in properly configuring the pubsub node so that unauthorized entities are not able to retrieve information about the user's available resources.</p>
|
||||
<p>Server flagging of the primary resource is not know to introduce any vulnerabilities or compromises of user privacy.</p>
|
||||
</section1>
|
||||
<section1 topic='IANA Considerations' anchor='iana'>
|
||||
<p>This document requires no interaction with &IANA;.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user