<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-newton-regext-rdap-extensions-00" submissionType="IETF" category="info" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true" consensus="true">

<front>
<title abbrev="rdap-extensions">RDAP Extensions</title><seriesInfo value="draft-newton-regext-rdap-extensions-00" stream="IETF" status="informational" name="Internet-Draft"></seriesInfo>
<author initials="A." surname="Newton" fullname="Andy Newton"><organization>ICANN</organization><address><postal><street></street>
</postal><email>andy@hxr.us</email>
</address></author><author initials="J." surname="Singh" fullname="Jasdip Singh"><organization>ARIN</organization><address><postal><street></street>
</postal><email>jasdips@arin.net</email>
</address></author><date/>
<area>Applications and Real-Time Area (ART)</area>
<workgroup>Registration Protocols Extensions (regext)</workgroup>

<abstract>
<t>This document describes the usage of extensions in RDAP.</t>
</abstract>

</front>

<middle>

<section anchor="background"><name>Background</name>
<t>The Registration Data Access Protocol (RDAP) defines a uniform means to access data
from Internet operations registries, specifically Domain Name Registries (DNRs) and
Internet Number Registries (INRs). The queries for DNRs and INRs are defined in
<xref target="RFC9082"></xref> and the responses for DNRs and INRs are defined in <xref target="RFC9083"></xref>.</t>
<t>RDAP contains a means to define extensions for queries not found in <xref target="RFC9082"></xref> and
responses not found in <xref target="RFC9083"></xref>.</t>
</section>

<section anchor="the-rdap-extension-identifier"><name>The RDAP Extension Identifier</name>
<t><xref target="RFC7480" sectionFormat="of" relative="#" section="6"></xref> describes the identifier used to signify RDAP extensions
and the IANA registry into which RDAP extensions are to be registered.</t>
<t>In brief, RDAP extensions identifiers start with an alphabetic character and may
contain alphanumeric characters and &quot;_&quot; (underscore) characters. This formulation
was explicitly chosen to allow compatibility with variable names in programming
languages and transliteration with XML.</t>
<t>RDAP extension identifiers have no explicit structure and are opaque in that no
inner-meaning can be &quot;seen&quot; in them.</t>
<t>When in use in RDAP, extension identifiers are prepended to both URL path segments
and JSON attribute names. In both cases, the extension identifier acts as a namespace
preventing collisions between extension elements.</t>
</section>

<section anchor="usage-in-queries"><name>Usage in Queries</name>
<t><xref target="RFC9082" sectionFormat="of" relative="#" section="5"></xref> describes the use of extension identifiers in formulating
URIs to query RDAP servers. The extension identifiers are to be prepended to the
path segments they use. For example, if an extension uses the identifier
<tt>foobar</tt>, then the path segments used in that extension are prepended with <tt>foobar_</tt>.
If the <tt>foobar</tt> extension defines paths <tt>fizz</tt> and <tt>fazz</tt>, the URIs for this
extension might take the following form:</t>

<artwork>https://base.example/foobar_fizz
https://base.example/foobar_fazz
</artwork>
<t>Although <xref target="RFC9082"></xref> describes the use of URI query strings, it does not define
their use with extensions. <xref target="RFC7480"></xref> instructs servers to ignore unknown query
parameters. Therefore, the use of query parameters, prefixed or not with an
extension identifier, is undefined. Despite this, there are several extensions
that do specify query parameters.</t>
</section>

<section anchor="usage-in-json"><name>Usage in JSON</name>
<t><xref target="RFC9083" sectionFormat="of" relative="#" section="2"></xref> describes the use of extension identifiers in the JSON
returned by RDAP servers. Just as in URIs, the extension identifier is prepended
to JSON names to create a namespace so that the JSON name from one extension
will not collide with the JSON name of another extension. And just as with
URIs, clients are to ignore unknown JSON names.</t>
<t>The example given in <xref target="RFC9083"></xref> is as follows:</t>

