<?xml version="1.0" encoding="UTF-8"?>

<?rfc toc="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="no"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<rfc number="4848" category="std">
  <front>
    <title abbrev="URI-Enabled NAPTR">Domain-Based Application Service Location Using URIs and the&nbsp;Dynamic&nbsp;Delegation&nbsp;Discovery&nbsp;Service&nbsp;(DDDS)</title>
    <author initials="L." surname="Daigle" fullname="Leslie L. Daigle">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>13600 Dulles Technology Drive</street>
          <city>Herndon</city>
          <region>VA</region>
          <code>20171</code>
          <country>US</country>
        </postal>
        <email>ledaigle@cisco.com; leslie@thinkingcat.com</email>
      </address>
    </author>
    <date month="April" year="2007"/>

<!--
 [rfced] Please insert any keywords (beyond those that appear in 
 the title) for use on http://www.rfc-editor.org/search.html. 
-->

<abstract>
<t>
The purpose of this document is to define a new, straightforward
Dynamic Delegation Discovery Service (DDDS) 
application to allow mapping of domain names to URIs for particular 
application services and protocols.  Although defined as a new DDDS 
application, dubbed U-NAPTR, this is effectively an extension of the 
Straightforward NAPTR (S-NAPTR) DDDS application.
</t>
</abstract>

</front>

<middle>

<section title="Introduction">
<t>
The purpose of this document is to define a new, straightforward
Dynamic Delegation Discovery Service (DDDS) <xref target="RFC3401"/>
application to allow mapping of domain names to URIs for particular 
application services and protocols.
This allows the "lookup" of particular services available for
given domains, for example.
</t>
<t>
Although this is defining a new and separate DDDS application, 
dubbed U-NAPTR, it is built from the same principles as 
the Straightforward NAPTR (S-NAPTR) application,
specified in <xref target="RFC3958"/>.  This specification is
not an update of S-NAPTR, but the reader is encouraged
to review that document for extensive coverage of motivation and
implementation considerations.
</t>
<t>
S-NAPTR provides for application service location
that does not rely on rigid domain naming conventions.  
It is deemed "straightforward" in part because it rules out
the use of regular expressions in NAPTR records (for the S-NAPTR
DDDS Application).  However, that also rules out the possibility of
providing a URI as the target of DDDS resolution.  A number
of applications, specified  (e.g., <xref target="RFC4095"/>)  and proposed, 
find the restriction too limiting, making S-NAPTR a near miss
to suit their needs.
</t>
<t>
This U-NAPTR is effectively a modest extension to S-NAPTR, to accommodate
the use of URIs as targets, without allowing the full range of 
possible regular expressions in NAPTR records.  
</t>

<!-- End section:  Introduction -->
</section>


<section title="Straightforward URI-Enabled NAPTR (U-NAPTR)">

<t>
This document assumes the reader is familiar with the S-NAPTR
specification <xref target="RFC3958"/>.  The intention of U-NAPTR is to provide everything
that S-NAPTR does, except that it allows the use of the "U"
flag in the NAPTR record, and a specific form of REGEXP.
</t>
<section title="Permitted Flags">
<t>
U-NAPTR permits the same flags as S-NAPTR ("S", "A", or empty),  plus the 
"U" Flag.  For
the U-NAPTR DDDS Application, the presence of the "U" Flag in the 
NAPTR record indicates the REGEXP field must be populated (and,
consequently, the REPLACEMENT field is empty). The regular expression
in the REGEXP field must be of the limited form described below,
and the result of the regular expression evaluation will be
a URI that is the result of the DDDS resolution.
</t>
</section>
<section title="Permitted Regular Expressions">
<t>
U-NAPTR permits regular expressions of a form that does 
a complete replacement of the matched string with a URI, expressed
as a constant string.  This is essentially a dodge around the fact
that the REPLACEMENT field in NAPTR is required to produce only
a fully qualified domain name (and, therefore, cannot be used for
a URI).
</t>
<t>
The specific allowed syntax for U-NAPTR regular expressions
is:
<figure>
<artwork>
     u-naptr-regexp = "!.*!"&lt;URI&gt;"!"
