JEP-0186: Invisible Command

This document specifies an XMPP-compatible protocol for user invisibility.


WARNING: This Standards-Track JEP is Experimental. Publication as a Jabber Enhancement Proposal does not imply approval of this proposal by the Jabber Software 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.


JEP Information

Status: Experimental
Type: Standards Track
Number: 0186
Version: 0.2
Last Updated: 2006-07-07
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: None
Supersedes: None
Superseded By: None
Short Name: invisibility
Wiki Page: <http://wiki.jabber.org/index.php/Invisible Command (JEP-0186)>

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2006 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

Discussion Venue

The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software 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 JEP 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.

Conformance Terms

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".


Table of Contents

1. Introduction
2. Requirements
3. Use Cases
3.1. Discovering Support
3.2. User Becomes Invisible
3.3. User Becomes Visible
4. Security Considerations
5. IANA Considerations
6. Jabber Registrar Considerations
Notes
Revision History


1. Introduction

Jabber instant messaging technologies have long supported the ability for IM users to be online but appear invisible. The existing protocols for doing so are:

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 "go invisible" and "go visible" at will within the context of a given session.

2. Requirements

The requirements for invisible mode are straightforward:

  1. A user should be able to become visible or invisible at any time within an XMPP session.
  2. Invisible mode is active only for the current session; if the user ends that session and starts another session, the invisibility mode set for the previous session does not carry over to the new session.
  3. When in invisible mode, a user should be able to send directed presence to particular contacts.

3. Use Cases

3.1 Discovering Support

In order for a client to discover whether its server supports the protocol defined herein, it MUST send a Service Discovery [5] information request to the server:

Example 1. Service discovery request

<iq from='bilbo@tolkien.lit/shire' to='tolkien.lit' type='get' id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
    

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

Example 2. Service discovery response

<iq from='bilbo@tolkien.lit/shire' to='tolkien.lit' type='get' id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    ...
    <feature var='http://jabber.org/protocol/invisibility'/>
    ...
  </query>
</iq>
    

A client SHOULD complete this service discovery process before sending initial presence to its server.

3.2 User Becomes Invisible

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 'http://jabber.org/protocol/invisibility' namespace:

Example 3. Invisible command

<iq type='set' id='inv1'>
  <invisible xmlns='http://jabber.org/protocol/invisibility'/>
</iq>
    

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

Example 4. Invisible command is successful

<iq type='result' id='inv1'/>
    

(Standard XMPP stanza errors apply; see RFC 3920 and Error Condition Mappings [6].)

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 client's 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:

  1. MUST NOT broadcast presence notifications as a result of receiving any subsequent undirected presence notifications from the client.

  2. MUST deliver any directed presence stanzas generated by the client. [7]

  3. MUST deliver any outbound <message/> and <iq/> stanzas generated by the client.

  4. MUST deliver any inbound <message/> and <iq/> stanzas whose 'to' address is the resource of the client. [8]

  5. SHOULD deliver inbound <message/> stanzas whose 'to' address is the bare JID of the user (subject to standard XMPP stanza handling rules).

3.3 User Becomes Visible

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 'http://jabber.org/protocol/invisibility' namespace:

Example 5. Visible command

<iq type='set' id='vis1'>
  <visible xmlns='http://jabber.org/protocol/invisibility'/>
</iq>
    

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

Example 6. Visible command is successful

<iq type='result' id='vis1'/>
    

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, which the server MUST broadcast 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).

4. Security Considerations

It is possible to leak presence while in invisible mode (for example, by sending a message to a contact). A client SHOULD warn a user before allowing the user to generate any outbound traffic and MUST NOT respond to IQ requests received from entities with which it has not initiated communications while in invisible mode (e.g., by sending directed presence).

5. IANA Considerations

No interaction with the Internet Assigned Numbers Authority (IANA) [9] is required as a result of this JEP.

6. Jabber Registrar Considerations

No namespaces or parameters need to be registered with the Jabber Registrar [10] as a result of this JEP.


Notes

1. JEP-0018: Invisible Presence <http://www.jabber.org/jeps/jep-0018.html>.

2. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://www.ietf.org/rfc/rfc3920.txt>.

3. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://www.ietf.org/rfc/rfc3921.txt>.

4. JEP-0126: Invisibility <http://www.jabber.org/jeps/jep-0126.html>.

5. JEP-0030: Service Discovery <http://www.jabber.org/jeps/jep-0030.html>.

6. JEP-0086: Error Condition Mappings <http://www.jabber.org/jeps/jep-0086.html>.

7. 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.

8. If a client responds to such messages or IQs, it may leak presence. A client SHOULD warn the user before allowing the user to respond to such messages and MUST NOT automatically respond to IQs unless the user is in an existing conversation with the sender, has sent IQs to the sender, or has sent directed presence to the sender.

9. 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/>.

10. The Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.


Revision History

Version 0.2 (2006-07-07)

Clarified that invisibility mode does not carry across sessions.

(psa)

Version 0.1 (2006-05-30)

Initial JEP version.

(psa)

Version 0.0.2 (2006-05-15)

Recommended delivery of messages sent to bare JID.

(psa)

Version 0.0.1 (2006-05-11)

First draft.

(psa)


END