<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
 <!ENTITY rfc1939 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1939.xml">
 <!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
 <!ENTITY rfc2595 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2595.xml">
 <!ENTITY rfc3207 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3207.xml">
 <!ENTITY rfc3501 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3501.xml">
 <!ENTITY rfc4033 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4033.xml">
 <!ENTITY rfc4409 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4409.xml">
 <!ENTITY rfc4954 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4954.xml">
 <!ENTITY rfc5068 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5068.xml">
 <!ENTITY rfc5321 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5321.xml">
 <!ENTITY rfc5246 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
 <!ENTITY rfc5890 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5890.xml">
 <!ENTITY rfc6066 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6066.xml">
 <!ENTITY rfc6125 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6125.xml">
 <!ENTITY rfc6186 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6186.xml">
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<!-- autobreaks="yes" -->
<?rfc comments="yes" ?> <?rfc inline="yes" ?>
<?rfc compact="yes" ?> <?rfc subcompact="no" ?>
<!-- editing="no" -->
<?rfc iprnotified="no" ?>
<!-- linkmailto="yes" -->
<!-- private="" --> <!-- header="" --> <!-- footer="" -->
<!-- slides="no" --> <!-- background="" -->
<!-- sortrefs="no" --> <?rfc symrefs="yes" ?>
<?rfc strict="yes" ?>
<?rfc toc="yes" ?> <!-- tocompact="yes" --> <!-- tocdepth="3" --> <!-- tocindent="yes" -->
<!-- topblock="no" -->

<!-- $Cambridge: hermes/doc/qsmtp/draft-fanf-dane-mua.xml,v 1.8 2012/06/27 18:50:04 fanf2 Exp $ -->

<rfc ipr="trust200902"
     category="std"
     updates="6186"
     docName="draft-fanf-dane-mua-00">

<!-- === -->
 <front>

  <title abbrev="DNSSEC and TLSA for MUAs">
   DNSSEC and TLSA records for IMAP, POP3, and message submission
  </title>

  <author initials="T." surname="Finch" fullname="Tony Finch">
   <organization abbrev="University of Cambridge">
    University of Cambridge Computing Service
   </organization>
   <address>
    <postal>
     <street>New Museums Site</street>
     <street>Pembroke Street</street>
     <city>Cambridge</city>
     <code>CB2 3QH</code>
     <country>ENGLAND</country>
    </postal>
    <phone>+44 797 040 1426</phone>
    <email>dot@dotat.at</email>
    <uri>http://dotat.at/</uri>
   </address>
  </author>

  <date month="June" year="2012"/>

  <area>Security</area>
  <workgroup>DNS-Based Authentication of Named Entities (DANE)</workgroup>

  <abstract>

   <t>This specification describes the effect that DNSSEC has on
    SRV-based autoconfiguration and TLS certificate verification in
    the mail user agent protocols IMAP, POP3, and message submission.
    It also describes how to use TLSA DNS records to provide stronger
    authentication of server TLS certificates.</t>

  </abstract>

 </front>

 <middle>

<!-- === -->

  <section anchor="intro" title="Introduction">

   <t>The mail user agent protocols IMAP <xref target="RFC3501"/>,
    POP3 <xref target="RFC1939"/>, and message submission
    <xref target="RFC4409"/> support upgrade from cleartext to TLS
    <xref target="RFC5246"/>. The STARTTLS command is part of the core
    IMAP specification <xref target="RFC3501"/>. Message submission is
    a profile of SMTP <xref target="RFC5321"/> for which there is a
    STARTTLS extension <xref target="RFC3207"/>. In POP3 the
    equivalent command is STLS <xref target="RFC2595"/>. IMAP and POP3
    are also often deployed using TLS-on-connect on alternate TCP
    ports.</t>

   <t><xref target="RFC6186"/> specifies how an MUA can use SRV
    records to automatically locate mail server host names given the
    user's mail domain. <xref target="srv"/> of this specification
    updates <xref target="RFC6186"/> to clarify how MUAs handle mail
    server SRV records and TLS negotiation in the presence and absence
    of DNSSEC.</t>

   <t><xref target="tlsa"/> of this specification describes how to
    use TLSA DNS records <xref target="I-D.ietf-dane-protocol"/> to
    provide stronger authentication of server TLS certificates. We
    also use the existance of a TLSA record to signal to the MUA that
    it can expect the server to offer TLS.</t>

   <t>In the rest of this memo, the key words "MUST", "MUST NOT",
    "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
    "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as
    described in <xref target="RFC2119"/>.</t>

  </section>