</artwork>
</figure>
</t>
<t>
where &lt;URI&gt;  is as defined in STD 66 <xref target="RFC3986"/>, 
the URI syntax specification.
</t>
<t>
With this limited form of regular expression, applications using
U-NAPTR need not implement full regular expression parsers.  
</t>
</section>
</section>
<section title="Sample U-NAPTR DNS Records">
<t>
In the sample NAPTR RRs for example.com shown below, "WP" is the 
imagined application service tag for "white pages", and "EM" is
the application service tag for an imagined "Extensible Messaging"
application service.
</t>
<figure title="">
<artwork name="">
example.com.
;;       order pref flags 
IN NAPTR 100   10   ""    "WP:whois++"      ( ; service
                          ""                  ; regexp
                          bunyip.example.com. ; replacement
                                            )
IN NAPTR 100   20   "s"   "WP:ldap"         ( ; service
                          ""                  ; regexp
                         _ldap._tcp.myldap.example.com. ; replacement
                                            )
IN NAPTR 200   10   "u"    "EM:protA"        ( ; service
                          "!.*!prota://someisp.example.com!" ; regexp
                          ""                  ; replacement
                                            )
IN NAPTR 200   30   "a"   "EM:protB"          ; service
                          ""                  ; regexp
                          myprotB.example.com.; replacement
                                            )
</artwork>
</figure>
</section>

<section title="Formal Definition of U-NAPTR Application of DDDS" 
anchor="DDDS-def">
<t> This section formally defines the DDDS application, as described in 
<xref target="RFC3401"></xref>. </t>
<section title="Application Unique String">
<t> The Application Unique String is a fully qualified domain name (FQDN)
for which an authoritative 
server for a particular service is sought. </t>
</section>
<!-- End subsection:  Application Unique String -->

<section title="First Well Known Rule">
<t> The "First Well Known Rule" is identity -- that is, the output of 
the rule is the Application Unique String, the FQDN for which the 
authoritative server for a particular service is sought. </t>
<!-- End subsection:  First Well Known Rule -->
</section>

<section title="Expected Output">
<t> The expected output of this Application is the information necessary 
to connect to authoritative server(s) (host, port, protocol, or URI) for an 
application service within a given domain. </t>
<!-- End subsection:  Expected Output -->
</section>

<section title="Flags">

<!-- [rfced] Is capitalization of "DDDS application" / "DDDS Application"
as intended? It appears both ways, but intentionally cap'd when preceded
by S-NAPTR or U-NAPTR.
-->
<t> 
This DDDS Application uses only 3 of the Flags defined for the URI/URN 
Resolution Application <xref target="RFC3404"></xref>: "S", "A", and "U".
No other Flags are valid.   If a client obtains a NAPTR RR for
a U-NAPTR-using application that contains any other flag, that
NAPTR RR should be ignored and processing continues with the next
record (if any).
</t>
<t> 
These flags are for terminal lookups. This means that the Rule is the last one 
and that the flag determines what the next stage should be. The "S" flag means 
that the output of this Rule is a FQDN for which one or more SRV 
<xref target="RFC2782"></xref> records exist. "A" means that the output of the 
Rule is a domain name and should be used to lookup address records for that 
domain.   "U" means that the output of the Rule is a URI that should
be resolved in order to obtain access to the described service. 
</t>
<t>
Consistent with the DDDS algorithm, if the Flag string is empty the next 
lookup is for another NAPTR record (for the replacement target). 
</t>
<!-- End subsection:  Flags -->
</section>

<section title="Service Parameters" anchor="service-parms">
<t> Service Parameters for this Application take the form of a 
string of characters that follow this ABNF <xref target="RFC4234"/>: 
</t>
<figure title="">
<artwork name="">
   service-parms = [ [app-service] *(":" app-protocol)]
   app-service   = experimental-service  / iana-registered-service
   app-protocol  = experimental-protocol / iana-registered-protocol
   experimental-service      = "x-" 1*30ALPHANUMSYM
   experimental-protocol     = "x-" 1*30ALPHANUMSYM
   iana-registered-service   = ALPHA *31ALPHANUMSYM
   iana-registered-protocol  = ALPHA *31ALPHANUMSYM
   ALPHA         =  %x41-5A / %x61-7A   ; A-Z / a-z
   DIGIT         =  %x30-39 ; 0-9
   SYM           =  %x2B / %x2D / %x2E  ; "+" / "-" / "."
   ALPHANUMSYM   =  ALPHA / DIGIT / SYM
   ; The app-service and app-protocol tags are limited to 32
   ; characters and must start with an alphabetic character.
   ; The service-parms are considered case-insensitive.
