Internet Engineering Task Force SIMPLE WG Internet Draft J. Rosenberg dynamicsoft draft-ietf-simple-winfo-format-02.txt May 20, 2002 Expires: October 2002 An Extensible Markup Language (XML) Based Format for Watcher Information STATUS OF THIS MEMO This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress". The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt To view the list Internet-Draft Shadow Directories, see http://www.ietf.org/shadow.html. Abstract Watchers are defined as entities that request (i.e., subscribe to) information about a resource. There is fairly complex state associated with these subscriptions. The union of the state for all subscriptions to a particular resource is called the watcher information for that resource. This state is dynamic, changing as subscribers come and go. As a result, it is possible, and indeed useful, to subscribe to the watcher information for a particular resource. In order to enable this, a format is needed to describe the state of watchers on a resource. This specification describes an XML document format for such state. J. Rosenberg et. al. [Page 1] Internet Draft Watcher Info May 20, 2002 Table of Contents 1 Introduction ........................................ 3 2 Terminology ......................................... 3 3 Structure of Watcher Information .................... 3 4 Computing Watcher Lists from the Document ........... 5 5 Example ............................................. 6 6 XML Schema .......................................... 7 7 Security Considerations ............................. 9 8 IANA Considerations ................................. 9 8.1 application/watcherinfo+xml MIME Registration ....... 9 8.2 URN Sub-Namespace Registration for urn:ietf:params:xml:ns:watcherinfo ............................. 10 9 Contributors ........................................ 10 10 Acknowledgements .................................... 12 11 Authors Addresses ................................... 12 12 Normative References ................................ 12 13 Informative References .............................. 13 J. Rosenberg et. al. [Page 2] Internet Draft Watcher Info May 20, 2002 1 Introduction Watchers are defined as entities that request (i.e., subscribe to) information about a resource, using the SIP Events framework [1]. There is fairly complex state associated with these subscriptions. This state includes the identity of the subscriber, the state of the subscription, and so on. The union of the state for all subscriptions to a particular resource is called the watcher information for that resource. This state is dynamic, changing as subscribers come and go. As a result, it is possible, and indeed useful, to subscribe to the watcher information for a particular resource. An important application of this is the ability of a user to find out the set of subscribers to their presentity [11]. This would allow the user to provide an authorization decision for the subscription. To support subscriptions to watcher information, two components are needed. The first is the definition of a SIP Events package for watcher information. The other is the definition of a data format to represent watcher information. The former is specified in [2], and the latter is specified here. 2 Terminology In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in RFC 2119 [3] and indicate requirement levels for compliant implementations. This document also uses the terms subscriber, watcher, subscription, notification, watcherinfo subscription, watcherinfo subscriber, and watcherinfo notification with the meanings described in [2]. 3 Structure of Watcher Information Watcher information is an XML document [4] that MUST be well-formed and SHOULD be valid. Watcher information documents MUST be based on XML 1.0 and MUST be encoded using UTF-8. This specification makes use of XML namespaces for identifying watcherinfo documents and document fragments. The namespace URI for elements defined by this specification is a URN [5], using the namespace identifier 'ietf' defined by [6] and extended by [7]. This URN is: urn:ietf:params:xml:ns:watcherinfo A watcher information document begins with the root element tag J. Rosenberg et. al. [Page 3] Internet Draft Watcher Info May 20, 2002 "watcherinfo". It consists of any number of "watcher-list" sub- elements, each of which is a list of watchers for a particular resource. Other elements from different namespaces MAY be present for the purposes of extensibility; elements or attributes from unknown namespaces MUST be ignored. There are two attributes associated with this element, both of which MUST be present: version: This attribute allows the recipient of watcherinfo documents to properly order them. Versions start at 0, and increment by one for each new document sent to a subscriber. Versions are scoped within a subscription. Versions MUST be representable using a 32 bit integer. state: This attribute indicates whether the document contains the full watcherinfo state, or whether it contains only information on those watchers which have changed since the previous document (partial). Each "watcher-list" element contains the set of watchers on a particular resource. Other elements from different namespaces MAY be present for the purposes of extensibility; elements or attributes from unknown namespaces MUST be ignored. There are two attributes associated with this element, both of which MUST be present: resource: This attribute contains a URI for the resource being watched by that list of watchers. It is mandatory. package: This attribute contains a string indicating the event package for which watcher information on that resource is being provided. It is mandatory. The "watcher" element describes a watcher in the watcher list. The value of the "watcher" element is a URI for the watcher. This URI SHOULD be an address-of-record (for example, sip:joe@example.com) as opposed to a device address (for example, sip:joe@192.0.2.3). There are three mandatory attributes which MUST be present: id: A unique identifier for the subscription described by the watcher element. The id MUST be representable using the grammar for token as specified by SIP [8]. It MUST be unique across all other watchers reported in documents sent in notifications for a particular watcherinfo subscription. status: The status of the subscription. The meaning of the various statuses are defined in the watcher information event package [2]. event: The event which caused the transition to the current J. Rosenberg et. al. [Page 4] Internet Draft Watcher Info May 20, 2002 status. The events are defined in the watcher information event package [2]. There are also some optional, informative attributes of the watcher element. These are: display-name: A textual representation of the name of the subscriber. expiration: The amount of time, in seconds from the current time, that the subscription will expire. duration-subscribed: The amount of time, expressed in seconds, between the time the SUBSCRIBE which created the subscription was received, and the current time. The xml:lang attribute MAY be used with the "watcher" element to specify the language of the "display-name". The number of watchers present for each resource, and the set of resources listed, depends on the type of data being provided, and to whom. For example, consider a presence system using watcher information. In one scenario, a user, A, subscribes to the presence of another user, B. A would like to find out about the status of their subscription. To do so, A subscribes to the watcher information for B's presence. A does not have authorization to learn the status of all watchers for B's presence. As a result, the watcher information sent to A will contain only one watcher - A themself. In another scenario, a user B, wishes to learn the set of people who have subscribed to B's presence. To do this, B subscribes to the watcher information for B's presence. Here, B is authorized to see all the watchers of B's presence. As a result, the watcher information sent to B will contain all watchers of B's presence. In the case where an administrator wishes to learn the current status in the system, the watcher information could contain all watchers for all resources. 4 Computing Watcher Lists from the Document Typically, the NOTIFY for watcherinfo will only contain information about those watchers whose state has changed. To construct a coherent view of the total state of all watchers, a watcherinfo subscriber will need to combine NOTIFYs received over time. The watcherinfo subscriber maintains a table for each watcher list it receives J. Rosenberg et. al. [Page 5] Internet Draft Watcher Info May 20, 2002 information for. Each watcher list is uniquely identified by the URI in the "resource" attribute of the "watcher-list" element. Each table contains a row for each watcher in that watcher list. Each row is indexed by the unique ID for that watcher. It is conveyed in the "id" attribute of the "watcher" element. The contents of each row contain the state of that watcher as conveyed in the "watcher" element. The tables are also associated with a version number. The version number MUST be initialized with the value of the "version" attribute from the "watcherinfo" element in the first document received. Each time a new document is received, the value of the local version number, and the "version" attribute in the new document, are compared. If the value in the new document is one higher than the local version number, the local version number is increased by one, and the document is processed. If the value in the document is more than one higher than the local version number, the local version number is set to the value in the new document, the document is processed, and the watcherinfo subscriber SHOULD generate a refresh request to trigger a full state notification. If the value in the document is less than the local version, the document is discarded without processing. The processing of the watcherinfo document depends on whether it contains full or partial state. If it contains full state, indicated by the value of the "state" attribute in the "watcherinfo" element, the contents of all tables associated with this watcherinfo subscription are flushed. They are repopulated from the document. A new table is created for each "watcher-list" element, and a new row in each table is created for each "watcher" element. If the watcherinfo contains partial state, as indicated by the value of the "state" attribute in the "watcherinfo" element, the document is used to update the existing tables. For each "watcher-list" element, the watcherinfo subscriber checks to see if a table exists for that list. This check is done by comparing the URI in the "resource" attribute of the "watcher-list" element with the URI associated with the table. If a table doesn't exist for that list, one is created. For each "watcher" element in the list, the watcherinfo subscriber checks to see whether a row exists for that watcher. This check is done by comparing the ID in the "id" attribute of the "watcher" element with the ID associated with the row. If the watcher doesn't exist in the table, a row is added, and its state is set to the information from that "watcher" element. If the watcher does exist, its state is updated to be the information from that "watcher" element. If a row is updated or created, such that its state is now terminated, that entry MAY be removed from the table at any time. 5 Example The following is an example of watcher information for a presentity, who is a professor. There are two watchers, one from a university, J. Rosenberg et. al. [Page 6] Internet Draft Watcher Info May 20, 2002 and another from an organization. sip:subcriber@university.edu sip:subcriber@organization.org 6 XML Schema The following is the schema definition of the watcherinfo document format: J. Rosenberg et. al. [Page 7] Internet Draft Watcher Info May 20, 2002 J. Rosenberg et. al. [Page 8] Internet Draft Watcher Info May 20, 2002 7 Security Considerations Watcher information is sensitive information. The protocol used to distribute it SHOULD ensure privacy, message integrity and authentication. Furthermore, the protcol should provide access controls which restrict who can see who elses watcher information. 8 IANA Considerations This document registers a new MIME type, application/watcherinfo+xml, and registers a new XML namespace. 8.1 application/watcherinfo+xml MIME Registration MIME media type name: application MIME subtype name: watcherinfo+xml Mandatory parameters: none Optional parameters: Same as charset parameter application/xml as specified in RFC 3023 [9]. Encoding considerations: Same as encoding considerations of application/xml as specified in RFC 3023 [9]. Security considerations: See Section 10 of RFC 3023 [9] and Section 7 of this specification. Interoperability considerations: none. Published specification: This document. Applications which use this media type: This document type has been used to support subscriber authorization functions for SIP-based presence [10] [2]. Additional Information: Magic Number: None J. Rosenberg et. al. [Page 9] Internet Draft Watcher Info May 20, 2002 File Extension: .wif or .xml Macintosh file type code: "TEXT" Personal and email address for further information: Jonathan Rosenberg, Intended usage: COMMON Author/Change controller: The IETF. 8.2 URN Sub-Namespace Registration for urn:ietf:params:xml:ns:watcherinfo This section registers a new XML namespace, as per the guidelines in [7]. URI: The URI for this namespace is urn:ietf:params:xml:ns:cpim- pidf. Registrant Contact: IETF, SIMPLE working group, , Jonathan Rosenberg . XML: BEGIN Watcher Information Namespace

