1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 18:22:24 -05:00

1.0 DRAFT

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@224 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2006-11-27 17:59:49 +00:00
parent 38b010d11e
commit 2cff9f2b08

View File

@ -10,7 +10,7 @@
<abstract>This document specifies an XMPP protocol extension for simple communications blocking.</abstract>
&LEGALNOTICE;
<number>0191</number>
<status>Proposed</status>
<status>Draft</status>
<type>Standards Track</type>
<jig>Standards JIG</jig>
<dependencies>
@ -22,6 +22,12 @@
<supersededby>None</supersededby>
<shortname>blocking</shortname>
&stpeter;
<revision>
<version>1.0</version>
<date>2006-11-21</date>
<initials>psa</initials>
<remark><p>Per a vote of the XMPP Council, advanced status to Draft; also modified namespace to use XMPP URN.</p></remark>
</revision>
<revision>
<version>0.5</version>
<date>2006-11-06</date>
@ -77,8 +83,8 @@
</ol>
</section1>
<section1 topic='Relationship to Privacy Lists' anchor='privacy'>
<p>The simple communications blocking protocol specified herein is intended to be a user-friendly "front end" to a subset of the functionality defined by the privacy lists protocol. If a service deploys both privacy lists and simple communications blocking, both protocols MUST use the same back-end data store.</p>
<p>Wherever possible, this document attempts to define a protocol that is fully consistent with <cite>XEP-0016</cite>. If a particular aspect of functionality (e.g., stanza processing or JID matching rules) is not specified herein, the relevant text in <cite>XEP-0016</cite> shall be taken to apply.</p>
<p>The simple communications blocking protocol specified herein is intended to be a user-friendly "front end" to a subset of the functionality defined by the privacy lists protocol (<cite>XEP-0016</cite>). If a service deploys both privacy lists and simple communications blocking, both protocols MUST use the same back-end data store.</p>
<p>Wherever possible, this document attempts to define a protocol that is fully consistent with <cite>XEP-0016</cite>. If a particular aspect of functionality is not specified herein, the relevant text in <cite>XEP-0016</cite> shall be taken to apply.</p>
</section1>
<section1 topic='JID Matching' anchor='matching'>
<p>Matching of JIDs as specified in the 'jid' attribute of the &lt;item/&gt; element SHOULD proceed in the following order (this is consistent with <cite>XEP-0016</cite>):</p>
@ -97,28 +103,28 @@
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<p>If the server supports the protocol defined herein, it MUST return a feature of "http://jabber.org/protocol/blocking":</p>
<p>If the server supports the protocol defined herein, it MUST return a feature of "urn:xmpp:blocking":</p>
<example caption='Service discovery response'><![CDATA[
<iq from='capulet.com' to='juliet@capulet.com/chamber' type='result' id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='http://jabber.org/protocol/blocking'/>
<feature var='urn:xmpp:blocking'/>
...
</query>
</iq>
]]></example>
</section2>
<section2 topic='User Retrieves Block List' anchor='blocklist'>
<p>In order for a client to request a user's list of blocked contacts (e.g., in order to determine whether to unblock a contact), it shall send an IQ-get with no 'to' address (thus handled by the user's server) containing a &lt;blocklist/&gt; element qualified by the 'http://jabber.org/protocol/blocking' namespace:</p>
<p>In order for a client to request a user's list of blocked contacts (e.g., in order to determine whether to unblock a contact), it shall send an IQ-get with no 'to' address (thus handled by the user's server) containing a &lt;blocklist/&gt; element qualified by the 'urn:xmpp:blocking' namespace:</p>
<example caption='Client requests blocklist'><![CDATA[
<iq type='get' id='blocklist1'>
<blocklist xmlns='http://jabber.org/protocol/blocking'/>
<blocklist xmlns='urn:xmpp:blocking'/>
</iq>
]]></example>
<p>If the user has any contacts in its blocklist, the server MUST return an IQ-result containing a &lt;blocklist/&gt; element that in turn contains one child &lt;item/&gt; element for each blocked contact:</p>
<example caption='Server returns blocklist with items'><![CDATA[
<iq type='result' id='blocklist1'>
<blocklist xmlns='http://jabber.org/protocol/blocking'>
<blocklist xmlns='urn:xmpp:blocking'>
<item jid='romeo@montague.net'/>
<item jid='iago@shakespeare.lit'/>
</blocklist>
@ -127,16 +133,16 @@
<p>If the user has no contacts in its blocklist, the server MUST return an IQ-result containing an empty &lt;blocklist/&gt; element:</p>
<example caption='Server returns empty blocklist'><![CDATA[
<iq type='result' id='blocklist1'>
<blocklist xmlns='http://jabber.org/protocol/blocking'/>
<blocklist xmlns='urn:xmpp:blocking'/>
</iq>
]]></example>
<p>A client SHOULD retrieve the block list after authenticating with its server and before completing any blocking or unblocking operations.</p>
</section2>
<section2 topic='User Blocks Contact' anchor='block'>
<p>In order for a user to block communications with a contact, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing a &lt;block/&gt; element qualified by the 'http://jabber.org/protocol/blocking' namespace, where the JID to be blocked is encapsulated as the 'jid' attribute of the &lt;item/&gt; child element:</p>
<p>In order for a user to block communications with a contact, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing a &lt;block/&gt; element qualified by the 'urn:xmpp:blocking' namespace, where the JID to be blocked is encapsulated as the 'jid' attribute of the &lt;item/&gt; child element:</p>
<example caption='Block command'><![CDATA[
<iq from='juliet@capulet.com/chamber' type='set' id='block1'>
<block xmlns='http://jabber.org/protocol/blocking'>
<block xmlns='urn:xmpp:blocking'>
<item jid='romeo@montague.net'/>
</block>
</iq>
@ -148,13 +154,13 @@
<p>The server MUST also send an IQ-set to all of the user's resources that have requested the blocklist, containing the blocked item(s):</p>
<example caption='Block &quot;push&quot;'><![CDATA[
<iq to='juliet@capulet.com/chamber' type='set' id='push1'>
<block xmlns='http://jabber.org/protocol/blocking'>
<block xmlns='urn:xmpp:blocking'>
<item jid='romeo@montague.net'/>
</block>
</iq>
<iq to='juliet@capulet.com/balcony' type='set' id='push2'>
<block xmlns='http://jabber.org/protocol/blocking'>
<block xmlns='urn:xmpp:blocking'>
<item jid='romeo@montague.net'/>
</block>
</iq>
@ -166,25 +172,25 @@
<ul>
<li>For presence stanzas (including notifications, subscriptions, and probes), the server MUST NOT respond and MUST NOT return an error.</li>
<li>For message stanzas, the server SHOULD return an error, which SHOULD be &unavailable;.</li>
<li>For IQ stanzas, the server MUST return an error, which SHOULD be &unavailable;.</li>
<li>For IQ stanzas of type "get" or "set", the server MUST return an error, which SHOULD be &unavailable;. IQ stanzas of other types MUST be silently dropped by the server.</li>
</ul>
<p>If the foregoing suggestions are followed, the user will appear offline to the contact.</p>
<p>If the user attempts to send an outbound stanza to the contact, the user's server MUST NOT route the stanza to the contact but instead MUST return a &notacceptable; error containing an application-specific error condition of &lt;blocked/&gt; qualified by the 'http://jabber.org/protocol/blocking#errors' namespace:</p>
<p>If the user attempts to send an outbound stanza to the contact, the user's server MUST NOT route the stanza to the contact but instead MUST return a &notacceptable; error containing an application-specific error condition of &lt;blocked/&gt; qualified by the 'urn:xmpp:blocking:errors' namespace:</p>
<example caption='Error: contact is blocked'><![CDATA[
<message type='error' from='romeo@montague.net' to='juliet@capulet.com'>
<body>Can you hear me now?</body>
<error type='cancel'>
<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<blocked xmlns='http://jabber.org/protocol/blocking#errors'/>
<blocked xmlns='urn:xmpp:blocking:errors'/>
</error>
</message>
]]></example>
</section2>
<section2 topic='User Unblocks Contact' anchor='unblock'>
<p>In order for a user to unblock communications with a contact, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing an &lt;unblock/&gt; element qualified by the 'http://jabber.org/protocol/blocking' namespace, where the JID to be unblocked is encapsulated as the 'jid' attribute of the &lt;item/&gt; child element:</p>
<p>In order for a user to unblock communications with a contact, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing an &lt;unblock/&gt; element qualified by the 'urn:xmpp:blocking' namespace, where the JID to be unblocked is encapsulated as the 'jid' attribute of the &lt;item/&gt; child element:</p>
<example caption='Unblock contact command'><![CDATA[
<iq type='set' id='unblock1'>
<unblock xmlns='http://jabber.org/protocol/blocking'>
<unblock xmlns='urn:xmpp:blocking'>
<item jid='romeo@montague.net'/>
</unblock>
</iq>
@ -196,13 +202,13 @@
<p>The server MUST also send an IQ-set to all of the user's resources that have requested the blocklist, containing the unblocked item(s):</p>
<example caption='Unblock &quot;push&quot;'><![CDATA[
<iq to='juliet@capulet.com/chamber' type='set' id='push3'>
<unblock xmlns='http://jabber.org/protocol/blocking'>
<unblock xmlns='urn:xmpp:blocking'>
<item jid='romeo@montague.net'/>
</unblock>
</iq>
<iq to='juliet@capulet.com/balcony' type='set' id='push4'>
<unblock xmlns='http://jabber.org/protocol/blocking'>
<unblock xmlns='urn:xmpp:blocking'>
<item jid='romeo@montague.net'/>
</unblock>
</iq>
@ -211,10 +217,10 @@
<p>After the user has unblocked communications with the contact, the user's server MUST deliver any subsequent XML stanzas from the contact to the user.</p>
</section2>
<section2 topic='User Unblocks All Contacts' anchor='unblockall'>
<p>In order for a user to unblock communications with all contacts, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing an empty &lt;unblock/&gt; element qualified by the 'http://jabber.org/protocol/blocking' namespace:</p>
<p>In order for a user to unblock communications with all contacts, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing an empty &lt;unblock/&gt; element qualified by the 'urn:xmpp:blocking' namespace:</p>
<example caption='Unblock all command'><![CDATA[
<iq type='set' id='unblock2'>
<unblock xmlns='http://jabber.org/protocol/blocking'/>
<unblock xmlns='urn:xmpp:blocking'/>
</iq>
]]></example>
<p>If the server can successfully process the unblock command, it MUST return an IQ-result:</p>
@ -224,11 +230,11 @@
<p>The server MUST also send an IQ-set to all of the user's resources that have requested the blocklist, containing notification of global unblocking:</p>
<example caption='Unblock all &quot;push&quot;'><![CDATA[
<iq to='juliet@capulet.com/chamber' type='set' id='push5'>
<unblock xmlns='http://jabber.org/protocol/blocking'/>
<unblock xmlns='urn:xmpp:blocking'/>
</iq>
<iq to='juliet@capulet.com/balcony' type='set' id='push6'>
<unblock xmlns='http://jabber.org/protocol/blocking'/>
<unblock xmlns='urn:xmpp:blocking'/>
</iq>
]]></example>
<p>Once the user has unblocked communications with all contacts, the user's server MUST deliver any XML stanzas from those contacts to the user.</p>
@ -246,7 +252,7 @@
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; shall include 'http://jabber.org/protocol/blocking' and 'http://jabber.org/protocol/blocking#errors' in its registry of protocol namespaces (see &NAMESPACES;).</p>
<p>The &REGISTRAR; includes 'urn:xmpp:blocking' and 'urn:xmpp:blocking:errors' in its registry of protocol namespaces (see &NAMESPACES;).</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
@ -256,8 +262,8 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/blocking'
xmlns='http://jabber.org/protocol/blocking'
targetNamespace='urn:xmpp:blocking'
xmlns='urn:xmpp:blocking'
elementFormDefault='qualified'>
<xs:element name='block'>
@ -305,14 +311,14 @@
</xs:schema>
]]></code>
</section2>
<section2 topic='blocking#errors' anchor='schema-blocking-errors'>
<section2 topic='blocking:errors' anchor='schema-blocking-errors'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/blocking#errors'
xmlns='http://jabber.org/protocol/blocking#errors'
targetNamespace='urn:xmpp:blocking:errors'
xmlns='urn:xmpp:blocking:errors'
elementFormDefault='qualified'>
<xs:element name='blocked' type='empty'/>
@ -328,6 +334,6 @@
</section2>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Valerie Mercier, Maciek Niedzielski, and Remko Tron&#231;on for their feedback.</p>
<p>Thanks to Valerie Mercier, Maciek Niedzielski, Kevin Smith, and Remko Tron&#231;on for their feedback.</p>
</section1>
</xep>