<artwork>{
  &quot;handle&quot; : &quot;ABC123&quot;,
  &quot;lunarNIC_beforeOneSmallStep&quot; : &quot;TRUE THAT!&quot;,
  &quot;remarks&quot; :
  [
    {
      &quot;description&quot; :
      [
        &quot;She sells sea shells down by the sea shore.&quot;,
        &quot;Originally written by Terry Sullivan.&quot;
      ]
    }
  ],
  &quot;lunarNIC_harshMistressNotes&quot; :
  [
    &quot;In space,&quot;,
    &quot;nobody can hear you scream.&quot;
  ]
}
</artwork>
<t>In this example, the extension identified by <tt>lunarNIC</tt> is prepended
to the names of both a JSON string and a JSON array.</t>
<t>The following example shows this use with a JSON object.</t>

<artwork>{
  &quot;handle&quot; : &quot;ABC123&quot;,
  &quot;remarks&quot; :
  [
    {
      &quot;description&quot; :
      [
        &quot;She sells sea shells down by the sea shore.&quot;,
        &quot;Originally written by Terry Sullivan.&quot;
      ]
    }
  ],
  &quot;lunarNIC_author&quot; :
  {
    &quot;firstInitial&quot;: &quot;J&quot;,
    &quot;lastName&quot;: &quot;Heinlein&quot;
  }
}
</artwork>
<t>Here the JSON name &quot;lunarNic_author&quot; will separate the JSON from other
extensions that may have an &quot;author&quot; structure. But the JSON contained
within &quot;lunarNIC_author&quot; need not be prepended as the extension collision
is avoided by &quot;lunarNIC_author&quot;.</t>
</section>

<section anchor="camel-casing"><name>Camel Casing</name>
<t>The styling convention used in <xref target="RFC9083"></xref> for JSON names is often called
&quot;camel casing&quot;, in reference to the hump of a camel. In this style, the
first letter of every word, except the first word, composing a name is capitalized.
This convention was adopted to visually separate the namespace from the
name, with an underscore between them.</t>
<t>Though there is no explicit guidance to use camel case names, extensions would
be wise to continue the style.</t>
</section>

<section anchor="two-classes-of-extensions"><name>Two Classes of Extensions</name>
<t>Though all RDAP extensions are to be registered in the IANA RDAP extensions
registry, there is an implicit two-class system of extensions that comes from
the inherit ownership of the RDAP specifications by the IETF: extensions
created by the IETF and extensions not created by the IETF.</t>
<t>In the perspective of how extensions identifiers are used as namespace
separators, extensions created by the IETF are not required to be prefixed
with an extension identifier as the IETF can coordinate its own activities
to avoid name collisions. In practice, extensions owned by the IETF do use
extension identifiers.</t>
</section>

<section anchor="extension-versioning"><name>Extension Versioning</name>
<t>Because RDAP extensions are opaque, they posses no explicit version despite
the fact that some extension identifiers include trailing numbers. That
is, RDAP extensions are opaquely versioned.</t>
<t>For example, <tt>fizzbuzz_1</tt> may be the successor to <tt>fizzbuzz_0</tt>, but it
may also be an extension for a completely separate purpose. Only consultation
of the definition of <tt>fizzbuzz_1</tt> will determine its relationship with
<tt>fizzbuzz_0</tt>. Additionally, <tt>fizzbuzz_99</tt> may be the predecessor of <tt>fizzbuzz_0</tt>.</t>
</section>

<section anchor="extension-definitions"><name>Extension Definitions</name>
<t>Extensions must be documented in an RFC or in some other permanent and readily
available reference, in sufficient detail that interoperability between independent
implementations is possible.</t>
<t>Though RDAP gives each extension its own namespace, the definition of an
extension may re-use definitions found in the base RDAP specification or in any
other properly registered extension.</t>
<t><xref target="RFC9083"></xref> notes that the extension identifiers provide a &quot;hint&quot; to the client
as to how to interpret the response. This wording does not intentionally restrict
the extension to defining only JSON values within the extensions namespace.
Therefore, an extension may define the use of its own JSON values together
with the use of JSON values from other extensions or RDAP specifications. As with
the ICANN profile or RIR profile extensions, the extension may simply signal
policy applied to already defined RDAP structures.</t>
</section>

</middle>

<back>
<references><name>Normative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7480.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9082.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9083.xml"/>
</references>

</back>

</rfc>
