1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-15 22:05:01 -05:00
xeps/inbox/vcard4.xml

221 lines
10 KiB
XML
Raw Normal View History

2011-02-12 18:16:53 -05:00
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
2011-02-12 18:21:59 -05:00
<title>vCard4 Over XMPP</title>
2011-02-12 18:16:53 -05:00
<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.</abstract>
&LEGALNOTICE;
<number>xxxx</number>
<status>ProtoXEP</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>draft-ietf-vcarddav-vcardrev</spec>
<spec>draft-ietf-vcarddav-vcardxml</spec>
</dependencies>
<supersedes>
<spec>XEP-0054</spec>
</supersedes>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
<author>
<firstname>Samantha</firstname>
<surname>Mizzi</surname>
<email>samizzi@cisco.com</email>
<jid>samizzi@cisco.com</jid>
</author>
&stpeter;
<revision>
<version>0.0.3</version>
<date>2011-02-12</date>
<initials>psa</initials>
<remark><p>Third draft.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2011-01-31</date>
<initials>srm</initials>
<remark><p>Second draft.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2010-11-30</date>
<initials>srm</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>Since 1999, the Jabber/XMPP community has used an interim, unofficial XML representation of vCard data for personal contacts. Recently, the IETF has upgraded vCard from version 3 to version 4, and at the same time has defined 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.</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>This specification was designed with the following documents in mind.</p>
<ol>
<li>Reuse vCard4 as defined in &vcardrev;.</li>
<li>Reuse the vCard4 XML format as defined in &vcardxml;.</li>
<li>Ensure that clients and servers can easily migrate from &xep0054; to the new encapsulation format.</li>
<li>Notify interested parties of changes to vCard data using standard XMPP extensions, specifically &xep0163;.</li>
<li>Enable XMPP servers to store vCard4 XML data in LDAP directories if desired.</li>
</ol>
</section1>
<section1 topic='XML Namespace' anchor='namespace'>
<p>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".</p>
</section1>
<section1 topic='Encapsulation' anchor='encapsulation'>
<p>The vCard XML format defined at the IETF specifies that the root element is &lt;vcards/&gt;, where the only defined child element is &lt;vcard/&gt;. For use in XMPP, we specify that the root element shall be &lt;vcard/&gt;, not &lt;vcards/&gt;.</p>
</section1>
<section1 topic='PubSub Binding' anchor='pubsub'>
<section2 topic='Location' anchor='pubsub-location'>
<p>When the &xep0163; "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".</p>
<p>When "raw" &xep0060; is used, the location is a generic publish-subscribe node that is not attached to an user's IM account.</p>
<p>Use of PEP is RECOMMENDED to simplify the process of discovering and subscribing to the vCard information.</p>
</section2>
<section2 topic='Subscribing to a vCard' anchor='pubsub-subscribe'>
<p>Let us imagine that Juliet wishes to receive the updates that Romeo publishes to his vCard. She has two options:
<ol>
<li>Implicitly subscribe by advertising support for "urn:ietf:param:xml:ns:vcard-4.0+notify" in her &xep0115; 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.</li>
<li>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).</li>
</ol>
</p>
</section2>
<section2 topic='Publishing/Updating a vCard' anchor='pubsub-publish'>
<p>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.</p>
<example caption="Publishing/Updating a vCard"><![CDATA[
<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'>
<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
<vcard>
<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>
<sex><integer>0</integer></sex>
<org>
<parameters><type>love</type></parameters>
<text>Juliet</text>
</org>
<adr>
<parameters><type>love</type></parameters>
<street><text>123 Capulet Way</text></street>
<locality><text>Verona</text></locality>
<country><text>Italy</text></country>
</adr>
<email>
<parameters><type>work</type></parameters>
<text>romeo@montague.lit</text>
</email>
<class><text>PUBLIC</text></class>
</vcard>
</vcards>
<published>2010-11-08T18:30:02Z</published>
<updated>2010-11-08T18:30:02Z</updated>
</publish>
</pubsub>
</iq>
]]></example>
</section2>
<section2 topic='Receiving a vCard'>
<p>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.</p>
<example caption="Receiving a vCard publication/update"><![CDATA[
<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'>
<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
<vcard>
<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>
<sex><integer>0</integer></sex>
<org>
<parameters><type>love</type></parameters>
<text>Juliet</text>
</org>
<adr>
<parameters><type>love</type></parameters>
<street><text>123 Capulet Way</text></street>
<locality><text>Verona</text></locality>
<country><text>Italy</text></country>
</adr>
<email>
<parameters><type>work</type></parameters>
<text>romeo@montague.lit</text>
</email>
<class><text>PUBLIC</text></class>
</vcard>
</vcards>
<published>2010-05-08T18:30:02Z</published>
<updated>2010-05-08T18:30:02Z</updated>
</items>
</event>
</message>
]]></example>
</section2>
<section2 topic='Implicit Interactions with vCard'>
<section3 topic='Retrieving vCard'>
<p>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.</p>
<example caption="Subscriber requests vCard"><![CDATA[
<iq type='get'
from='juliet@capulet.lit/castle'
to='urn:ietf:param:xml:ns:vcard-4.0'
id='items1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='urn:ietf:param:xml:ns:vcard-4.0'/>
</pubsub>
</iq>
]]></example>
</section3>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>
<ol>
<li>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).</li>
<li>There are security considerations around XEP-0060, please see section 14.</li>
<li>There are security considerations around XEP-0115, please see section 9.</li>
<li>There are security considerations around XEP-0163, please see section 8.</li>
</ol>
</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document does not require interaction with the Internet Assigned Numbers Authority (IANA) [35]</p>
</section1>
<section1 topic='Open Issues' anchor='issues'>
<p>The following open issues are yet to be addressed:</p>
<ol>
<li>Do we need to define an IQ binding as in XEP-0054?</li>
<li>The mapping from XEP-0054 to vCard4 is not yet specified.</li>
<li>It would be helpful to provide an XSLT for automated translation of vcard-temp to vCard4.</li>
</ol>
</section1>
</xep>