Network Working Group                                       S. Josefsson
Internet-Draft                                              RSA Security
Expires: November 11, 2002                                  May 13, 2002


           Domain Name System URI Scheme and MIME Media Types
                       draft-josefsson-dns-url-05

Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on November 11, 2002.

Copyright Notice

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

Abstract

   This draft describes a URI scheme for DNS resources and MIME media
   types for DNS data.













Josefsson               Expires November 11, 2002               [Page 1]


Internet-Draft           DNS URI and MIME types                 May 2002


Table of Contents

   1. Introduction and Background  . . . . . . . . . . . . . . . . .   3
   2. DNS URI Registration . . . . . . . . . . . . . . . . . . . . .   4
   3. MIME Type Registration of application/dns  . . . . . . . . . .   6
   4. MIME Type Registration of text/dns . . . . . . . . . . . . . .   7
   5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . .   8
   6. Security Considerations  . . . . . . . . . . . . . . . . . . .   9
   7. IANA Considerations  . . . . . . . . . . . . . . . . . . . . .   9
      Normative References . . . . . . . . . . . . . . . . . . . . .  10
      Informative References . . . . . . . . . . . . . . . . . . . .  10
      Author's Address . . . . . . . . . . . . . . . . . . . . . . .  11
      Full Copyright Statement . . . . . . . . . . . . . . . . . . .  12






































Josefsson               Expires November 11, 2002               [Page 2]


Internet-Draft           DNS URI and MIME types                 May 2002


1. Introduction and Background

   DNS [1][2] is a widely deployed protocol used to, among other things,
   translate host names into IP addresses.  More recent work has added
   support for storing certificates in DNS [8][9].

   To be able to locate and retrieve certificates via a network, URIs
   are often used.  This document describes a URI scheme to locate DNS
   information.  The DNS URI scheme described here can be used to
   reference any DNS data, not only certificates.

   DNS information is often stored and served from text files, so called
   "master files".  The format is described in RFC 1035 [2].  This
   document specify that the MIME type text/dns is used for master
   files.

   DNS data can also be stored in a format described in RFC 2540 [5].
   The format intended to be used when archiving DNS data (it adds a
   retrieval time stamp).  This document specify that the MIME type
   application/dns is used for the RFC 2540 format.

   The rest of this document is outlined as follows.  Section 2 contains
   the URI Registration Template from [10].  Section 3 and 4 contains
   the MIME registration template from [6] for application/dns and
   text/dns respectively.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [7].






















Josefsson               Expires November 11, 2002               [Page 3]


Internet-Draft           DNS URI and MIME types                 May 2002


2. DNS URI Registration

   URL scheme name: "dns".

   URL scheme syntax: A DNS URI designates a DNS resource record set,
   referenced by domain name, type and class and optionally server.  The
   DNS URI follows the generic syntax from RFC 2396 [4], and is
   described using ABNF [3].  Strings are not case sensitive and free
   insertion of linear-white-space is not permitted.

   dnsurl          = "dns:" [ "//" hostport "/" ] dnsname ["?" dnsquery]
                                ; See RFC 2396 for "hostport"  definition

   dnsname         = *pchar
                                ; See RFC 2396 for "pchar" definition

   dnsquery        = dnsqueryelement [";" dnsquery]

   dnsqueryelement = ( "CLASS=" dnsclassval ) | ( "TYPE=" dnstypeval ) |
                     ( 1*alphanum "=" 1*alphanum )

   dnsclassval     = 1*digit / "IN" / "CH" / ...
                                ; Any standard DNS class expressed as
                                ; mnemonic or as decimal integer

   dnstypeval      = 1*digit / "A" / "NS" / "MD" / ...
                                ; Any standard DNS type expressed as
                                ; mnemonic or as decimal integer

   The digit representation of types and classes SHOULD NOT be used when
   a defined mnemonic for the corresponding value is known.

   Unless specified in the URI, the server ("hostport") is assumed to be
   locally known, "dnsclassval" to be the Internet class ("IN"), and
   "dnstypeval" to be the Address (A) type.

   To resolve a DNS URI using the DNS protocol [2] a query is formed by
   using the dnsname, dnsclassval and dnstypeval from the URI string (or
   the previously mentioned default values if either is missing from the
   string).  If server ("hostport") is given in the URI string, this
   server should receive the DNS query, otherwise the default DNS server
   should receive it.

   A client MAY want to check that it understands the dnsclassval and
   dnstypeval before sending a query, so that it is able to correctly
   parse the answer.  A typical example of a client that would not need
   to check dnsclassval and dnstypeval would be a proxy that just treat
   the answer as opaque data.



