<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3207 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3207.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY RFC5246 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY RFC5280 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml">
<!ENTITY RFC5321 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5321.xml">
<!ENTITY RFC6698 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6698.xml">
<!ENTITY RFC7001 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7001.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-martin-authentication-results-tls-03" ipr="trust200902" updates="7001">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Auth-Results TLS Registration">Authentication-Results Registration for TLS</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Franck Martin" initials="F.M." role="editor"
            surname="Martin">
      <organization>LinkedIn</organization>

      <address>
        <postal>
          <street></street>

          <!-- Reorder these if your country does things differently -->

          <city>Mountain View</city>

          <region>CA</region>

          <code></code>

          <country>US</country>
        </postal>

        <phone></phone>

        <email>fmartin@linkedin.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date month="December" year="2014" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>apparea</area>

    <workgroup>Network Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>SMTP</keyword>
    <keyword>TLS</keyword>
    <keyword>STARTTLS</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>This memo updates the registry of properties in Authentication-Results: message header fields to allow relaying of the results of an email sent using <xref target="RFC3207">STARTTLS</xref> or not.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t><xref target="RFC3207">STARTTLS</xref> defines how to send an email over an <xref target="RFC5321">SMTP</xref> encrypted session between two mail servers.</t>

      <t>This memo thus registers an additional reporting property allowing a TLS result to be relayed as an annotation in a message header.</t>

      <section title="Requirements Language">
        <t>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 <xref
        target="RFC2119">RFC 2119</xref>.</t>
      </section>

      <section title="Discussion">
        <t><xref target="RFC3207">STARTTLS</xref> defines how to send an email over an encrypted session between two mail servers, Message Transfer Agent (MTA), using the <xref target="RFC5246">TLS</xref> protocol.</t>
        <t>Most of these exchanges are opportunistic, meaning a best effort is done to establish an encrypted message exchange regardless of the strength of the cipher or the validity of the certificates used. However, the results of this negotiation should be recorded in the message via the <xref target="RFC7001">Authentication-Results header</xref> to indicate to other message processing algorithms, including Messaging User Agents (MUA), how securely this message was transmitted from the MTA client to the MTA server.</t>
        <t>The concept of authentication here is related to the presentation of a certificate which is verified valid by a set of trusted Certificate Authorithies (CA), via <xref target="RFC6698">DANE</xref> or by local policy. This does not indicate that any string in the certificate is related to any string in the email.</t> 
        <t>The usage and usefulness of the Authentication-Results header is discussed in <xref target="RFC7001"></xref>.</t>
      </section>
    </section>

    <section title="Definitions">
      <t>This memo adds to the "Email Authentication Methods" registry, created by IANA upon publication of <xref target="RFC7001"></xref>, the following:</t>
      <t><list style="symbols">
        <t>The method "tls"; and</t>
        <t>Associated with that method, the properties (reporting items) "cert.client", "cert.server", "cert.verif", "tls.v", "key.ciphersuite", "key.fingerprint", "key.length" and "key.strength".</t>
      </list></t>
      <section title="results meaning">
        <t>The "tls" method can have the following results:</t>
        <t>none: the message was sent in clear.</t>
        <t>pass: the message was sent encrypted and the client certificate was verified valid either using a trusted CA, via <xref target="RFC6698">DANE</xref> or via a local policy and host identity was verified.</t>
        <t>selfsigned: the message was sent encrypted but the client certificate is self signed.</t>
        <t>invalidhost: the message was sent encrypted and the client certificate is verified valid but the host identity is invalid.</t>
        <t>fail: the message was sent encrypted but the client certificate is not valid. It is advised to use comments to indicate the nature of the problem like certifcate expired, not linked to a trusted CA,...</t>
        <t>temperror: the message was sent encrypted and the server was not able to verify the client certificate at this time. This may indicate for instance that the server could not fetch the CRL.</t>
        <t>permerror: the message was sent encrypted and the client certificate was not verified by the MTA server. MTA should always attempt to verify the client certificate.</t>
      </section>

      <section title="properties">
        <t>cert.client: the subject of the X.509 certificate used by the client to initiate TLS.</t>
        <t>cert.server: the subject of the X.509 certificate used by the server to initiate TLS (optional).</t>
        <t>cert.clientalt: the subject alternative name of the X.509 certificate used by the client to initiate TLS (optional).</t>
        <t>cert.serveralt: the subject alternative name of the X.509 certificate used by the server to initiate TLS (optional).</t>
        <t>cert.clientissuer: the issuer of the X.509 certificate used by the client to initiate TLS (optional).</t>
        <t>cert.serverissuer: the issuer of the X.509 certificate used by the server to initiate TLS (optional).</t>
        <t>cert.verif: the type of certification performed: CA, <xref target="RFC6698">DANE</xref>, LOCAL (optional).</t>
        <t>tls.v: the protocol version used to encrypt SSL2.0, SSL3.0, TLS1.0, TLS1.1,... (optional)</t>
        <t>key.ciphersuite: the description of the TLS cipher suite used as defined in the IANA cipher suite registry.</t>
        <t>key.fingerprint: the fingerprint of the key used (optional).</t>
        <t>key.length: the length in bits of the key used (optional).</t>
        <t>key.strength: as many SMTP TLS are opportunistic in nature this property is an arbitrary value set by the MTA server to indicate the strength of the encryption (optional).</t>
        <t>While ciphers strength vary overtime, and key length in bits does not indicate a comparable strength between various cyphers, it may be difficult for all the processors of the authentication-results header to redo the analysis based on the cipher used and all to arrive to the same conclusion. It seems, therefore, best if the receiving MTA does that analysis and communicate it to the other layers. This is the purpose of the key.strength. For instance This value could be used by the MUA to indicate to the end user some quality of the encryption channel.</t>
      </section>

    </section>

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>Per [IANA], the following items have been added to the "Email Authentication Methods" registry:</t>
      <figure>
      <artwork><![CDATA[
   +----------+----------+--------+----------------+------------------+
   |  Method  | Defined  | ptype  | property       | value            |
   +----------+----------+--------+----------------+------------------+
   |   tls    | RFC 3207 | cert   | client         | subject of       |
   |          |          |        |                | client           |
   |          |          |        |                | certificate      |
   |          |          |        |                | section 4.1.2.6  |
   |          |          |        |                | of RFC 5280      |
   +----------+----------+--------+----------------+------------------+
   |   tls    | RFC 3207 | cert   | server         | subject of       |
   |          |          |        |                | server           |
   |          |          |        |                | certificate      |
   |          |          |        |                | section 4.1.2.6  |
   |          |          |        |                | of RFC 5280      |
   +----------+----------+--------+----------------+------------------+
   |   tls    | RFC 3207 | cert   | clientalt      | alternate subject|
   |          |          |        |                | of client        |
   |          |          |        |                | certificate      |
   |          |          |        |                | section 4.2.1.6  |
   |          |          |        |                | of RFC 5280      |
   +----------+----------+--------+----------------+------------------+
   |   tls    | RFC 3207 | cert   | serveralt      | alternate subject|
   |          |          |        |                | of server        |
   |          |          |        |                | certificate      |
   |          |          |        |                | section 4.2.1.6  |
   |          |          |        |                | of RFC 5280      |
   +----------+----------+--------+----------------+------------------+
   |   tls    | RFC 3207 | cert   | clientissuer   | issuer of        |
   |          |          |        |                | client           |
   |          |          |        |                | certificate      |
   |          |          |        |                | section 4.1.2.4  |
   |          |          |        |                | of RFC 5280      |
   +----------+----------+--------+----------------+------------------+
   |   tls    | RFC 3207 | cert   | serverissuer   | issuer of        |
   |          |          |        |                | server           |
   |          |          |        |                | certificate      |
   |          |          |        |                | section 4.1.2.4  |
   |          |          |        |                | of RFC 5280      |
   +----------+----------+--------+----------------+------------------+
   |   tls    | RFC 3207 | cert   | verif          | CA               |
   |          |          |        |                | DANE             |
   |          |          |        |                | LOCAL            |
   +----------+----------+--------+----------------+------------------+  
   |   tls    | RFC 3207 | tls    | v              | protocol         |
   |          |          |        |                | version          |
   |          |          |        |                | description      |
   |          |          |        |                | from RFC 5246    |
   +----------+----------+--------+----------------+------------------+  
   |   tls    | RFC 3207 | key    | ciphersuite    | IANA cipher      |
   |          |          |        |                | suite registry   |
   |          |          |        |                | description      |
   |          |          |        |                | from RFC 5246    |
   +----------+----------+--------+----------------+------------------+  
   |   tls    | RFC 3207 | key    | fingerprint    | key              |
   |          |          |        |                | fingerprint      |
   |          |          |        |                | from RFC 5246    |
   +----------+----------+--------+----------------+------------------+ 
   |   tls    | RFC 3207 | key    | length         | in bits          |
   +----------+----------+--------+----------------+------------------+ 
   |   tls    | RFC 3207 | key    | strength       | low              |
   |          |          |        |                | medium           |
   |          |          |        |                | high             |
   |          |          |        |                |                  |
   +----------+----------+--------+----------------+------------------+     
        ]]></artwork>
        </figure>

      <t>Also, the following items have been added to the "Email Authentication Result Names" registry:</t>
      <figure>
      <artwork><![CDATA[
   +-------------+--------------+------------+---------+---------------+
   |   Code      | Existing/New | Defined In | Method  | Meaning       |
   +-------------+--------------+------------+---------+---------------+
   | none        | existing     |  RFC 7001  | tls     | this memo     |
   |             |              |            | (added) |               |
   +-------------+--------------+------------+---------+---------------+
   | pass        | existing     |  RFC 7001  | tls     | this memo     |
   |             |              |            | (added) |               |
   +-------------+--------------+------------+---------+---------------+
   | selfsigned  | existing     |  RFC 7001  | tls     | this memo     |
   |             |              |            | (added) |               |
   +-------------+--------------+------------+---------+---------------+
   | invalidhost | existing     |  RFC 7001  | tls     | this memo     |
   |             |              |            | (added) |               |
   +-------------+--------------+------------+---------+---------------+
   | fail        | existing     |  RFC 7001  | tls     | this memo     |
   |             |              |            | (added) |               |
   +-------------+--------------+------------+---------+---------------+
   | temperror   | existing     |  RFC 7001  | tls     | this memo     |
   |             |              |            | (added) |               |
   +-------------+--------------+------------+---------+---------------+
   | permerror   | existing     |  RFC 7001  | tls     | this memo     |
   |             |              |            | (added) |               |
   +-------------+--------------+------------+---------+---------------+
      ]]></artwork>
    </figure>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This memo creates a mechanism for relaying <xref target="RFC3207">STARTTLS</xref> results using the structure already defined by <xref target="RFC7001"></xref>.  The Security Considerations sections of those documents should be consulted.</t>
      <t>By this mechanism, some identifiers of the client certificates gets to live pass the receiving MTA. This is a change in the sender expectation on where the client certificate is used</t> 
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->

      &RFC2119;

      &RFC3552;

      &RFC5321;

      &RFC3207;

      &RFC5246;

      &RFC5280;

      &RFC6698;

      &RFC7001;      

    </references>

    <references title="Informative References">

      &RFC5226;

    </references>

    <section anchor="app-additional" title="Authentication-Results Examples">
      <t>This section presents an example of the use of this new header field to indicate TLS results.</t>
      <section title="TLS Results">
        <figure>
          <preamble>A message that went over a successful TLS session:</preamble>
          <artwork><![CDATA[
Authentication-Results: mail-router.example.net;
  dkim=pass (good signature) header.d=newyork.example.com
    header.b=oINEO8hg;
  tls=pass (verified, expires 20140505)
    cert.verif=CA
    cert.client="CN=smtp.example.com,O=ACME,L=ToonTown,
      ST=CA,C=US"
    cert.clientalt="DNS:smtp.example.com, DNS:newyork.example.com"
    cert.clientissuer="C=US, O=AcmeCert Inc, CN=AcmeCert CA"
    key.ciphersuite=TLS_RSA_WITH_RC4_128_SHA
    tls.v=TLS1.0
    key.fingerprint="68:B3:29:DA:98:93:E3:40:99:C7:D8:
      AD:5C:B9:C9:40"
    key.length=128
    key.strength=MEDIUM;
Received: from newyork.example.com
  (newyork.example.com [192.0.2.250])
  by mail-router.example.net (8.11.6/8.11.6)
  for <recipient@example.net>
  with ESMTPS id i7PK0sH7021929;
  Fri, Feb 15 2002 17:19:22 -0800
DKIM-Signature: v=1; a=rsa-sha256; s=rashani;
  d=newyork.example.com;
  t=1188964191; c=relaxed/simple;
  h=From:Date:To:VBR-Info:Message-Id:Subject;
  bh=sEu28nfs9fuZGD/pSr7ANysbY3jtdaQ3Xv9xPQtS0m7=;
   b=oINEO8hgn/gnunsg ... 9n9ODSNFSDij3=
From: sender@newyork.example.com
Date: Fri, Feb 15 2002 16:54:30 -0800
To: meetings@example.net
Message-Id: <12345.abc@newyork.example.com>
Subject: here's a sample
            ]]></artwork>
        </figure>
      </section>
    </section>

  </back>
</rfc>