<!-- === -->

  <section anchor="srv" title="DNSSEC, TLS, and mail server SRV records">

   <t>When negotiating TLS, the MUA MUST use the Server Name
    Indication extension (TLS SNI) <xref target="RFC6066"/> with its
    preferred name as defined below. This is a stricter requirement
    than <xref target="RFC6186"/>.</t>

   <t>When a security-aware MUA looks up <xref target="RFC6186"/> SRV
    records, it SHALL take note of the DNSSEC status
    <xref target="RFC4033"/> of each record. It constructs the list of
    reference identifiers for verifying each server's TLS certificate
    <xref target="RFC6125"/> and chooses the preferred name for TLS
    SNI as follows:

    <list style="hanging">

     <t hangText="bogus:"> The MUA MUST abort. (If this occurs during
      auto-configuration, it might fall back to a manual setup
      procedure.)</t>

     <t hangText="insecure or indeterminate:"> The reference
      identifiers SHALL include the source domain (i.e. the user's
      mail domain) and MUST NOT include the derived domain (i.e. the
      SRV target host name). The source domain is the preferred name
      for TLS SNI.</t>

     <t hangText="secure:"> The reference identifiers SHALL include
      both the source domain (i.e. the user's mail domain) and the
      derived domain (i.e. the SRV target host name). The derived
      domain is the preferred name for TLS SNI.</t>

   </list></t>

  </section>

<!-- === -->

  <section anchor="tlsa" title="Mail server TLSA records">

   <t>MUAs SHALL look up the TLSA record(s) for a mail server using
    its host name and port number, as described in section 3 of
    <xref target="I-D.ietf-dane-protocol"/>. The MUA MUST only do this
    if the host name and port number have been obtained securely, from
    the "target" and "port" fields of a SRV record that is secure as
    described in the previous section, or from user configuration.</t>

   <t>If a TLSA record is usable as described in section 4.1 of
    <xref target="I-D.ietf-dane-protocol"/>, then the server MUST
    support TLS. It MUST present a certificate that matches the TLSA
    record and that authenticates the server host name.</t>

   <t>When an MUA is configuring itself as described in section 4 of
    <xref target="RFC6186"/>, it SHOULD use the presence of a TLSA
    record to indicate that use of TLS is obligatory when connecting
    to the corresponding server.</t>

  </section>

<!-- === -->

  <section title="Guidance for mail service providers">

   <t>A mail server that is the target of an <xref target="RFC6186"/>
    SRV record MUST have a TLS certificate that authenticates the SRV
    owner domain (i.e. the user's mail domain). This is necessary for
    clients that cannot perform DNSSEC validation. This certificate
    MUST be the default that is presented if the client does not use
    the TLS Server Name Indication extension (TLS SNI)
    <xref target="RFC6066"/>.</t>

   <t>In order to support this specification, the mail server MUST
    also have a certificate that authenticates the SRV target domain
    (the mail server hostname). This can be done using a multi-name
    certificate or by using the client's TLS SNI to select the
    appropriate certificate. The mail server's TLSA record MUST
    correspond to this certificate.</t>

   <t>Note: old pre-<xref target="RFC6186"/> clients expect a mail
    server's TLS certificate to authenticate its host name; they are
    also unlikely to support SNI. This means that servers for old
    clients need a different default certificate from
    <xref target="RFC6186"/> servers. If the server does not have a
    certificate that authenticates all relevant names, it is necessary
    to segregate old and new clients. This can be done by using
    different target hosts or non-standard ports in the SRV targets.
    (The latter avoids the need for yet more certificates.)</t>

  </section>

<!-- === -->

  <section title="Guidance for mail server software authors">

   <t>In order to support this specification, mail server software
    MUST implement the TLS Server Name Indication extension
    <xref target="RFC6066"/> for selecting the appropriate
    certificate.</t>

  </section>

<!-- === -->

  <section anchor="security" title="Security considerations">

   <t>The MUA autoconfiguration specification <xref target="RFC6186"/>
    does not have a complete mechanism for signalling whether a server
    supports TLS. IMAP and POP3 have alternate TLS-on-connect ports,
    but not message submission. This gap is filled by using the
    presence of TLSA records to indicate that a client can expect a
    server to support TLS. This prevents a downgrade attack.</t>

   <t>The guidance in <xref target="srv"/> is mostly a straightforward
    consequence of the requirements set out in
    <xref target="RFC6125"/> and <xref target="RFC6186"/>.</t>

  </section>

<!-- === -->

  <section title="Internationalization Considerations">

   <t>If any of the DNS queries are for an internationalized domain
    name, then they need to use the A-label form
    <xref target="RFC5890"/>.</t>

  </section>

<!-- === -->

  <section title="IANA Considerations">

   <t>No IANA action is needed.</t>

  </section>

<!-- === -->

 </middle>

 <back>

<!-- === -->

  <references title="Normative References">

   &rfc1939; <!-- POP3 -->
   &rfc2119; <!-- MUSTard MAYo -->
   &rfc2595; <!-- POP3 STLS -->
   &rfc3207; <!-- SMTP STARTTLS extension -->
   &rfc3501; <!-- IMAP -->
   &rfc4033; <!-- DNSSEC overview -->
   &rfc4409; <!-- Mesasge submission -->
   &rfc5321; <!-- ESMTP -->
   &rfc5246; <!-- TLS 1.2 -->
   &rfc5890; <!-- IDNA -->
   &rfc6066; <!-- TLS extensions -->
   &rfc6125; <!-- certificate verification -->
   &rfc6186; <!-- SRV for mail clients -->

   <reference anchor="I-D.ietf-dane-protocol">
    <front>
     <title>The DNS-Based Authentication of Named Entities (DANE)
      Transport Layer Security (TLS) Protocol: TLSA</title>
     <author initials="P" surname="Hoffman" fullname="Paul Hoffman" />
     <author initials="J" surname="Schlyter" fullname="Jakob Schlyter" />
     <date year="2012" month="May" day="17" />
    </front>
    <seriesInfo name="Internet-Draft" value="draft-ietf-dane-protocol-23" />
    <format type="TXT"
     target="http://www.ietf.org/internet-drafts/draft-ietf-dane-protocol-23.txt" />
    <format type="HTML"
     target="http://tools.ietf.org/html/draft-ietf-dane-protocol-23" />
   </reference>

   </references>

<!-- === -->

  <references title="Informative References">

   <reference anchor="I-D.fanf-dane-smtp">
    <front>
     <title>Secure SMTP with TLS, DNSSEC and TLSA records.</title>
     <author initials="T." surname="Finch" fullname="Tony Finch" />
     <date year="2012" month="June" day="6" />
    </front>
    <seriesInfo name="Internet-Draft" value="draft-fanf-dane-smtp-03" />
    <format type="TXT"
     target="http://www.ietf.org/internet-drafts/draft-fanf-dane-smtp-03.txt" />
    <format type="HTML"
     target="http://tools.ietf.org/html/draft-fanf-dane-smtp-03" />
   </reference>

   <reference anchor="I-D.miller-xmpp-dnssec-prooftype">
    <front>
     <title>Using DNSSEC and DANE as a Prooftype for XMPP Delegation</title>
     <author initials="M." surname="Miller" fullname="Matthew Miller" />
     <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre" />
     <date year="2012" month="June" day="8" />
    </front>
    <seriesInfo name="Internet-Draft" value="draft-miller-xmpp-dnssec-prooftype-01" />
    <format type="TXT"
     target="http://www.ietf.org/internet-drafts/draft-miller-xmpp-dnssec-prooftype-01.txt" />
    <format type="HTML"
     target="http://tools.ietf.org/html/draft-miller-xmpp-dnssec-prooftype-01" />
   </reference>

  </references>

<!-- === -->

  <section title="Rationale - where to put TLSA records">

   <t>The long-term goal of this specification is to settle on TLS
    certificates that verify the server host name rather than the mail
    domain, since this is more convenient for servers hosting multiple
    domains and scales up more easily to larger numbers of
    domains.</t>

   <t>There are a number of other reasons for doing it this way:
    <list style="symbols">

     <t>The certificate is part of the server configuration, so it
      makes sense to associate it with the server name rather than the
      mail domain.</t>

     <t>When the server certificate is replaced it is much easier if
      there is one part of the DNS that needs updating to match,
      instead of an unbounded number of hosted mail domains.</t>

     <t>The same TLSA records work with and without
      <xref target="RFC6186"/> SRV records.</t>

     <t>Consistency with <xref target="I-D.fanf-dane-smtp"/> and
      <xref target="I-D.miller-xmpp-dnssec-prooftype"/>.</t>

   </list></t>

   <t>There is no option to put TLSA records under the mail domain in
    order to keep the specification simple and to make it easier to
    deploy correctly.</t>

   <t>The disadvantage is that the expected certificate differs
    between pure <xref target="RFC6186"/> clients and clients that are
    implemented to this spec. This means that Server Name Indication
    support is necessary for backwards compatibility.</t>

  </section>

<!-- === -->

 </back>

</rfc>