</artwork>
</figure>

<t> Thus, the Service Parameters may consist of an empty string, just an 
app-service, or an app-service with one or more app-protocol specifications 
separated by the ":" symbol. 
</t>
<t>
Note that this is similar to, but not the same as the syntax used
in the URI DDDS application <xref target="RFC3404"/>.  The DDDS DNS 
database requires each DDDS application to define the syntax of 
allowable service strings.  The syntax here is expanded to allow
the characters that are valid in any URI scheme name (see 
<xref target="RFC3986"/>).  Since "+" (the separator used in 
the RFC3404 service parameter string) is an allowed character for
URI scheme names, ":" is chosen as the separator here.
</t>

<section title="Application Services">
<t> 
The "app-service" must be an IANA-registered service; see 
<xref target="iana"/> for instructions on registering new application 
service tags. 
</t>
<!-- End subsubsection:  Application Services -->
</section>

<section title="Application Protocols">
<t> 
The protocol identifiers that are valid for the "app-protocol" 
production are standard, registered protocols; see <xref target="iana"/> 
for instructions on registering new application protocol tags. 
</t>
<!-- End subsubsection:  Application Protocols" -->
</section>

<!-- End subsection: Service Parameters -->
</section>

<section title="Valid Rules">
<t>
Permitted rules are substitution rules and regular expressions of
the following syntax (i.e., a regular expression to replace
the domain name with a URI):
<figure>
<artwork>
        u-naptr-regexp = "!.*!"&lt;URI&gt;"!"
</artwork>
</figure>
</t>   
<t>
where &lt;URI&gt;  is as defined in STD 66 <xref target="RFC3986"/>, 
the URI syntax specification.
</t>
<!-- End subsection: Valid Rules -->
</section>

<section title="Valid Databases">
<t> 
At present, only one DDDS Database is specified for this Application. 
<xref target="RFC3403"></xref> specifies a DDDS Database that uses the 
NAPTR DNS resource record to contain the rewrite rules. The Keys for this 
database are encoded as domain names. 
</t>
<t> The First Well Known Rule produces a domain name, and this is the 
Key that is used for the first lookup -- the NAPTR records for that domain 
are requested. 
</t>
<t> DNS servers MAY interpret Flag values and use that information to 
include appropriate NAPTR, SRV, or A records in the Additional Information 
portion of the DNS packet. Clients are encouraged to check for additional 
information but are not required to do so. See the Additional Information 
Processing section of <xref target="RFC3403"/> for more information on NAPTR 
records and the Additional Information section of a DNS response packet. 
</t>
<!-- End subsection:  Valid Databases -->
</section>
<!-- End section: U-NAPTR Application of DDDS -->
</section>


<section title="IANA Considerations" anchor="iana">
<t>
This document does not itself place any requirements on IANA, but
provides the basis upon which U-NAPTR-using services can make use
of the existing IANA registries for application service tags and
application protocol tags (defined in RFC 3958 <xref target="RFC3958"/>).
</t>
<t>
As is the case for S-NAPTR, all application service and protocol tags that start with "x-"
are considered experimental, and no
provision is made to prevent duplicate use of the same string.  Use
them at your own risk.
</t>
<t>
All other application service and protocol tags are registered based on
the "specification required" option defined in <xref target="RFC2434"/>,
with the further stipulation that the "specification" is an RFC (of
any category).
</t>
<t>
There are no further restrictions placed
on the tags other than that they must conform with the
syntax defined above (<xref target="service-parms"/>).
</t>
<t>
The defining RFC must clearly identify and describe, for each tag
being registered:
<list style="symbols">
<t>
Application protocol or service tag
</t>
<t>
Intended usage
</t>
<t>
Interoperability considerations
</t>
<t>
Security considerations (see <xref target="security"/> of this document for further discussion of the types of considerations that are applicable)
</t>
<t>
Any relevant related publications
</t>
</list>
</t>
<t>
The defining RFC may also include further application-specific
restrictions, such as limitations on the types of URIs that
may be returned for the application service.
</t>

