This document specifies an XMPP-compatible protocol for user invisibility.
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Series: XEP
Number: 0186
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.7
Last Updated: 2008-05-12
Approving Body: XMPP Council
Dependencies: XMPP Core, XMPP IM, XEP-0030
Supersedes: XEP-0018
Superseded By: None
Short Name: NOT YET ASSIGNED
Wiki Page: <http://wiki.jabber.org/index.php/Invisible Command (XEP-0186)>
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.
Errata may be sent to <editor@xmpp.org>.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. Introduction
2. Requirements
3. Use Cases
3.1. Discovering Support
3.2. User Becomes Invisible
3.3. User Becomes Visible
4. Integration With Privacy Lists
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
7.1. Protocol Namespaces
8. XML Schema
Notes
Revision History
Some instant messaging implementations of the Jabber/XMPP protocols have long supported the ability for IM users to be online but appear invisible. The existing protocols for doing so are:
Invisible Presence [1] -- this protocol is not compatible with XMPP Core [2] and XMPP IM [3], and the speciifcation does not provide reliable documentation of the protocol in use since many server implementations support presence of type "invisible" but not presence of type "visible".
Invisibility [4] -- this protocol is a somewhat complicated use of Server-Based Privacy Rules [5] for the temporary purpose of appearing invisible rather than the intended purpose of permanently blocking communications; however, the invisible command defined herein can provide a client-friendly interface to the same data store used for privacy lists.
In order to provide a standards-compliant protocol that can be used in the long term, this document defines an IQ-based protocol that enables an IM user to become "invisible" and "visible" at will within the context of a given session. This protocol is intended to supersede the protocol described in XEP-0018 and provide a more client-friendly approach to invisibility than XEP-0126.
The requirements for invisible mode are straightforward:
In order for a client to discover whether its server supports the protocol defined herein, it MUST send a Service Discovery [6] information request to the server:
<iq from='bilbo@tolkien.lit/shire' id='disco1' to='tolkien.lit' type='get'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
If the server supports the protocol defined herein, it MUST return a feature of "urn:xmpp:tmp:invisible" (see Protocol Namespaces regarding issuance of one or more permanent namespaces).
<iq from='bilbo@tolkien.lit/shire' id='disco1' to='tolkien.lit' type='result'> <query xmlns='http://jabber.org/protocol/disco#info'> ... <feature var='urn:xmpp:tmp:invisible'/> ... </query> </iq>
A client SHOULD complete this service discovery process before sending initial presence to its server.
In order for a client to go invisible, it shall send an IQ-set with no 'to' address (thus handled by the user's server) containing an <invisible/> element qualified by the 'urn:xmpp:tmp:invisible' namespace (see Protocol Namespaces regarding issuance of one or more permanent namespaces).
<iq from='bilbo@tolkien.lit/shire' id='inv1' type='set'> <invisible xmlns='urn:xmpp:tmp:invisible'/> </iq>
If the server can successfully process the invisibility command, it MUST return an IQ-result.
<iq to='bilbo@tolkien.lit/shire' id='inv1' type='result'/>
(Standard XMPP stanza errors apply; see RFC 3920 and Error Condition Mappings [7].)
If the client enters invisible mode after having previously sent undirected presence with no 'type' attribute (e.g., after sending initial presence), the server MUST send <presence type='unavailable'/> presence from the specified resource to all contacts who would receive unavailable presence if the client sent <presence type='unavailable'/>.
While the client is in invisible mode, the server:
MUST NOT broadcast presence notifications as a result of receiving any subsequent undirected presence notifications from the client.
MUST deliver directed presence stanzas generated by the client.
MUST deliver inbound <presence/> stanzas.
SHOULD deliver inbound <message/> stanzas whose 'to' address is the bare JID (<localpart@domain.tld>) of the user (subject to standard XMPP stanza handling rules).
MUST deliver inbound <message/> and <iq/> stanzas whose 'to' address is the full JID (<localpart@domain.tld/resource>) corresponding to the resource of the client.
MUST deliver outbound <message/> and <iq/> stanzas generated by the client (for an important note regarding presence leaks, see the Security Considerations section of this document).
If after sending directed presence the client then sends <presence type='unavailable'/>, the server MUST deliver that unavailable presence only to the entities to which the client sent directed presence after going invisible.
In order for a client to become visible again, it shall send an IQ-set with no 'to' address (thus handled by the user's server) containing a <visible/> element qualified by the 'urn:xmpp:tmp:invisible' namespace (see Protocol Namespaces regarding issuance of one or more permanent namespaces).
<iq from='bilbo@tolkien.lit/shire' id='vis1' type='set'> <visible xmlns='urn:xmpp:tmp:invisible'/> </iq>
If the server can successfully process the visibility command, it MUST return an IQ-result.
<iq to='bilbo@tolkien.lit/shire' id='vis1' type='result'/>
When the client becomes visible, the server MUST treat that state as equivalent to an active session before receiving initial presence from the client.
It is the responsibility of the client to send an undirected presence notification to the server.
<presence from='bilbo@tolkien.lit/shire'/>
The server then MUST broadcast that presence to all entities who would normally receive presence broadcasts from the client (as well as any other entities to which the client sent directed presence while invisible).
A server MAY use the same backend data store for invisibility mode as defined herein and Server-Based Privacy Rules [8] as used for invisibility (see XEP-0126). If so, the server MUST update the relevant privacy lists on behalf of the user when the client requests initiation or termination of invisible mode.
It is important to recognize that invisibility can be defeated without the use of privacy lists, intelligent stanza handling by the server, and an awareness of context on the part of a client. For example:
No interaction with the Internet Assigned Numbers Authority (IANA) [14] is required as a result of this document.
Until this specification advances to a status of Draft, its associated namespace shall be "urn:xmpp:tmp:invisible"; upon advancement of this specification, the XMPP Registrar [15] shall issue a permanent namespace in accordance with the process defined in Section 4 of XMPP Registrar Function [16]. The namespace "urn:xmpp:invisible" is requested, and is thought to be unique.
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:xmpp:tmp:invisible' xmlns='urn:xmpp:tmp:invisible' elementFormDefault='qualified'> <xs:element name='invisible' type='empty'/> <xs:element name='visible' type='empty'/> <xs:simpleType name='empty'> <xs:restriction base='xs:string'> <xs:enumeration value=''/> </xs:restriction> </xs:simpleType> </xs:schema>
1. XEP-0018: Invisible Presence <http://www.xmpp.org/extensions/xep-0018.html>.
2. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc3920>.
3. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc3921>.
4. XEP-0126: Invisibility <http://www.xmpp.org/extensions/xep-0126.html>.
5. XEP-0016: Server-Based Privacy Rules <http://www.xmpp.org/extensions/xep-0016.html>.
6. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.
7. XEP-0086: Error Condition Mappings <http://www.xmpp.org/extensions/xep-0086.html>.
8. XEP-0016: Server-Based Privacy Rules <http://www.xmpp.org/extensions/xep-0016.html>.
9. XEP-0085: Chat State Notifications <http://www.xmpp.org/extensions/xep-0085.html>.
10. XEP-0012: Last Activity <http://www.xmpp.org/extensions/xep-0012.html>.
11. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.
12. XEP-0090: Entity Time <http://www.xmpp.org/extensions/xep-0090.html>.
13. XEP-0092: Software Version <http://www.xmpp.org/extensions/xep-0092.html>.
14. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
15. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://www.xmpp.org/registrar/>.
16. XEP-0053: XMPP Registrar Function <http://www.xmpp.org/extensions/xep-0053.html>.
Added note about integration with privacy lists; removed XEP-0126 from list of protocols that this specification supersedes; changed temporary namespace to conform to XMPP Registrar procedures; copied several security considerations from XEP-0126.
(psa)Clarified that this specification is intended to supersede XEP-0018 and XEP-0126; added several additional examples.
(psa)Modified XML namespace name to conform to XEP-0053 processes.
(psa)Added XMPP Registrar considerations and XML schema.
(psa)Added inbound presence rule to server handling section.
(psa)Clarified that invisibility mode does not carry across sessions.
(psa)Initial version.
(psa)Recommended delivery of messages sent to bare JID.
(psa)First draft.
(psa)END