XEP-0292: vCard4 Over XMPP

Abstract:This document specifies an XMPP extension for use of the vCard4 XML format in XMPP systems, with the intent of obsoleting the vcard-temp format.
Authors:Samantha Mizzi, Peter Saint-Andre
Copyright:© 1999 - 2011 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:Experimental
Type:Standards Track
Version:0.1
Last Updated:2011-03-02

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. Requirements
3. XML Namespace
4. Encapsulation
5. PubSub Binding
    5.1. Location
    5.2. Subscribing to a vCard
    5.3. Publishing/Updating a vCard
    5.4. Receiving a vCard
    5.5. Implicit Interactions with vCard
       5.5.1. Retrieving vCard
6. Security Considerations
7. IANA Considerations
8. Open Issues
9. 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


1. Introduction

Since 1999, the Jabber/XMPP community has used an interim, unofficial XML representation of vCard data for personal contacts, called vcard-temp [1]. Recently, the IETF has upgraded vCard from vCard3 to vCard4 [2], and at the same time has defined vCard4 XML [3] as an official XML format for vCard4. This document specifies an XMPP extension for use of the vCard4 XML format in XMPP systems, with the intent of obsoleting the vcard-temp format. Primarily this document defines the encapsulation method itself; secondarily it also defines transport methods and a mapping to the vcard-temp format for migration by clients and servers.

2. Requirements

This specification was designed with the following documents in mind.

  1. Reuse vCard4 as defined in draft-ietf-vcarddav-vcardrev.
  2. Reuse the vCard4 XML format as defined in draft-ietf-vcarddav-vcardxml.
  3. Ensure that clients and servers can easily migrate from vcard-temp to the new encapsulation format.
  4. Notify interested parties of changes to vCard data using standard XMPP extensions, specifically Personal Eventing Protocol [4].
  5. Enable XMPP servers to store vCard4 XML data in LDAP directories if desired.

3. XML Namespace

Because there is now an XML namespace for the official vCard format, we can simply re-use that namespace: "urn:ietf:params:xml:ns:vcard-4.0".

4. Encapsulation

The vCard XML format defined at the IETF specifies that the root element is <vcards/>, where the only defined child element is <vcard/>. For use in XMPP, we specify that the root element shall be <vcard/>, not <vcards/>.

5. PubSub Binding

5.1 Location

When the Personal Eventing Protocol (PEP) "flavor" of XMPP publish-subscribe is used, the canonical location for a user's vCard is a pubsub node whose name is "urn:ietf:params:xml:ns:vcard-4.0". For instance, if the Shakespearean character Romeo has a JabberID of 'romeo@montague.lit' then his vCard would be located at that JID with a node of "urn:ietf:params:xml:ns:vcard-4.0".

When "raw" Publish-Subscribe [5] is used, the location is a generic publish-subscribe node that is not attached to an user's IM account.

Use of PEP is RECOMMENDED to simplify the process of discovering and subscribing to the vCard information.

5.2 Subscribing to a vCard

Let us imagine that Juliet wishes to receive the updates that Romeo publishes to his vCard. She has two options:

  1. Implicitly subscribe by advertising support for "urn:ietf:param:xml:ns:vcard-4.0+notify" in her Entity Capabilities [6] data. Romeo's PEP service then automatically sends vCard updates to her when it receives presence from her, until and unless she sends presence of type unavailable or stops advertising an interest in vCard updates. This is in accordance with XEP-0060, section 6.1.
  2. Explicitly subscribe by sending a formal subscription request to the "urn:ietf:param:xml:ns:vcard-4.0" node at Romeo's JabberID. Romeo's PEP service may send her all vCard updates even if she is offline at the time (depending on service policies regarding presence integration).

5.3 Publishing/Updating a vCard

Romeo can publish/update a vCard via XMPP pubsub. Currently there is no method for partial updates of a vCard, and the entire vCard must be sent to the server in order to update any part of the vCard. Publish-subscribe is done in accordance with XEP-0060, section 7.1.

Example 1. Publishing/Updating a vCard

<iq from='romeo@motague.lit/office
    id='v1'
    to='romeo@motague.lit'
    type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <publish node='urn:ietf:param:xml:ns:vcard-4.0'>
      <item>
        <vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
          <fn><text>Romeo Montague</text></fn>
          <n>
            <surname><text>Montague</text></surname>
            <given><text>Romeo</text></given>
            <additional/>
            <prefix>
              <text>Sir</text>
            </prefix>
            <suffix/>
          </n>
          <bday><date>--0203</date></bday>
          <anniversary>
            <date-time>15000808T1430-0500</date-time>
          </anniversary>
          <gender><text>male</text></gender>
          <org>
            <parameters><type>home</type></parameters>
            <text>Juliet</text>
          </org>
          <adr>
            <parameters><type>home</type></parameters>
            <pobox/>
            <ext/>
            <street><text>123 Capulet Way</text></street>
            <locality><text>Verona</text></locality>
            <region/>
            <code/>
            <country><text>Italy</text></country>
          </adr>
          <email>
            <parameters><type>work</type></parameters>
            <text>romeo@montague.lit</text>
          </email>
        </vcard>
      </item>
    </publish>
  </pubsub>
