Abstract: | This document specifies an XMPP-compatible protocol for user invisibility. |
Author: | Peter Saint-Andre |
Copyright: | © 1999 – 2017 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Deferred |
Type: | Standards Track |
Version: | 0.11 |
Last Updated: | 2012-06-27 |
WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
1. Introduction
2. Requirements
3. Use Cases
3.1. User Becomes Invisible
3.1.1. Server Handling
3.1.2. Client Handling
3.2. User Becomes Visible
4. Discovering Support
5. Integration With Privacy Lists
6. Security Considerations
7. IANA Considerations
8. XMPP Registrar Considerations
8.1. Protocol Namespaces
8.2. Protocol Versioning
9. XML Schema
10. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Some XMPP-based instant messaging systems have long supported the ability for users to be online but to appear invisible. The existing protocols for doing so are:
Invisible Presence (XEP-0018) [1] -- this protocol is not compatible with XMPP Core [2] and XMPP IM [3] (also, the specification 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 (XEP-0126) [4] -- this protocol is a somewhat complicated use of Privacy Lists (XEP-0016) [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 to provide a more client-friendly approach to invisibility than XEP-0126.
The requirements for invisible mode are straightforward:
In order for a client to go invisible, it sends an IQ-set with no 'to' address (thus handled by the user's server) containing an <invisible/> element qualified by the 'urn:xmpp:invisible:0' namespace (see Namespace Versioning regarding the possibility of incrementing the version number).
<iq from='bilbo@tolkien.lit/shire' id='inv1' type='set'> <invisible xmlns='urn:xmpp:invisible:0'/> </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 6120.)
When the client enters invisible mode in the midst of a presence session (i.e., after having previously sent undirected available presence with no 'type' attribute), 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'/>.
The following sections define how the server and the client handling of inbound and outbound XML stanzas while the client is invisible.
While the client is in invisible mode, the server:
MUST NOT broadcast outbound presence notifications as a result of receiving any subsequent undirected presence notifications from the client.
MUST deliver outbound 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 from RFC 6120 and RFC 6121).
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 there are no other available resources, MUST respond to all IQ-get requests and presence probes sent to the account's bare JID as if the account were offline; this includes but is not limited to the following:
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.
While the client is in invisible mode, it is suggested that the client behave as follows:
Maintain a temporary list of entities with which communication is allowed and prompt the user before adding any entity to that "communicants list" for this invisibility session; for user convenience, this list might be auto-populated with trusted entities if so configured by the user.
Prompt the user before sending any outbound traffic (message, presence, or IQ stanza) to another user, even if the user generated such traffic; upon receiving authorization from the user, the client might then add the authorized entity to the communicants list for this invisibility session.
In order for a client to become visible again, it sends an IQ-set with no 'to' address (thus handled by the user's server) containing a <visible/> element qualified by the 'urn:xmpp:invisible:0' namespace (see Namespace Versioning regarding the possibility of incrementing the version number).
<iq from='bilbo@tolkien.lit/shire' id='vis1' type='set'> <visible xmlns='urn:xmpp:invisible:0'/> </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, with one exception: if the client sent directed presence to any entities while in the invisible state, the server MUST treat those entities as under point 2 of Section 4.6.3 of RFC 6121 (i.e., the server MUST ensure that it sends unavailable presence to those entities if the client subsequently goes offline after becoming visible).
If the user wishes to then send presence to contacts, it is the responsibility of the client to send an undirected available presence notification to the server.
<presence/>
The server would then broadcast that presence notification to all entities who would normally receive presence broadcasts from the client (the server MAY also send that notification to any entities to which the client sent directed presence while invisible).
In order for a client to discover whether its server supports the invisible command, it sends a Service Discovery (XEP-0030) [7] 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 invisible command, it MUST return a feature of "urn:xmpp:invisible:0" (see Namespace Versioning regarding the possibility of incrementing the version number).
<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:invisible:0'/> </query> </iq>
A client SHOULD complete this service discovery process before sending initial presence to its server.
A server MAY use the same backend data store for this invisibility mode as for Privacy Lists (XEP-0016) [5] when 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.
No matter how it is implemented, invisibility can be defeated and presence leaks can occur without careful stanza handling on the part of the server and the client. Use of the protocol defined here does not guarantee that presence leaks will not occur, either technically or socially (e.g., if the user reveals his presence to one contact but not another and those contacts are in communication).
No interaction with the Internet Assigned Numbers Authority (IANA) [8] is required as a result of this document.
This specification defines the following XML namespace:
Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar [9] shall add the foregoing namespace to the registry located at <http://xmpp.org/registrar/namespaces.html>, as described in Section 4 of XMPP Registrar Function (XEP-0053) [10].
If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:xmpp:invisible:0' xmlns='urn:xmpp:invisible:0' 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>
Thanks to Philipp Hancke, Kevin Smith, and Matthew Wild for their feedback.
Series: XEP
Number: 0186
Publisher: XMPP Standards Foundation
Status:
Deferred
Type:
Standards Track
Version: 0.11
Last Updated: 2012-06-27
Approving Body: XMPP Council
Dependencies: XMPP Core, XMPP IM, XEP-0030
Supersedes: XEP-0018
Superseded By: None
Short Name: invisible
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
peter@andyet.net
JabberID:
stpeter@stpeter.im
URI:
https://stpeter.im/
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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 primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements 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. XEP-0018: Invisible Presence <http://xmpp.org/extensions/xep-0018.html>.
2. RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc6120>.
3. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.
4. XEP-0126: Invisibility <http://xmpp.org/extensions/xep-0126.html>.
5. XEP-0016: Privacy Lists <http://xmpp.org/extensions/xep-0016.html>.
6. XEP-0012: Last Activity <http://xmpp.org/extensions/xep-0012.html>.
7. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
8. 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/>.
9. 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://xmpp.org/registrar/>.
10. XEP-0053: XMPP Registrar Function <http://xmpp.org/extensions/xep-0053.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Clarified handling of directed presence while in invisible state.
(psa)Further clarified server and client handling of stanzas during an invisibility session; updated RFC references.
(psa)Further clarified server and client handling of stanzas during an invisibility session.
(psa)Modified namespace to incorporate namespace versioning.
(psa)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