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.2 |
Last Updated: | 2011-04-07 |
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.
1. Introduction
2. Requirements
3. XML Namespace
4. Encapsulation
5. IQ-Based Publication and Retrieval
5.1. Retrieval
5.2. Publication
6. Event Notifications
6.1. Location
6.2. Subscribing to vCard Notifications
6.3. Receiving a vCard Notification
7. vCards of Automated Entities
8. Mapping from vcard-temp to vCard4
8.1. JABBERID
8.2. DESC
9. Security Considerations
10. IANA Considerations
11. Open Issues
12. 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
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.
This specification was designed with the following requirements in mind.
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".
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/>.
As in XEP-0054, the primary method for publishing and retrieving vCards is the XMPP <iq/> stanza.
An XMPP entity retrieves the vCard of another entity (or itself) by sending an IQ-get to the target entity containing a <vcard/> child element (note the lowercase "c"!) qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace.
<iq from='samizzi@cisco.com/foo' id='bx81v356' to='stpeter@jabber.org' type='get'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/> </iq>
If a vCard exists for the target entity, the responsible entity (e.g., the XMPP server that hosts the account for a bare JID) MUST return the data in an IQ-result:
<iq from='stpeter@jabber.org' id='bx81v356' to='samizzi@cisco.com/foo' type='result'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'> <fn><text>Peter Saint-Andre</text></fn> <n> <surname><text>Saint-Andre</text></surname> <given><text>Peter</text></given> </n> <nickname><text>stpeter</text></nickname> <url><uri>https://stpeter.im/</uri></url> <bday><date>19660806</date></bday> <gender><sex><text>M</text></sex></gender> <lang> <parameters><pref>1</pref></parameters> <language-tag>en</language-tag> </lang> <org> <parameters><type><text>work</text></type></parameters> <text>XMPP Standards Foundation</text> </org> <title><text>Executive Director</text></title> <role><text>Patron Saint</text></role> <adr> <parameters><type><text>work</text></type></parameters> <ext><text>Suite 600</text></ext> <street><text>1899 Wynkoop Street</text></street> <locality><text>Denver</text></locality> <region><text>CO</text></region> <code><text>80202</text></code> <country><text>USA</text></country> </adr> <adr> <parameters><type><text>home</text></type></parameters> <locality><text>Denver</text></locality> <region><text>CO</text></region> <code><text>80210</text></code> <country><text>USA</text></country> </adr> <tel> <parameters> <text>work</text> <text>voice</text> </parameters> <uri>tel:+1-303-308-3282</uri> </tel> <tel> <parameters> <text>home</text> <text>voice</text> </parameters> <uri>tel:+1-303-555-1212</uri> </tel> <email> <text>stpeter@jabber.org</text> </email> <impp> <uri>xmpp:stpeter@jabber.org</uri> </impp> <tz><text>America/Denver</text></tz> </vcard> </iq>
If no vCard exists, the server MUST return an IQ-result containing an empty <vcard/> element.
<iq from='stpeter@jabber.org' id='bx81v356' to='samizzi@cisco.com/foo' type='result'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/> </iq>
An XMPP entity publishes or updates its vCard by sending an IQ-set to itself, containing a <vcard/> child element qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace.
<iq from='stpeter@jabber.org/squire id='h3vz319m' to='stpeter@jabber.org' type='set'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'> <fn><text>Peter Saint-Andre</text></fn> <n> <surname><text>Saint-Andre</text></surname> <given><text>Peter</text></given> </n> <nickname><text>stpeter</text></nickname> <url><uri>https://stpeter.im/</uri></url> <bday><date>19660806</date></bday> <gender><sex><text>M</text></sex></gender> <lang> <parameters><pref>1</pref></parameters> <language-tag>en</language-tag> </lang> <org> <parameters><type><text>work</text></type></parameters> <text>XMPP Standards Foundation</text> </org> <title><text>Executive Director</text></title> <role><text>Patron Saint</text></role> <adr> <parameters><type><text>work</text></type></parameters> <ext><text>Suite 600</text></ext> <street><text>1899 Wynkoop Street</text></street> <locality><text>Denver</text></locality> <region><text>CO</text></region> <code><text>80202</text></code> <country><text>USA</text></country> </adr> <adr> <parameters><type><text>home</text></type></parameters> <locality><text>Denver</text></locality> <region><text>CO</text></region> <code><text>80210</text></code> <country><text>USA</text></country> </adr> <tel> <parameters> <text>work</text> <text>voice</text> </parameters> <uri>tel:+1-303-308-3282</uri> </tel> <tel> <parameters> <text>home</text> <text>voice</text> </parameters> <uri>tel:+1-303-555-1212</uri> </tel> <email> <parameters><type><text>work</text></type></parameters> <text>stpeter@jabber.org</text> </email> <impp> <parameters><type><text>work</text></type></parameters> <uri>xmpp:stpeter@jabber.org</uri> </impp> <key> <parameters><type><text>work</text></type></parameters> <uri>https://stpeter.im/index.php/contact/</uri> </key> <tz><text>America/Denver</text></tz> </vcard> </iq>
If no error occurs, the responsible entity returns an IQ-result.
<iq from='stpeter@jabber.org' id='bx81v356' to='stpeter@jabber.org/squire' type='result'/>
Note: An entity MAY have authorization to update the vCard of another entity (e.g., a server administrator might have authorization to modify the server's vCard).
Publish-Subscribe [6] provides a way to subscribe to events, and Personal Eventing Protocol [7] defines a pubsub profile for events associated with instant messaging (IM) accounts. If PEP is supported by an IM server, it can be used to automatically generate event notifications when a user's vCard is modified.
The canonical location for notifications regarding a user's vCard is a pubsub node whose name is "urn:xmpp:vcard4".
Let us imagine that Juliet wishes to receive the updates that Romeo publishes to his vCard. She has two options:
Because Juliet has sent presence to Romeo including Entity Capabilities data that includes the "urn:xmpp:vcard4+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.
<message from='romeo@montague.lit' to='juliet@capulet.lit' type='headline'> <event xmlns='http://jabber.org/protocol/pubsub#event'> <items node='urn:xmpp:vcard4'> <item id='current'/> </items> </event> </message>
Note: There is no payload, because this is a pure notification (the receiver needs to retrieve the vCard using an IQ-get as described earlier..
Traditionally, vCards have been used on the XMPP network for entities other than human users, e.g. by XMPP servers and chatrooms. When such automated entities use vCards, it is RECOMMENDED to specify a value of "thing" for the vCard4 KIND property vCard KIND:thing [9]. An example follows.
<iq from='jabber.org' id='yhx51c35' to='samizzi@cisco.com/foo' type='result'> <vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'> <fn><text>jabber.org IM service</text></fn> <url><uri>http://www.jabber.org/</uri></url> <lang> <parameters><pref>1</pref></parameters> <language-tag>en</language-tag> </lang> <email> <parameters><type><text>work</text></type></parameters> <text>xmpp@jabber.org</text> </email> <impp> <parameters><type><text>work</text></type></parameters> <uri>xmpp:stpeter@jabber.org</uri> </impp> <logo> <parameters><type><text>work</text></type></parameters> <uri>http://www.jabber.org/wp-content/themes/carrington-blog/images/logo.png</uri> </logo> <geo> <parameters><type><text>work</text></type></parameters> <uri>geo:42.25,-91.05</uri> </geo> <tz><text>America/Chicago</text></tz> <kind><text>thing</text></kind> </vcard> </iq>
The following sections mention non-obvious aspects of the migration from vcard-temp to vCard4. A future version of this specification might provide a more detailed mapping.
The vcard-temp specification defined a <JABBERID/> element:
<JABBERID>stpeter@jabber.org</JABBERID>
However, the JABBERID field was not part of the vCard3 schema. RFC 4770 [10] defined an IMPP property for instant messaging and presence addresses, which was ported to vCard4. In the vCard4 XML format, the IMPP property for a JabberID would be as follows.
<impp> <uri>xmpp:stpeter@jabber.org</uri> </impp>
The vcard-temp specification defined a <DESC/> element. This element too was not part of the vCard3 schema. There is no mapping of the vcard-temp <DESC/> element to vCard4.
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).
This document does not require interaction with the Internet Assigned Numbers Authority (IANA) [11].
The following open issues are yet to be addressed:
Thanks to Joe Hildebrand, Waqas Hussain, and Matt Miller for their feedback.
Series: XEP
Number: 0292
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.2
Last Updated: 2011-04-07
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
This document in other formats:
XML
PDF
Email:
samizzi@cisco.com
JabberID:
samizzi@cisco.com
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
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.
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>.
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".
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-0045: Multi-User Chat <http://xmpp.org/extensions/xep-0045.html>.
6. XEP-0060: Publish-Subscribe <http://xmpp.org/extensions/xep-0060.html>.
7. XEP-0163: Personal Eventing Protocol <http://xmpp.org/extensions/xep-0163.html>.
8. XEP-0115: Entity Capabilities <http://xmpp.org/extensions/xep-0115.html>.
9. vCard KIND:thing <http://tools.ietf.org/html/draft-saintandre-vcarddav-thing>. Work in progress.
10. RFC 4770: vCard Extensions for Instant Messaging (IM) <http://tools.ietf.org/html/rfc4770>.
11. 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/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Updated to track base vCard4 specs; defined IQ transport, with pubsub for notifications; added examples for server vCards; specified mapping from vcard-temp.
(psa)Initial published version.
(psa)Corrected more errors in the examples.
(psa)Corrected some errors in the examples.
(psa)Third draft.
(psa)Second draft.
(srm)First draft.
(srm)END