Josefsson               Expires November 11, 2002               [Page 4]


Internet-Draft           DNS URI and MIME types                 May 2002


   Character encoding considerations: The characters are encoded as per
   the "URI Generic Syntax" RFC [4].

   To encode a "." that is part of a DNS label the "escaped" encoding
   MUST be used, and a label delimiter MUST be encoded as ".".  That is,
   the only way to encode a label delimiter is "." , and the only way to
   encode a "." as part of label is "%2e".

   This URI specification allows all possible DNS names to be encoded
   (of course following the encoding rules of [4]), however certain
   applications may restrict the set of valid characters and care should
   be taken so that invalid characters in these contexts does not cause
   harm.  In particular, host names in DNS have certain restrictions.
   It is up to these application to limit this subset, this URI scheme
   places no restrictions.

   Intended usage: Broad usage.

   Applications and/or protocols which use this scheme: E.g., CNRP.

   Interoperability considerations: The data referenced by this URI
   scheme might be transferred by protocols that are not URI aware (such
   as the DNS protocol).  This is not anticipated to have any serious
   interoperability impact though.

   Security considerations: A DNS URI does not embed confidential
   information.  If it references domains in the Internet DNS
   environment, even the information referenced by the URI is public
   information.  If a DNS URI is used within an "internal" DNS
   environment, the same security considerations of the DNS environment
   apply to the use and handling of DNS URIs themselves as well as the
   data returned by looking up these URIs.

   If security related information is referenced by DNS URIs (such as
   certificates stored in DNS), care must be taken to prevent for man-
   in-the-middle attacks that maliciously replace the certificate.
   Techniques such as Secure DNS may be used.

   This draft does not affect the security considerations related to DNS
   itself.

   Contact: sjosefsson@rsasecurity.com

   Author/Change Controller: IESG







Josefsson               Expires November 11, 2002               [Page 5]


Internet-Draft           DNS URI and MIME types                 May 2002


3. MIME Type Registration of application/dns

   To: ietf-types@iana.org
   Subject: Registration of MIME media type application/dns

   MIME media type name: application

   MIME subtype name: dns

   Required parameters: none

   Optional parameters: none

   Encoding considerations: 7bit, 8bit or binary

   Security considerations: This definition identifies content as being
   detached DNS information, as documented in RFC 2540 [5].  This data
   may be security relevant according to RFC 2538 [9], or secured
   information according to RFC 2535 [8].

   Interoperability considerations: none

   Published specification: The format of data that could be tagged with
   this MIME type is documented in RFC 2540 [5].

   Applications which use this media type: DNS related software.

   Additional information:

     Magic number(s): none
     File extension(s): none
     Macintosh File Type Code(s): unknown

   Person & email address to contact for further information:

   Simon Josefsson sjosefsson@rsasecurity.com

   Intended usage: COMMON

   Author/Change controller: IESG











Josefsson               Expires November 11, 2002               [Page 6]


Internet-Draft           DNS URI and MIME types                 May 2002


4. MIME Type Registration of text/dns

   To: ietf-types@iana.org
   Subject: Registration of MIME media type text/dns

   MIME media type name: text

   MIME subtype name: dns

   Required parameters: none

   Optional parameters: none

   Encoding considerations: 7bit, 8bit or binary

   Security considerations: This definition identifies content as being
   DNS information in "master file" format, as documented in RFC 1035
   [2].  The DNS data may be security relevant according to RFC 2538
   [9], or secured information according to RFC 2535 [8].

   Interoperability considerations: none

   Published specification: The format of data that could be tagged with
   this MIME type is documented in RFC 1035 [2].

   Applications which use this media type: DNS related software.

   Additional information:

     Magic number(s): none
     File extension(s): none
     Macintosh File Type Code(s): unknown

   Person & email address to contact for further information:

   Simon Josefsson sjosefsson@rsasecurity.com

   Intended usage: COMMON

   Author/Change controller: IESG











Josefsson               Expires November 11, 2002               [Page 7]


Internet-Draft           DNS URI and MIME types                 May 2002