</section>

<section title="Security Considerations" anchor="security">
<t>
U-NAPTR has the same considerations for security as S-NAPTR; 
see Section 8 of <xref target="RFC3958"/>.
U-NAPTR has the additional consideration that resolving URIs (from
the result of the DDDS resolution) has its own set of
security implications, covered in the URI specification
(in particular, Section 7 of <xref target="RFC3986"/>).
In essence, using DNSSEC, client software can be confident
that the URI obtained using U-NAPTR is indeed the one specified
by the administrator of the domain from which it was retrieved;
but the validity of the service reached by resolving that URI
is  a matter of URI resolution security practices.
</t>

<!-- End section:  Security Considerations -->
</section>

<section title="Acknowledgements">
<t>
Thanks to Martin Thomson, John Klensin, Bernard Aboba, Alfred Hoenes, Dan
Romascanu, Suresh Krishnan, and Lars Eggert for reviewing earlier versions
and catching errors!
</t>
</section>


</middle>
<!-- This is essentially the end of the document. -->
<!-- Everything in here is either bibliography or Appendix -->
<back>

<references title="Normative References">



<reference anchor='RFC4234'>

<front>
<title abbrev='ABNF for Syntax Specifications'>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials='D.H.' surname='Crocker' fullname='David H. Crocker'/>
<author initials='P.' surname='Overell' fullname='Paul Overell'/>
<date month='October' year='2005'></date></front>
<seriesInfo name='RFC' value='4234' />
</reference>


<reference anchor="RFC3958">
<front>
<title>Domain-Based Application Service Location Using SRV RRs and the Dynamic Delegation Discovery Service (DDDS) </title>
<author initials="L" surname="Daigle" fullname="L. Daigle">
</author>
<author initials="A" surname="Newton" fullname="A. Newton">
</author>
<date month="January" year="2005" />
</front>
<seriesInfo name="RFC" value="3958" />
</reference>

      <reference anchor="RFC2782">
        <front>
          <title abbrev="DNS SRV RR">A DNS RR for specifying the location of services (DNS SRV)</title>
          <author initials="A." surname="Gulbrandsen" fullname="Arnt Gul
brandsen">
            <organization>Troll Tech</organization>
            <address>
              <postal>
                <street>Waldemar Thranes gate 98B</street>
                <city>Oslo</city>
                <region></region>
                <code>N-0175</code>
                <country>NO</country>
              </postal>
              <phone>+47 22 806390</phone>
              <facsimile>+47 22 806380</facsimile>
              <email>arnt@troll.no</email>
            </address>
          </author>
          <author initials="P." surname="Vixie" fullname="Paul Vixie">
            <organization>Internet Software Consortium</organization>
            <address>
              <postal>
                <street>950 Charter Street</street>
                <city>Redwood City</city>
                <region>CA</region>
                <code>94063</code>
                <country>US</country>
              </postal>
              <phone>+1 650 779 7001</phone>
              <email></email>
            </address>
          </author>
          <author initials="L." surname="Esibov" fullname="Levon Esibov"
>
            <organization>Microsoft Corporation</organization>
            <address>
              <postal>
                <street>One Microsoft Way</street>
                <city>Redmond</city>
                <region>WA</region>
                <code>98052</code>
                <country>US</country>
              </postal>
              <phone></phone>
              <email>levone@microsoft.com</email>
            </address>
          </author>
          <date month="February" year="2000"/>
          <abstract>
            <t>This document describes a DNS RR which specifies the location of the server(s) for a specific protocol and domain.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="2782"/>
      </reference>




<reference anchor='RFC3403'>

<front>
<title>Dynamic Delegation Discovery System (DDDS) Part Three: The Domain
 Name System (DNS) Database</title>
<author initials='M.' surname='Mealling' fullname='M. Mealling'>
<organization /></author>
<date month='October' year='2002' /></front>

