XEP-0402: Bookmarks 2 (This Time it's Serious)

Abstract:This specification defines a syntax and storage profile for keeping a list of chatroom bookmarks on the server.
Authors:Dave Cridland, Jan-Carel Brand
Copyright:© 1999 – 2017 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:Experimental
Type:Standards Track
Version:0.1.0
Last Updated:2018-03-28

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 are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.


Table of Contents


1. Introduction
2. Outline of use
3. Bookmark Notifications
4. Implementation Notes
    4.1. Differences to XEP-0048
    4.2. Compatibility
       4.2.1. Publishing via this specification
       4.2.2. Publishing via the old specification
5. Determining Support
6. Acknowledgements
7. Security Considerations

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


1. Introduction

The original Bookmarks specification (Bookmark Storage (XEP-0048) [1]) used the widely available Private XML Storage (Private XML Storage (XEP-0049) [2]), but stored all bookmarks in a single element. When the specification was moved to the Standards Track and Draft, it was also updated to use the user's Pubsub service (Best Practices for Persistent Storage of Private Data via Publish-Subscribe (XEP-0223) [3]), but kept this single element containing all bookmarks inside a single Pubsub item.

Most implementations have kept to the original, Private XML Storage based solution, and while some newer implementations have used Pubsub, these are limited in capability by the use of a single item.

This specification resolves both issues by providing a new Bookmarks specification to migrate to, and takes the opportunity to update the XML namespace in use as well. The URL storage is dropped, since it is rarely used. Storage of URL bookmarks is therefore out of scope.

2. Outline of use

Clients store each bookmarked chatroom as a Pubsub item within the 'urn:xmpp:bookmarks:0' node. Each item SHALL have, as item id, the Room JID of the chatroom (eg, coven@chat.shakespeare.lit).

The payload of the item SHALL be a conference element qualified by the 'urn:xmpp:bookmarks:0' namespace, with the following syntax:

Table 1: Syntax of conference element

Element or Attribute Definition Datatype Inclusion
'autojoin' attribute Whether the client should automatically join the conference room on login. boolean defaulting to false [4] OPTIONAL
'name' attribute A friendly name for the bookmark. string RECOMMENDED
<nick/> element The user's preferred roomnick for the chatroom. string OPTIONAL
<password/> element Unencrypted string for the password needed to enter a password-protected room. For security reasons, use of this element is NOT RECOMMENDED. string NOT RECOMMENDED

Note: The datatypes are as defined in XML Schema Part 2 [5].

Example 1. An example of the conference element

      <conference xmlns='urn:xmpp:bookmarks:0'
                  name='Council of Oberon'
                  autojoin='true'>
        <nick>Puck</nick>
      </conference>

This bookmark would be displayed as 'Council of Oberon' and, if activated, would attempt to join the conference room 'council@conference.underhill.org' with nickname 'Puck'.

Note that a bookmark item MUST contain only one conference room.

Note also that a conference element has no truly mandatory attributes or child elements, though a name SHOULD be given. Thus the following is legal:

Example 2. Minimalist conference element

      <conference xmlns='urn:xmpp:bookmarks:0'/>

3. Bookmark Notifications

When a client is sent an event from the Pubsub service for the 'urn:xmpp:bookmarks:0' node, it MUST check the 'autojoin' attribute if present, and join the room immediately if the attribute is both present and true.

4. Implementation Notes

4.1 Differences to XEP-0048

4.2 Compatibility

A server MAY choose to unify the bookmarks from both Private XML Storage (XEP-0049) [2] based and the current Bookmark Storage (XEP-0048) [1].

4.2.1 Publishing via this specification

When a client publishes a new item, the server MAY collate all items, casting them into the 'storage:bookmarks' namespace and setting the jid attribute to the item id in each case. When contained within a storage element qualified by the 'storage:bookmarks' namespace, this will be the correct format for both current and previous variants of Bookmark Storage (XEP-0048) [1]

4.2.2 Publishing via the old specification

If a client publishes a replacement list of bookmarks via the older specifications, a server MAY examine the list and update the individual items as required, sending updates or retraction notifications as needed. Servers electing to perform this OPTIONAL behaviour SHOULD NOT send notifications for unchanged items.

5. Determining Support

This specification relies fully on a number of others. Most particularly, support for this protocol is available if Best Practices for Persistent Storage of Private Data via Publish-Subscribe (XEP-0223) [3] is supported.

6. Acknowledgements

The authors would like to note that much of the syntax description was copied exactly from Bookmark Storage (XEP-0048) [1] by Rachel Blackman, Peter Millard, and Peter Saint-Andre. Much of the remainder of this specification is based closely on their work.

7. Security Considerations

The password child element of conference is well known to provide only very weak levels of security; storing it in bookmarks lowers this security still further.


Appendices


Appendix A: Document Information

Series: XEP
Number: 0402
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.1.0
Last Updated: 2018-03-28
Approving Body: XMPP Council
Dependencies: None
Supersedes: None
Superseded By: None
Short Name: bookmarks2
Registry: <http://xmpp.org/registrar/bookmarks2.html>
Source Control: HTML
This document in other formats: XML  PDF


Appendix B: Author Information

Dave Cridland

Email: dave.cridland@surevine.com
JabberID: dave.cridland@surevine.com

Jan-Carel Brand

Email: jc@opkode.com
JabberID: jc@opkode.com


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2018 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Appendix D: Relation to XMPP

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.


Appendix E: Discussion Venue

There exists a special venue for discussion related to the technology described in this document: the <standards@xmpp.org> mailing list.

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


Appendix F: Requirements Conformance

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


Appendix G: Notes

1. XEP-0048: Bookmark Storage <https://xmpp.org/extensions/xep-0048.html>.

2. XEP-0049: Private XML Storage <https://xmpp.org/extensions/xep-0049.html>.

3. XEP-0223: Best Practices for Persistent Storage of Private Data via Publish-Subscribe <https://xmpp.org/extensions/xep-0223.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. XML Schema Part 2: Datatypes <http://www.w3.org/TR/xmlschema11-2/>.


Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

Version 0.1.0 (2018-03-28)

Accepted by vote of Council on 2018-03-21. (XEP Editor (jwi))

Version 0.0.1 (2018-03-17)

First draft

(dwd/jcb)

END