Abstract: | This document specifies an XMPP protocol extension for user invisibility. |
Author: | Peter Saint-Andre |
Copyright: | © 1999 – 2017 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Proposed |
Type: | Standards Track |
Version: | 0.13 |
Last Updated: | 2017-11-29 |
NOTICE: This document is currently within Last Call or under consideration by the XMPP Council for advancement to the next stage in the XSF standards process. The Last Call ends on 2017-12-12. Please send your feedback to the standards@xmpp.org discussion list.
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. Interoperability Considerations
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 offline to other users. This "invisibility" feature was previously defined in nonstandard or complicated ways via Invisible Presence (XEP-0018) [1] and Invisibility (XEP-0126) [2] (the latter was a profile of Privacy Lists (XEP-0016) [3], which is now deprected). By contrast, this specification defines a standards-compliant protocol extension that can be used over the long term, using an IQ-based protocol that enables an IM user to become "invisible" and "visible" at will within the context of a given session.
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:1' namespace (see Namespace Versioning regarding the possibility of incrementing the version number).
The <invisible/> element SHOULD include a 'probe' attribute, which specifies whether the server shall or shall not send presence probes to entities in the user's roster (thus determining whether the user does or does not automatically receive presence notifications from contacts). This attribute is a boolean [4], where a logical value of TRUE (lexical value of "true" or "1") indicates that the server shall send presence probes and where a logical value of FALSE (lexical value of "false" or "0") indicates that the server shall not send presence probes. The default logical value is FALSE.
<iq from='bilbo@tolkien.example/shire' id='d1s4pp34r1' type='set'> <invisible probe='true' xmlns='urn:xmpp:invisible:1'/> </iq>
Although the default value is false (thus protecting the user from leaking presence information), the client SHOULD always include the 'probe' attribute.
<iq from='bilbo@tolkien.example/shire' id='d1s4pp34r2' type='set'> <invisible probe='false' xmlns='urn:xmpp:invisible:1'/> </iq>
If the server can successfully process the invisible command, it MUST return an IQ-result.
<iq to='bilbo@tolkien.example/shire' id='d1s4pp34r2' type='result'/>
(Standard XMPP stanza errors apply; see RFC 6120.)
When the client enters invisible mode during a presence session (i.e., after having previously sent undirected available presence with no 'type' attribute), the server MUST send <presence type='unavailable'/> from the specified resource to all contacts who would receive unavailable presence if the client itself were to send <presence type='unavailable'/>.
The following sections define server and 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 generate or not generate outbound presence probes in accordance with the value of the 'probe' attribute.
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:1' namespace (see Namespace Versioning regarding the possibility of incrementing the version number).
<iq from='bilbo@tolkien.example/shire' id='r34pp34r' type='set'> <visible xmlns='urn:xmpp:invisible:1'/> </iq>
If the server can successfully process the visibility command, it MUST return an IQ-result.
<iq to='bilbo@tolkien.example/shire' id='r34pp34r' 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 all contacts in the roster, 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, whether or not they are in the user's roster).
In order for a client to discover whether its server supports the invisible command, it sends a Service Discovery (XEP-0030) [6] information request to the server:
<iq from='bilbo@tolkien.example/shire' id='d1sc0v3ry' to='tolkien.example' 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:1" (see Namespace Versioning regarding the possibility of incrementing the version number).
<iq from='tolkien.example' id='d1sc0v3ry' to='bilbo@tolkien.example/shire' type='result'> <query xmlns='http://jabber.org/protocol/disco#info'> <feature var='urn:xmpp:invisible:1'/> </query> </iq>
A client SHOULD complete this service discovery process before sending initial presence to its server (as specified in Entity Capabilities (XEP-0115) [7], a server can include entity capabilities information in a stream feature, which obviates the need for explicit service discovery as shown above).
Implementers need to be aware that use of the 'probe' attribute is not consistent with the older privacy lists approach defined in XEP-0126.
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 necessarily prevent presence leaks, 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 <https://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:1' xmlns='urn:xmpp:invisible:1' elementFormDefault='qualified'> <xs:element name='invisible'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='probe' type='xs:boolean' use='optional' default='false'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <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, Evgeny Khramtsov, Ruslan Marchenko, Kevin Smith, and Matthew Wild for their feedback.
Series: XEP
Number: 0186
Publisher: XMPP Standards Foundation
Status:
Proposed
Type:
Standards Track
Version: 0.13
Last Updated: 2017-11-29
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:
xsf@stpeter.im
JabberID:
peter@jabber.org
URI:
http://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 <https://xmpp.org/extensions/xep-0018.html>.
2. XEP-0126: Invisibility <https://xmpp.org/extensions/xep-0126.html>.
3. XEP-0016: Privacy Lists <https://xmpp.org/extensions/xep-0016.html>.
4. In accordance with Section 3.2.2.1 of XML Schema Part 2: Datatypes, the allowable lexical representations for the xs:boolean datatype are the strings "0" and "false" for the concept 'false' and the strings "1" and "true" for the concept 'true'; implementations MUST support both styles of lexical representation.
5. XEP-0012: Last Activity <https://xmpp.org/extensions/xep-0012.html>.
6. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.
7. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.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 <https://xmpp.org/registrar/>.
10. XEP-0053: XMPP Registrar Function <https://xmpp.org/extensions/xep-0053.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Addressed Last Call feedback: (1) clarified conformance requirements for 'probe' attribute and (2) removed text about using the same server backend for privacy lists because XEP-0016 is now deprecated.
(psa)Added method for specifying server behavior regarding presence probes via new 'probe' attribute; incremented the protocol version number from 0 to 1.
(psa)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