<seriesInfo name='RFC' value='3403' />
<format type='TXT' octets='31058' target='ftp://ftp.isi.edu/in-notes/rfc
3403.txt' />
</reference>

<?rfc needLines="10"?>
<reference anchor='RFC3404'>

<front>
<title>Dynamic Delegation Discovery System (DDDS) Part Four: The Uniform
 Resource Identifiers (URI)</title>
<author initials='M.' surname='Mealling' fullname='M. Mealling'>
<organization /></author>
<date month='October' year='2002' /></front>

<seriesInfo name='RFC' value='3404' />
<format type='TXT' octets='40124' target='ftp://ftp.isi.edu/in-notes/rfc
3404.txt' />
</reference>


<reference anchor='RFC2434'>

<front>
<title abbrev='Guidelines for IANA Considerations'>Guidelines for Writing an IANA Considerations Section in RFCs</title>
<author initials='T.' surname='Narten' fullname='Thomas Narten'>
<organization>IBM Corporation</organization>
<address>
<postal>
<street>3039 Cornwallis Ave.</street>
<street>PO Box 12195 - BRQA/502</street>
<street>Research Triangle Park</street>
<street>NC 27709-2195</street></postal>
<phone>919-254-7798</phone>
<email>narten@raleigh.ibm.com</email></address></author>
<author initials='H.T.' surname='Alvestrand' fullname='Harald Tveit Alvestrand'>
<organization>Maxware</organization>
<address>
<postal>
<street>Pirsenteret</street>
<street>N-7005 Trondheim</street>
<country>Norway</country></postal>
<phone>+47 73 54 57 97</phone>
<email>Harald@Alvestrand.no</email></address></author>
<date month='October' year='1998'></date>
<area>General</area>
<keyword>Internet Assigned Numbers Authority</keyword>
<keyword>IANA</keyword>
<abstract>
<t>
   Many protocols make use of identifiers consisting of constants and
   other well-known values. Even after a protocol has been defined and
   deployment has begun, new values may need to be assigned (e.g., for a
   new option type in DHCP, or a new encryption or authentication
   algorithm for IPSec).  To insure that such quantities have consistent
   values and interpretations in different implementations, their
   assignment must be administered by a central authority. For IETF
   protocols, that role is provided by the Internet Assigned Numbers
   Authority (IANA).
</t>
<t>
   In order for the IANA to manage a given name space prudently, it
   needs guidelines describing the conditions under which new values can
   be assigned. If the IANA is expected to play a role in the management
   of a name space, the IANA must be given clear and concise
   instructions describing that role.  This document discusses issues
   that should be considered in formulating a policy for assigning
   values to a name space and provides guidelines to document authors on
   the specific text that must be included in documents that place
   demands on the IANA.
</t></abstract></front>

<seriesInfo name='BCP' value='26' />
<seriesInfo name='RFC' value='2434' />
</reference>






</references>


<references title="Informative References">

<reference anchor='RFC3401'>

<front>
<title>Dynamic Delegation Discovery System (DDDS) Part One: The Comprehensive DDDS</title>
<author initials='M.' surname='Mealling' fullname='M. Mealling'>
<organization /></author>
<date month='October' year='2002' /></front>

<seriesInfo name='RFC' value='3401' />
<format type='TXT' octets='10172' target='ftp://ftp.isi.edu/in-notes/rfc
3401.txt' />
</reference>
<reference anchor="RFC3986">
<front>
<title>Uniform Resource Identifier (URI): Generic Syntax</title>
<author initials="T" surname="Berners-Lee" fullname="T. Berners-Lee">
</author>
<author initials="R" surname="Fielding" fullname="R. Fielding">
</author>
<author initials="L" surname="Masinter" fullname="L. Masinter">
</author>
<date month="January" year="2005" />
</front>
<seriesInfo name="RFC" value="3986" />
<seriesInfo name="STD" value="66" />
</reference>


<reference anchor="RFC4095">
<front>
<title>Attaching Meaning to Solicitation Class Keywords</title>
<author initials="C" surname="Malamud" fullname="C. Malamud">
<organization value="Memory Palace Press" />
</author>
<date month="May" year="2005" />
</front>
<seriesInfo name="RFC" value="4095" />
</reference>



</references>



  </back>
</rfc>