</iq>
    

5.4 Receiving a vCard

Because Juliet has sent presence to Romeo including Entity Capabilities data that encapsulates the "urn:ietf:param:xml:ns:vcard-4.0+notify" feature, Romeo's XMPP server will send a PEP notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with XMPP clients that are not pubsub-capable (see Message Body). This is in accordance with XEP-0060, second 6.1.7.

Example 2. Receiving a vCard publication/update

<message from='romeo@montague.lit'
         to='juliet@capulet.lit'
         type='headline'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='urn:ietf:param:xml:ns:vcard-4.0'>
      <item id='foobar'>
        <vcard xmlns="urn:ietf:params:xml:ns:vcard-4.0">
          <fn><text>Romeo Montague</text></fn>
          <n>
            <surname><text>Montague</text></surname>
            <given><text>Romeo</text></given>
            <prefix>
              <text>Sir</text>
            <prefix/>
            <suffix/>
          </n>
          <bday><date>--0203</date></bday>
          <anniversary>
            <date-time>15000808T1430-0500</date-time>
          </anniversary>
          <gender><text>male</text></gender>
          <org>
            <parameters><type>home</type></parameters>
            <text>Juliet</text>
          </org>
          <adr>
            <parameters><type>home</type></parameters>
            <pobox/>
            <ext/>
            <street><text>123 Capulet Way</text></street>
            <locality><text>Verona</text></locality>
            <region/>
            <code/>
            <country><text>Italy</text></country>
          </adr>
          <email>
            <parameters><type>work</type></parameters>
            <text>romeo@montague.lit</text>
          </email>
        </vcard>
      </item>
    </items>
  </event>
</message>
    

5.5 Implicit Interactions with vCard

5.5.1 Retrieving vCard

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). This is in accordance with XEP-0060, section 6.5. The subscriber may request all items by specifying only the Node ID without restrictions.

Example 3. Subscriber requests vCard

<iq type='get'
    from='juliet@capulet.lit/castle'
    to='romeo@montague.lit'
    id='items1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='urn:ietf:param:xml:ns:vcard-4.0'/>
  </pubsub>
</iq>
    

6. Security Considerations

  1. The vCard information published to one's XMPP server is world-readable; therefore, users should exercise due caution when determining what information to include (e.g., street addresses, personal telephone numbers, or email addresses).
  2. There are security considerations around XEP-0060, please see section 14.
  3. There are security considerations around XEP-0115, please see section 9.
  4. There are security considerations around XEP-0163, please see section 8.

7. IANA Considerations

This document does not require interaction with the Internet Assigned Numbers Authority (IANA) [35]

8. Open Issues

The following open issues are yet to be addressed:

  1. Do we need to define an IQ binding as in XEP-0054?
  2. The mapping from XEP-0054 to vCard4 is not yet specified.
  3. It would be helpful to provide an XSLT for automated translation of vcard-temp to vCard4.

9. Acknowledgements

Thanks to Joe Hildebrand, Waqas Hussain, and Matt Miller for their feedback.


Appendices


Appendix A: Document Information

Series: XEP
Number: 0292
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.1
Last Updated: 2011-03-02
Approving Body: XMPP Council
Dependencies: XMPP Core, draft-ietf-vcarddav-vcardrev, draft-ietf-vcarddav-vcardxml
Supersedes: XEP-0054
Superseded By: None
Short Name: NOT_YET_ASSIGNED
Source Control: HTML  RSS
This document in other formats: XML  PDF


Appendix B: Author Information

Samantha Mizzi

Email: samizzi@cisco.com
JabberID: samizzi@cisco.com

Peter Saint-Andre

Email: stpeter@jabber.org
JabberID: stpeter@jabber.org
URI: https://stpeter.im/


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 - 2011 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 <http://xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XMPP Standards Foundation, 1899 Wynkoop Street, Suite 600, Denver, CO 80202 USA).

Appendix D: 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 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

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-0054: vcard-temp <http://xmpp.org/extensions/xep-0054.html>.

2. vCard Format Specification <http://tools.ietf.org/html/draft-ietf-vcarddav-vcardrev>. Work in progress.

3. vCard XML Representation <http://tools.ietf.org/html/draft-ietf-vcarddav-vcardxml>. Work in progress.

4. XEP-0163: Personal Eventing Protocol <http://xmpp.org/extensions/xep-0163.html>.

5. XEP-0060: Publish-Subscribe <http://xmpp.org/extensions/xep-0060.html>.

6. XEP-0115: Entity Capabilities <http://xmpp.org/extensions/xep-0115.html>.


Appendix H: Revision History

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

Version 0.1 (2011-03-02)

Initial published version.

(psa)

Version 0.0.5 (2011-02-28)

Corrected more errors in the examples.

(psa)

Version 0.0.4 (2011-02-25)

Corrected some errors in the examples.

(psa)

Version 0.0.3 (2011-02-12)

Third draft.

(psa)

Version 0.0.2 (2011-01-31)

Second draft.

(srm)

Version 0.0.1 (2010-11-30)

First draft.

(srm)

END