5. Examples

   A DNS URI is of the following general form.  This is intended to
   illustrate, not define, the scheme.

   dns:[//server/]domain[?type=TYPE;class=CLASS]

   The following illustrate a DNS query for "www.example.org" for the
   Internet (IN) class and the Address (A) type:

   dns:www.example.org?class=IN;type=A

   The following illustrate a DNS query for "simon.example.org" for the
   CERT type in the Internet (IN) class:

   dns:simon.example.org?type=CERT

   The following illustrate a DNS query for "ftp.example.org" from the
   DNS server "internal-dns.example.org" server, in the Internet (IN)
   class and the address (A) type:

   dns://internal-dns.example.org/ftp.example.org?type=A

   The following illustrate a strange, albeit valid, DNS query.  Note
   the encoding of "." and 0x00:

   dns://internal-dns.example.org/*.%3f%20%00%2e%25+?type=TXT

   The following illustrates data tagged with the text/plain MIME type:

   $ORIGIN example.org
   @       IN      SOA     ns-master dnsmaster 20 7200 600 3600000 60
           IN      NS      ns1
           IN      NS      ns2
           IN      MX      10 mail1
   ns1     IN      A       10.1.0.52
   ns2     IN      A       192.168.17.23
   mail1   IN      A       10.52.0.1
   www     IN      A       192.168.17.23












Josefsson               Expires November 11, 2002               [Page 8]


Internet-Draft           DNS URI and MIME types                 May 2002


6. Security Considerations

   A DNS URI does not embed confidential information.  If it references
   domains in the Internet DNS environment, even the information
   referenced by the URI is public information.  If a DNS URI is used
   within an "internal" DNS environment, the same security
   considerations of the DNS environment apply to the use and handling
   of DNS URIs themselves as well as the data returned by looking up
   these URIs.

   If security related information is referenced by DNS URIs (such as
   certificates stored in DNS), care must be taken to prevent for man-
   in-the-middle attacks that maliciously replace the certificate.
   Techniques such as Secure DNS may be used.

   The application/dns definition identifies content as being detached
   DNS information, as documented in RFC 2540 [5].  This data may be
   security relevant according to RFC 2538 [9], or secured information
   according to RFC 2535 [8].

   The text/dns definition identifies content as being DNS information
   in "master file" format, as documented in RFC 1035 [2].  The DNS data
   may be security relevant according to RFC 2538 [9], or secured
   information according to RFC 2535 [8].

   This draft does not affect the security considerations related to DNS
   itself.

7. IANA Considerations

   The IANA is asked to register the DNS URI scheme, using the template
   in section 2, in accordance with RFC 2717 [10].

   The IANA is asked to register the MIME types application/dns and
   text/dns using the templates in section 3 and 4 respectively, in
   accordance with RFC 2048 [6].















Josefsson               Expires November 11, 2002               [Page 9]


Internet-Draft           DNS URI and MIME types                 May 2002


Acknowledgements

   Thanks to Stuart Cheshire, Donald Eastlake, Pasi Eronen, Michael
   Mealling, and Steve Mattson for comments and suggestions.

Normative References

   [1]  Mockapetris, P., "Domain Names - Concepts and Facilities", RFC
        1034, November 1987.

   [2]  Mockapetris, P., "Domain Names - Implementation and
        Specification", RFC 1035, November 1987.

   [3]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
        Specifications: ABNF", RFC 2234, November 1997.

   [4]  Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource
        Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

   [5]  Eastlake, D., "Detached Domain Name System (DNS) Information",
        RFC 2540, March 1999.

Informative References

   [6]   Freed, N., Klensin, J. and J. Postel, "Multipurpose Internet
         Mail Extensions (MIME) Part Four: Registration Procedures", RFC
         2048, November 1996.

   [7]   Bradner, S., "Key words for use in RFCs to Indicate Requirement
         Levels", RFC 2119, March 1997.

   [8]   Eastlake, D., "Domain Name System Security Extensions", RFC
         2535, March 1999.

   [9]   Eastlake, D. and O. Gudmundsson, "Storing Certificates in the
         Domain Name System (DNS)", RFC 2538, March 1999.

   [10]  Petke, R. and I. King, "Registration Procedures for URL Scheme
         Names", RFC 2717, November 1999.












Josefsson               Expires November 11, 2002              [Page 10]


Internet-Draft           DNS URI and MIME types                 May 2002


Author's Address

   Simon Josefsson
   RSA Security
   Arenav„gen 29
   Stockholm  121 29
   Sweden

   Phone: +46 8 7250914
   EMail: sjosefsson@rsasecurity.com









































Josefsson               Expires November 11, 2002              [Page 11]


Internet-Draft           DNS URI and MIME types                 May 2002


Full Copyright Statement

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.



















Josefsson               Expires November 11, 2002              [Page 12]