Namespace for Watcher Information

application/watcherinfo+xml

See RFCXXXX.

END 9 Contributors J. Rosenberg et. al. [Page 10] Internet Draft Watcher Info May 20, 2002 The following people were part of the original design team that developed the first version of this specification: Dean Willis dynamicsoft 5100 Tennyson Parkway, Suite 1200 Plano, Texas 75024 email: dwillis@dynamicsoft.com Robert Sparks dynamicsoft 5100 Tennyson Parkway, Suite 1200 Plano, Texas 75024 email: rsparks@dynamicsoft.com Ben Campbell dynamicsoft 5100 Tennyson Parkway, Suite 1200 Plano, Texas 75024 email: bcampbell@dynamicsoft.com Henning Schulzrinne Columbia University M/S 0401 1214 Amsterdam Ave. New York, NY 10027-7003 email: schulzrinne@cs.columbia.edu Jonathan Lennox Columbia University M/S 0401 1214 Amsterdam Ave. New York, NY 10027-7003 email: lennox@cs.columbia.edu Christian Huitema Microsoft Corporation One Microsoft Way Redmond, WA 98052-6399 email: huitema@microsoft.com Bernard Aboba Microsoft Corporation One Microsoft Way Redmond, WA 98052-6399 email: bernarda@microsoft.com J. Rosenberg et. al. [Page 11] Internet Draft Watcher Info May 20, 2002 David Gurle Microsoft Corporation One Microsoft Way Redmond, WA 98052-6399 email: dgurle@microsoft.com Jonathan Lennox contributed the text for the DTD and its usage that were part of earlier versions of this specification. 10 Acknowledgements The authors would like to thank Sean Olson, Steve Donovan, and Cullen Jennings for their detailed comments and assistance with the XML schema. 11 Authors Addresses Jonathan Rosenberg dynamicsoft 72 Eagle Rock Avenue East Hanover, NJ 07936 email: jdrosen@dynamicsoft.com 12 Normative References [1] A. Roach, "SIP-specific event notification," Internet Draft, Internet Engineering Task Force, Mar. 2002. Work in progress. [2] J. Rosenberg, "A SIP event sub-package for watcher information," Internet Draft, Internet Engineering Task Force, Mar. 2002. Work in progress. [3] S. Bradner, "Key words for use in RFCs to indicate requirement levels," RFC 2119, Internet Engineering Task Force, Mar. 1997. [4] W. W. W. C. (W3C), "Extensible markup language (xml) 1.0." The XML 1.0 spec can be found at http://www.w3.org/TR/1998/REC-xml- 19980210. [5] R. Moats, "URN syntax," RFC 2141, Internet Engineering Task Force, May 1997. J. Rosenberg et. al. [Page 12] Internet Draft Watcher Info May 20, 2002 [6] R. Moats, "A URN namespace for IETF documents," RFC 2648, Internet Engineering Task Force, Aug. 1999. [7] M. Mealling, "The IANA XML registry," Internet Draft, Internet Engineering Task Force, Nov. 2001. Work in progress. [8] J. Rosenberg, H. Schulzrinne, et al. , "SIP: Session initiation protocol," Internet Draft, Internet Engineering Task Force, Feb. 2002. Work in progress. [9] M. Murata, S. S. Laurent, and D. Kohn, "XML media types," RFC 3023, Internet Engineering Task Force, Jan. 2001. [10] J. Rosenberg et al. , "Session initiation protocol (SIP) extensions for presence," Internet Draft, Internet Engineering Task Force, Apr. 2002. Work in progress. 13 Informative References [11] M. Day, J. Rosenberg, and H. Sugano, "A model for presence and instant messaging," RFC 2778, Internet Engineering Task Force, Feb. 2000. Full Copyright Statement Copyright (c) The Internet Society (2002). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING J. Rosenberg et. al. [Page 13] Internet Draft Watcher Info May 20, 2002 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. J. Rosenberg et. al. [Page 14]