<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-calext-jscontact-uid-07" submissionType="IETF" consensus="true" category="std" xml:lang="en" obsoletes="" updates="9555" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <front>
    <title abbrev="JSContact Version 2.0">JSContact Version 2.0: A JSON Representation of Contact Data</title>
    <seriesInfo name="RFC" value="draft-ietf-calext-jscontact-uid-07"/>
    <author initials="R." surname="Stepanek" fullname="Robert Stepanek">
      <organization>Fastmail</organization>
      <address>
        <postal>
          <extaddr>PO Box 234</extaddr>
          <street>Collins St. West</street>
          <city>Melbourne</city>
          <region>VIC</region>
          <code>8007</code>
          <country>Australia</country>
          <region/>
        </postal>
        <email>rsto@fastmailteam.com</email>
      </address>
    </author>
    <date year="2025" month="November" day="19"/>
    <area>art</area>
    <workgroup>calext</workgroup>
    <keyword>JSContact</keyword>
    <abstract>
      <t>This document defines version "2.0" of JSContact. It defines the uid property of a Card object to be optional, rather than mandatory as defined in previous version "1.0". All other definitions of JSContact version "1.0" remain as defined in RFC 9553. This document updates RFC 9555 by redefining how to convert the now optional uid property from and to vCard. It also registers the vCard JSCOMPS parameter at IANA, which was defined but not registered in RFC 9555.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="notational-conventions" numbered="true" toc="default">
      <name>Notational Conventions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14> SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14> RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
      <t>The ABNF definitions in this document use the notations of <xref target="RFC5234"/>. ABNF rules not defined in this document are defined in either <xref target="RFC5234"/> (such as the ABNF for CRLF, WSP, DQUOTE, VCHAR, ALPHA, and DIGIT) or <xref target="RFC6350"/>.</t>
    </section>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="RFC9553">JSContact</xref> defines the Card object uid property, a mandatory property which contains a unique identifier for the entity represented by that contact card. For the same purpose, the <xref target="RFC6350">vCard</xref> contact format defines the UID property, an optional property of a vCard instance. Throughout the rest of this document, the term uid (all lowercase) denotes the JSContact uid property, the term UID (all uppercase) denotes the vCard UID property.</t>
      <t>That the uid property was defined to be mandatory in JSContact has shown to be applicable for some use cases, but turned out to be an issue in other contexts:</t>
          <t>For example, the <xref target="RFC6352">CardDAV protocol</xref> requires the UID property of a <xref target="RFC6350">vCard object</xref> to be set. Accordingly, an internet server that implements both CardDAV and <xref target="RFC9610">JMAP for Contacts</xref> requires the uid property of a JSContact Card to be set. In contrast, protocols such as <xref target="RFC9083">RDAP</xref> have no use for the uid property, either because they use different identifiers, or they prefer to not include any unique identifier in the contact data at all. JSContact should not require them to generate unique identifiers that are irrelevant to their use case.</t>
          <t>Also, one of the stated goals of JSContact is to be compatible with the semantics of the vCard data format (<xref target="RFC9553" section="1"/>). But <xref target="RFC6350"/> defines the UID property of a vCard to be optional, and consequently the semantics of JSContact and vCard differ for such a crucial common element.</t>
        <t>In case of vCards without a <xref target="RFC6350" section="6.7.6" sectionFormat="parens">UID property</xref> being converted to JSContact, requiring unique identifiers is especially problematic: the Card uid property is mandatory and accordingly <xref target="RFC9555" section="2.1.1"/> requires implementations to generate some unique identifier for it during conversion, but it does not guarantee it to be the same across implementations or even one implementation converting the same Card multiple times. A recipient being unaware that the uid property value of such a Card object is ephemeral might refer to it in the members property or relatedTo property of another Card object, introducing invalid relations between contact cards.</t>
    </section>
    <section>
      <name>JSContact Version 2.0</name>
      <t>This document redefines the uid property of a Card object to become optional. Other than that, the property definition is left unchanged. This change requires the major version of JSContact to change, so this document defines the JSContact version to become "2.0". For further information about versioning JSContact data, see <xref target="RFC9553" section="1.9"/>.</t>
      <t>Implementations <bcp14>MUST</bcp14> create JSContact data that complies with the definitions of version "2.0" (or some later registered version) and <bcp14>MUST</bcp14> set the version property of the JSContact Card object to that version. They <bcp14>MUST NOT</bcp14> reject a Card object without the uid property as invalid unless specified differently in another document, or unless the Card version property has value "1.0". As any valid version "1.0" JSContact Card also is valid according to version "2.0", there is no need to migrate existing JSContact data.</t>
      <t>Setting the uid property is use-case specific. If an implementation is able to consistently generate the exact same unique identifier for a JSContact Card representing the same entity and no protocol-specific concerns prevail, it is recommended to set the uid property.</t>
      <t>This document does not redefine the vCard UID property.</t>
    </section>
    <section anchor="redefined-uid-property" numbered="true" toc="default">
      <name>Redefined uid Property</name>
      <t>This document redefines the type signature of the uid property, originally defined in <xref target="RFC9553" section="2.1.9"/>. The new type signature is:</t>
      <dl spacing="normal">
        <dt>
          <strong>uid: String (optional).</strong>
        </dt>
        <dd/>
      </dl>
      <t>The remaining property definition is left unchanged, with the following additional paragraph:</t>
      <blockquote>
        <t>A Card without an uid property can not be referred to as group member in the <xref target="RFC9553" section="2.1.6" sectionFormat="parens">members property</xref>, or put in relation to another Card object in the <xref target="RFC9553" section="2.1.8" sectionFormat="parens">relatedTo property</xref>.</t>
      </blockquote>
    </section>
    <section anchor="redefined-uid-property-conversion" numbered="true" toc="default">
      <name>Redefined Conversion Rule for the uid Property</name>
      <t>This document redefines how to convert the Card uid property from vCard, originally defined in <xref target="RFC9555" section="2.1.1"/>. The new conversion rule is:</t>
      <t>Implementations that convert a vCard without a <xref target="RFC6350" section="6.7.6" sectionFormat="parens">UID property</xref> to a Card of version "2.0" or higher <bcp14>MUST NOT</bcp14> generate a unique identifier as value for the <xref target="RFC9553" section="2.1.9" sectionFormat="parens">uid property</xref>.</t>
      <t>When converting a vCard without UID property to JSContact version "1.0", implementations <bcp14>MUST</bcp14> generate a value for the uid property. Generating unique identifiers is implementation-specific. An implementation <bcp14>SHOULD</bcp14> generate the same value when generating the same Card multiple times. <xref target="introduction"/> describes why this is problematic. Consequently, implementations <bcp14>SHOULD NOT</bcp14> convert to version "1.0" Card objects.</t>
    </section>
    <section>
        <name>Other Changes</name>
	<t>This document also registers the JSCOMPS parameter in the IANA "vCard Parameters" registry. The parameter was defined in <xref target="RFC9555" section="3.3.1"/> but mistakenly not registered at IANA.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section>
        <name>Update to the JSContact Version Registry</name>
        <t>IANA will update the "JSContact Version" registry, originally created in <xref target="RFC9553" section="3.4"/>. It will add the following record:</t>
        <table anchor="tab-iana-version-registry" align="center">
          <name>JSContact Version Registry</name>
          <thead>
            <tr>
              <th align="left">Major Version</th>
              <th align="left">Highest Minor Version</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">2</td>
              <td align="left">0</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section>
        <name>Update to the JSContact Properties Registry</name>
        <t>IANA will update the "JSContact Properties" registry, originally created in <xref target="RFC9553" section="3.5"/>: In the "Reference/Description" column of the uid property, it will add a reference to <xref target="redefined-uid-property"/> of this document.</t>
      </section>
      <section>
        <name>Update to the vCard Parameters Registry</name>
        <t>IANA will update the "vCard Parameters" registry within the "vCard Elements" registry. It will add the following entry:</t>
        <table anchor="tab-iana-vcard-parameter-registry" align="center">
          <name>vCard Parameters Registry</name>
          <thead>
            <tr>
              <th align="left">Namespace</th>
              <th align="left">Parameter</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left"></td>
              <td align="left">JSCOMPS</td>
              <td align="left"><xref target="RFC9555" section="3.3.1" sectionFormat="of"/></td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>This document does not provide new security considerations. The security considerations of <xref target="RFC9553" section="4" sectionFormat="of"/> apply.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6350.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9553.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9555.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6352.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9083.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9610.xml"/>
      </references>
    </references>
  </back>
</rfc>
