%ents; ]>
Simple Communications Blocking This document specifies an XMPP protocol extension for simple communications blocking. &LEGALNOTICE; 0191 Experimental Standards Track Standards JIG XMPP Core XMPP IM JEP-0030 None None blocking &stpeter; 0.2 2006-08-30 psa

Added implementation notes regarding polite blocking and filtering of search results; recommended retrieval of block list after authentication; defined protocol flow for unblocking all contacts.

0.1 2006-08-16 psa

Initial JEP version.

0.0.2 2006-08-10 psa

Added block list retrieval use case; modified block and unblock syntax to use item child element.

0.0.1 2006-08-09 psa

First draft.

&rfc3921; includes an XMPP protocol extension for communications blocking. Unfortunately, because that extension (privacy lists) is quite complex, it has not been widely implemented in servers and has been implemented virtually not at all in clients. This is problematic, since the ability to block communications from selected users is an important feature for an instant messaging system (and is required by &rfc2779;). However, the full power of privacy lists is not needed in order to block communications, so this document proposes a much simpler blocking protocol that meets the requirement specified in RFC 2779 and can be implemented much more easily in Jabber/XMPP clients and servers.

The requirements for simple communications blocking are straightforward:

  1. A user must be able to block communications from a specific contact.
  2. A user should be able to determine which contacts are blocked.
  3. A user should be able to unblock communications from a specific contact.

In order for a client to discover whether its server supports the protocol defined herein, it MUST send a &jep0030; information request to the server:

]]>

If the server supports the protocol defined herein, it MUST return a feature of "http://jabber.org/protocol/blocking":

... ... ]]>

In order for a user to block communications from a contact, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing a <block/> element qualified by the 'http://jabber.org/protocol/blocking' namespace, where the JID to be blocked is encapsulated as the 'jid' attribute of the <item/> child element:

]]>

If the server can successfully process the block command, it MUST return an IQ-result:

]]>

(Standard XMPP stanza errors apply; see &xmppcore; and &jep0086;.)

Note: The <block/> element MAY contain more than one <item/> child.

Once the user has blocked communications from the contact, the user's server MUST NOT deliver any XML stanzas from the contact to the user.

If the contact attempts to send a stanza to the user (i.e., an inbound stanza from the user's perspective), the user's server shall return an error according to the following rules:

  • For presence stanzas, it is NOT RECOMMENDED to return an error.
  • For message stanzas, the server MAY return an error, which SHOULD be &unavailable;.
  • For IQ stanzas, the server MUST return an error, which SHOULD be &unavailable;.

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 ¬acceptable; error containing an application-specific error condition of <blocked/> qualified by the 'http://jabber.org/protocol/blocking#errors' namespace:

Can you hear me now? ]]>

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 <blocklist/> element qualified by the 'http://jabber.org/protocol/blocking' namespace:

]]>

If the user has any contacts in its blocklist, the server MUST return an IQ-result containing a <blocklist/> element that in turn contains one child <item/> element for each blocked contact:

]]>

If the user has no contacts in its blocklist, the server MUST return an IQ-result containing an empty <blocklist/> element:

]]>

A client SHOULD retrieve the block list after authenticating with its server.

In order for a user to unblock communications from a contact, the user's client shall send an IQ-set with no 'to' address (thus handled by the user's server) containing an <unblock/> element qualified by the 'http://jabber.org/protocol/blocking' namespace, where the JID to be unblocked is encapsulated as the 'jid' attribute of the <item/> child element:

]]>

If the server can successfully process the unblock command, it MUST return an IQ-result:

]]>

Once the user has unblocked communications from the contact, the user's server MUST deliver any XML stanzas from the contact to the user.

In order for a user to unblock communications from 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 <unblock/> element qualified by the 'http://jabber.org/protocol/blocking' namespace:

]]>

If the server can successfully process the unblock command, it MUST return an IQ-result:

]]>

Once the user has unblocked communications from all contacts, the user's server MUST deliver any XML stanzas from those contacts to the user.

When a server receives a block command from a user, it MAY cancel any existing presence subscriptions between the user and the blocked user and MAY send a message to the blocked user; however, it is RECOMMENDED to deploy so-called "polite blocking" instead (i.e., to not cancel the presence subscriptions or send a notification). Which approach to follow is a matter of local service policy.

A service MAY also filter blocking users out of searches performed on user directories (see, for example, &jep0055;); however, that functionality is out of scope for this specification.

If properly implemented, this protocol extension does not introduce any new security concerns above and beyond those defined in RFC 3920 and RFC 3921.

No interaction with &IANA; is required as a result of this specification.

The ®ISTRAR; shall include 'http://jabber.org/protocol/blocking' and 'http://jabber.org/protocol/blocking#errors' in its registry of protocol namespaces (see &NAMESPACES;).

]]> ]]>

Thanks to Valerie Mercier, Maciek Niedzielski, and Remko Tronçon for their feedback.