diff --git a/xep-0060.xml b/xep-0060.xml index a5c6a4db..9b3b26db 100644 --- a/xep-0060.xml +++ b/xep-0060.xml @@ -50,8 +50,8 @@ &ralphm; - 1.13rc3 - in progress, 2009-04-20 + 1.13rc4 + in progress, 2009-09-18 psa @@ -145,7 +152,7 @@
  • Harmonized error conditions for unsubscribe if entity is not subscribed (unexpected-request rather than not-found)
  • Further defined error conditions related to item publication
  • Specified structure of <affiliations/>, <delete/>, <purge/>, and <subscriptions/> elements qualified by pubsub#owner namespace
  • -
  • Changed retrieval of default configuration options to use <default/> element, not <configure/> element
  • +
  • Changed retrieval of default node configuration options to use <default/> element, not <configure/> element
  • Allowed caching of last published item
  • Added pubsub#deliver subscription option
  • Added meta-data fields for pubsub#owners and pubsub#contact
  • @@ -313,7 +320,7 @@ 0.3 2003-01-20 pgm -

    Added subscription attribute for entities. Removed subscriber from the affiliations table. Clarified configuration details. Clarified JabberID usages. Added XMPP Registrar Considerations. Added link to XEP-0068 about the FORM_TYPE element in subscription request notifications. Fixed some typos in examples. Added unsupported configuration namespace to example. Added a default configuration example.

    +

    Added subscription attribute for entities. Removed subscriber from the affiliations table. Clarified configuration details. Clarified JabberID usages. Added XMPP Registrar Considerations. Added link to XEP-0068 about the FORM_TYPE element in subscription request notifications. Fixed some typos in examples. Added unsupported configuration namespace to example. Added a default node configuration example.

    0.2 @@ -330,12 +337,12 @@ -

    As Jabber/XMPP technologies have matured, the need for a generic publish-subscribe ("pubsub") mechanism has arisen in a number of domains. These include (but are not limited to): news feeds, content syndication, extended presence, geolocation, avatar management, shared bookmarks, auction and trading systems, workflow systems, network management systems, NNTP gateways, profile management, and any other application that requires event notifications.

    -

    In all of these domains, it is desirable for data communication to follow the classic "publish-subscribe" or "observer" design pattern: a person or application publishes information, and an event notification (with or without payload) is broadcasted to all authorized subscribers. In general, the relationship between the publisher and subscriber is mediated by a service that receives publication requests, broadcasts event notifications to subscribers, and enables privileged entities to manage lists of people or applications that are authorized to publish or subscribe. In most pubsub services, the focal point for publication and subscription is a "topic" or "node" to which publishers send data and from which subscribers receive notifications. Additionally, some nodes may also maintain a history of events and provide other services that supplement the pure pubsub model.

    -

    This document defines a single, cohesive, generic protocol that all forms of pubsub can use. While compliant implementations are not required to implement all of the features defined herein, this document addresses most use cases that may be requested of a pubsub service. (For information about which features are required and which are recommended or optional, consult the Feature Summary.) Other specifications may define "subsets" or "profiles" of publish-subscribe for use in specialized contexts, but such profiles are out of scope for this document.

    +

    The XMPP publish-subscribe extension defined in this document provides a framework for a wide variety of applications, including news feeds, content syndication, extended presence, geolocation, avatar management, shared bookmarks, auction and trading systems, workflow systems, network management systems, NNTP gateways, profile management, and any other application that requires event notifications.

    +

    This technology uses the classic "publish-subscribe" or "observer" design pattern: a person or application publishes information, and an event notification (with or without payload) is broadcasted to all authorized subscribers. In general, the relationship between the publisher and subscriber is mediated by a service that receives publication requests, broadcasts event notifications to subscribers, and enables privileged entities to manage lists of people or applications that are authorized to publish or subscribe. The focal point for publication and subscription is a "node" to which publishers send data and from which subscribers receive notifications. Nodes can also maintain a history of events and provide other services that supplement the pure pubsub model.

    +

    This document defines a generic protocol that all pubsub applications can use. Compliant implementations are not required to implement all of the features defined here (see the Feature Summary.) Other specifications may define "subsets" or "profiles" of publish-subscribe for use in specialized contexts, but such profiles are out of scope for this document.

    -

    This specification is large. However, the basic idea behind pubsub is rather simple (see Publish an Item to a Node):

    +

    Although this specification is large because it defines many side use cases and possible error flows, the basic idea is simple:

    1. An entity publishes information to a node at a publish-subscribe service.
    2. The pubsub service pushes a notification to all entities that are authorized to learn about the published information.
    3. @@ -437,12 +444,13 @@ And by opposing end them?
      ItemID
      A unique identifier for an item in the context of a specific node.
      Leaf Node
      A type of node that contains published items only. It is NOT a container for other nodes.
      Node
      A virtual location to which information can be published and from which event notifications and/or payloads can be received (in other pubsub systems, this may be labelled a "topic").
      -
      NodeID
      The unique identifier for a node within the context of a pubsub service. The NodeID is either supplied by the node creator or generated by the pubsub service (if the node creator requests an Instant Node). The NodeID MAY have semantic meaning, but such meaning is OPTIONAL.
      +
      NodeID
      The unique identifier for a node within the context of a pubsub service. The NodeID is either supplied by the node creator or generated by the pubsub service (if the node creator requests an Instant Node). The NodeID MAY have semantic meaning (e.g., in some systems or in pubsub profiles such as PEP the NodeID might be an XML namespace for the associated payload), but such meaning is OPTIONAL. If a document defines a given NodeID as unique within the realm of XMPP pubsub systems, it MUST specify the XML namespace of the associated payload.
      Notification
      A message sent to a subscriber informing them of an event.
      Outcast
      An entity that is disallowed from subscribing or publishing to a node.
      Owner
      The manager of a node, of which there may be more than one; often but not necessarily the node creator.
      Payload
      The full data associated with an event rather than just the event notification itself.
      Open Access Model
      A node access model under which any entity may subscribe and retrieve items without approval.
      +
      Paylod
      The XML data that is contained within the <item/> element of a publication request or a notification event. A given payload is defined by an XML namespace and associated schema. A document that defines a payload format SHOULD specify whether the payload can be used only for a NodeID whose value is the same as the XML namespace, or whether the payload can be used for any NodeID. Such a document also SHOULD specify whether it is suggested that node at which such payloads are published are best configured as Singleton Nodes.
      Personal Eventing
      A simplified subset of Publish-Subscribe for use in the context of instant messaging and presence applications, whereby each IM user's JID is a virtual pubsub service; for details, see &xep0163;.
      Presence Access Model
      A node access model under which any entity that is subscribed to the owner's presence with a subscription of type "from" or "both" (see &rfc3921;) may subscribe to the node and retrieve items from the node; this access model applies mainly to instant messaging systems.
      Publisher
      An entity that is allowed to publish items to a node.
      @@ -1042,8 +1050,8 @@ And by opposing end them? ]]> -

      An entity may want to query the service to retrieve its affiliations for all nodes at the service. Support for this feature ("retrieve-affiliations") is RECOMMENDED.

      -

      In order to make the request, the requesting entity includes an empty <affiliations/> element with no attributes.

      +

      An entity may want to query the service to retrieve its affiliations for all nodes at the service, or query a specific node for its affiliation with that node. Support for this feature ("retrieve-affiliations") is RECOMMENDED.

      +

      In order to make the request of the service, the requesting entity includes an empty <affiliations/> element with no attributes.

      + + ]]> +

      In order to make an affiliations request of a specific node, the requesting entity includes an empty <affiliations/> element with a 'node' attribute.

      + + + + + + ]]> + + + + + + ]]>
      @@ -1834,6 +1865,89 @@ And by opposing end them? ]]> + +

      An entity may want to request information about the default subscription configuration. Support for this feature is OPTIONAL.

      + +

      To get the default subscription options, the entity MUST send an empty <default/> element to the node (not the service); in response, the node SHOULD return the default subscription options.

      + + + + + ]]> +

      Note: Here the namespace is 'http://jabber.org/protocol/pubsub' (not 'http://jabber.org/protocol/pubsub#owner' as for retrieval of the default node configuration options).

      +
      + +

      If no error occurs, the node MUST return the default subscription configuration options.

      + + + + + http://jabber.org/protocol/pubsub#subscribe_options + + 1 + 0 + false + + chat + online + away + + + + + + + ]]> +
      + +

      There are several reasons why the default subscription configuration options request might fail:

      +
        +
      1. The service does not support subscription configuration.
      2. +
      3. The service does not support retrieval of default subscription configuration.
      4. +
      +

      These error cases are described more fully in the following sections.

      + +

      If the node does not support subscription configuration, it MUST return a &feature; error, specifying a pubsub-specific error condition of <unsupported/> and a feature of "subscription-options".

      + + + + + + + ]]> +
      + +

      If the node does not support retrieval of default subscription configuration options, it MUST return a &feature; error, specifying a pubsub-specific error condition of <unsupported/> and a feature of "retrieve-default-sub".

      + + + + + + + ]]> +
      +
      +

      Implementations of pubsub that choose to persist items MAY allow entities to request existing items from a node (e.g., an entity may wish to do this after successfully subscribing in order to receive all the items in the publishing history for the node).

      @@ -1860,7 +1974,7 @@ And by opposing end them? ]]> -

      The service then SHOULD return all items published to the node, although it MAY truncate the result set if a large number of items has been published (see next section).

      +

      The service then SHOULD return all available items at the node, although it MAY truncate the result set if a large number of items has been published (see next section) and naturally it cannot return items that have been deleted, expired, etc.

      Note: When a service successfully creates a node on behalf of the requesting entity, it MUST return an IQ result. If the node creation request did not specify a NodeID and the service supports creation of instant nodes, the service MUST specify the created NodeID in the IQ result. Similarly, if the node creation request specified a NodeID but the service modified the NodeID before creating the node, the service MUST also specify the modified node in the IQ result. In all other cases, the service MUST NOT specify the NodeID in the IQ result (since the node creator can determine which node was created by tracking the 'id' attribute that it specified for the IQ-set).

      -

      As explained above, each node type has its own default configuration. By asking the service to create a node with default configuration, the node creator accepts the default configuration. If the service allows node configuration, the owner may reconfigure the node after creating the node (as described in the Configure a Node section of this document). In addition, a service MAY allow entities to determine the default configuration options for a given node type before creating a node (as described in the Request Default Configurations section of this document).

      +

      As explained above, each node type has its own default configuration. By asking the service to create a node with default configuration, the node creator accepts the default configuration. If the service allows node configuration, the owner may reconfigure the node after creating the node (as described in the Configure a Node section of this document). In addition, a service MAY allow entities to determine the default configuration options for a given node type before creating a node (as described in the Request Default Node Configurations section of this document).

      In order to create a node with default configuration, the node creator can simply include an empty <create/> child element.

      In the following example, the node creator requests a leaf node (the default type) with an open access model (assumed to be the default type for this service).

      1 1 10 + 604800 open publishers + 0 never false + headline 0 0 0 @@ -3158,12 +3275,16 @@ And by opposing end them? - 1 + 1 10 + + 604800 + 1 @@ -3191,6 +3312,10 @@ And by opposing end them? publishers + + 0 + 1028 @@ -3208,6 +3333,12 @@ And by opposing end them? label='Deliver notifications only to available users'> 0 + + + + headline + http://www.w3.org/2005/Atom @@ -3317,6 +3448,7 @@ And by opposing end them? 1 1 10 + 604800 roster friends @@ -3324,8 +3456,10 @@ And by opposing end them? courtiers publishers + 0 never false + headline 0 0 0 @@ -3403,12 +3537,15 @@ And by opposing end them? 0 1 10 + 604800 1 open publishers + 0 9216 never 0 + headline http://www.w3.org/2005/Atom http://jabxslt.jabberstudio.org/atom_body.xslt @@ -3421,11 +3558,11 @@ And by opposing end them?
      - +

      An entity may want to request information about the default node configuration, e.g. in order to determine whether to perform create-and-configure as previously described. Support for this feature is OPTIONAL.

      -

      To get the options, the entity MUST send an empty <default/> element to the service with no NodeID; in response, the service SHOULD return the default node options.

      - To get the node options, the entity MUST send an empty <default/> element to the service with no NodeID; in response, the service SHOULD return the default node options.

      +
      -

      If no error occurs, the service MUST return the default configuration options.

      - If no error occurs, the service MUST return the default node configuration options.

      + @@ -3484,6 +3622,10 @@ And by opposing end them? label='Max # of items to persist'> 10 + + 604800 + 1 @@ -3511,6 +3653,10 @@ And by opposing end them? publishers + + 0 + 9216 @@ -3528,6 +3674,12 @@ And by opposing end them? label='Deliver notifications only to available users'> 0 + + + + headline + @@ -3556,9 +3708,9 @@ And by opposing end them? ]]> - +

      If the service does not support retrieval of default node configuration options, it MUST return a &feature; error, specifying a pubsub-specific error condition of <unsupported/> and a feature of "retrieve-default".

      - -

      A service MAY send subscription approval requests to the node owner(s) at any time. An approval request consists of a message stanza containing a Data Form scoped by the "http://jabber.org/protocol/pubsub#subscribe_authorization" FORM_TYPE. The form MUST contain a boolean field that has a 'var' attribute of "pubsub#allow", which is the field that designates whether or not to allow the subscription request. The form SHOULD include fields that specify the node identifier, the subscription id (if applicable), and the JID of the pending subscriber. The message MAY include a &BODY; element that contains natural-language text explaining that the message contains a pending subscription form.

      +

      A service MAY send subscription approval requests to the node owner(s) at any time. An approval request consists of a message stanza containing a Data Form scoped by the "http://jabber.org/protocol/pubsub#subscribe_authorization" FORM_TYPE. The form MUST contain a boolean field that has a 'var' attribute of "pubsub#allow", which is the field that designates whether or not to allow the subscription request. The form SHOULD include fields that specify the node identifier and the JID of the pending subscriber. The message MAY include a &BODY; element that contains natural-language text explaining that the message contains a pending subscription form.

      @@ -3775,7 +3927,6 @@ And by opposing end them? http://jabber.org/protocol/pubsub#subscribe_authorization - 123-abc princely_musings @@ -3796,9 +3947,6 @@ And by opposing end them? http://jabber.org/protocol/pubsub#subscribe_authorization - - 123-abc - princely_musings @@ -3829,9 +3977,6 @@ And by opposing end them? http://jabber.org/protocol/pubsub#subscribe_authorization - - 123-abc - princely_musings @@ -3895,6 +4040,9 @@ And by opposing end them? status='executing' action='execute'> + + http://jabber.org/protocol/pubsub#subscribe_authorization + @@ -4757,7 +4905,13 @@ And by opposing end them? retrieve-default Retrieval of default node configuration is supported. RECOMMENDED - Request Default Configuration Options + Request Default Node Configuration Options + + + retrieve-default-sub + Retrieval of default subscription configuration is supported. + OPTIONAL + Request Default Subscription Configuration Options retrieve-items @@ -4926,7 +5080,7 @@ And by opposing end them? -

      When a subscription state change occurs, a service SHOULD send a message to the (new, former, or denied) subscriber informing it of the change, where the message contains an <event/> element with a single <subscription/> child that specifies the node, JID, and subscription state. The notification MAY contain a &BODY; element specifying natural-language text regarding the subscription change. Examples are shown below.

      +

      When a subscription state change occurs, a service SHOULD send a message to the (new, former, or denied) subscriber informing it of the change, where the message contains an <event/> element with a single <subscription/> child that specifies the node, JID, and subscription state. The notification MAY contain a &BODY; element specifying natural-language text regarding the subscription change. The JID to which the service sends the notification is the address that was set in the 'jid' attribute of the subscription request. Examples are shown below.

      ]]> +

      Naturally, the node owner can enforce the singleton node pattern by setting the max_items configuration option to "1".

      An XMPP URI (see &rfc5122;) can be used for the purpose of identification or interaction. Some examples are provided below.

      @@ -5316,9 +5471,24 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings;item=ae -

      Because the data published to a pubsub node may contain sensitive information (e.g., a user's geolocation), node owners SHOULD exercise care in approving subscription requests. Security considerations regarding particular kinds of information are the responsibility of the "using protocol".

      -

      A service MUST NOT allow non-owners or other unauthorized entities to complete any actions defined under the Owner Use Cases section of this document.

      -

      A service MUST adhere to the defined access model in determining whether to send event notifications or payloads to an entity, or allow an entity to retrieve items from a node. A service MAY enforce additional privacy and security policies when determining whether an entity is allowed to subscribe to a node or retrieve items from a node; however, any such policies shall be considered specific to an implementation or deployment and are out of scope for this document.

      + +

      The data published to a pubsub node might contain sensitive information (e.g., a user's geolocation). Therefore, node owners SHOULD exercise care in approving subscription requests. Security considerations regarding particular kinds of information are the responsibility of the "using protocol".

      +
      + +

      XMPP PubSub contains a hierarchy of affiliations for the purpose of authorization and access control. A service MUST NOT allow non-owners or other unauthorized entities to complete any actions defined under the Owner Use Cases section of this document.

      +
      + +

      A service MUST adhere to the defined access model in determining whether to send event notifications or payloads to an entity, or allow an entity to retrieve items from a node. A service MAY enforce additional privacy and security policies when determining whether an entity is allowed to subscribe to a node or retrieve items from a node; however, any such policies shall be considered specific to an implementation or deployment and are out of scope for this document.

      +
      + +

      In the context of instant messaging systems it is possible for the act of publishing an item to reveal the node owner or item publisher's network availability. However, this risk is mitigated by the following factors:

      +
        +
      1. A node does not necessarily reveal the existing of the publishing entity.
      2. +
      3. XMPP PubSub systems are not necessarily tied to instant messaging systems.
      4. +
      5. Even in the context of IM systems, a node provides information distinct from network availability (e.g., user tunes).
      6. +
      7. Even then, the actual publisher might not be an IM user (e.g., an automated calendaring or geolocation system).
      8. +
      +
      @@ -5613,10 +5783,6 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings;item=ae var='pubsub#allow' type='boolean' label='Whether to allow the subscription'/> - collection + + + + + @@ -5876,6 +6054,9 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings;item=ae open + @@ -5892,6 +6073,9 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings;item=ae on_sub_and_presence + 1