<?xml version="1.0" encoding="US-ASCII"?>
<!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 RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC4035 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4035.xml">
<!ENTITY RFC4985 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4985.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 RFC6125 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6125.xml">
<!ENTITY RFC6347 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml">
<!ENTITY RFC6698 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6698.xml">
<!ENTITY RFC7218 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7218.xml">
<!ENTITY RFC7250 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7250.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.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-huque-dane-client-cert-01" ipr="trust200902" updates="6698">
  <!-- 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>
    <title abbrev="TLSA client certificates">Client Certificates in DANE TLSA Records</title>

    <author fullname="Shumon Huque" initials="S." surname="Huque">
      <organization>Verisign Labs</organization>
      <address>
        <email>shuque@verisign.com</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Dan James" initials="D." surname="James">
      <organization>Verisign, Inc.</organization>
      <address>
        <email>djames@verisign.com</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Viktor Dukhovni" initials="V." surname="Dukhovni">
      <organization>Two Sigma</organization>
      <address>
        <email>ietf-dane@dukhovni.org</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date day="05" month="July" year="2015" />

    <!-- Meta-data Declarations -->

    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>DANE</keyword>
    <keyword>DNSSEC</keyword>
    <keyword>Authentication</keyword>
    <keyword>Client Certificate</keyword>
    <keyword>X.509 Certificate</keyword>
    <keyword>Raw Public Key</keyword>

    <abstract>
      <t>The current <xref target="RFC6698">DNS TLSA record format</xref>
      describes how to specify TLS server certificates or their public keys 
      in the DNS. This document makes a narrowly focused update to RFC 6698.
      It describes how to additionally use the TLSA record to specify 
      client certificates, and also the rules and considerations for using 
      them with the TLS protocol.
      </t>
    </abstract>
  </front>


  <middle>


    <section title="Introduction and Motivation">
      <t>
	The <xref target="RFC5246">Transport Layer Security (TLS) 
	protocol</xref> optionally supports the
	authentication of clients using 
	<xref target="RFC5280">X.509 certificates</xref>. TLS Applications
	currently employing DANE authentication of servers using TLSA records 
	may also desire to authenticate clients using the same mechanism,
	especially if the client identity is in the form of or can be 
	represented by a DNS domain name. Some design patterns from the 
	Internet of Things (IoT) make use of this form of authentication,
	where large networks of physical objects identified by DNS
	names may authenticate themselves using TLS to centralized device
	management and control platforms.
      </t>
      <t>
	In this document, the term TLS is used generically to describe
	both the TLS and 
	<xref target="RFC6347">DTLS (Datagram Transport Layer Security) 
	</xref> protocols.
      </t>
    </section>


    <section title="Associating Client Identities in TLSA Records"
	     anchor="owner_format">
      <t>
	When specifying client identities (i.e. client domain names) in
	TLSA records, the owner name of the TLSA record has the following
	format:
      </t>
      <figure>
        <artwork><![CDATA[

_service.[client-domain-name]
  	]]></artwork>
      </figure>
      <t>
	The first label identifies the application service name. The
	remaining labels are composed of the client domain name.
      </t>
      <t>
	Encoding the application service name into the owner name allows
	the same client domain name to have different authentication
	credentials for different application services. There is no need
	to encode the transport label - the same name form is usable with
	both TLS and DTLS.
      </t>
      <t>
	The _service label could be a custom string for an application,
	but more commonly is expected to be a service name registered in
	the <xref target="SRVREG">IANA Service Name Registry</xref>.
      </t>
      <t>
	The RDATA or data field portion of the TLSA record is formed 
	exactly as specified in RFC 6698, and carries the same meaning.
      </t>
    </section>


    <section title="Authentication Model" anchor="auth_model">
      <t>
	The authentication model assumed in this document is the following:
      </t>
      <t>
	The client is assigned an identity corresponding to a DNS
	domain name. This domain name doesn't necessarily have any 
	relation to its network layer addresses. Clients often
	have dynamic or unpredictable addresses, and may move around 
	the network, so tying their identity to network addresses is 
	not feasible or wise in the general case.
      </t>
      <t>
	The client generates (or has generated for it) a private and 
	public key pair, and a certificate binding the name to its 
	public key. This certificate has a corresponding TLSA record 
	published in the DNS, which allows it to be authenticated
	directly via the DNS (using the DANE-TA or DANE-EE usage modes) 
	or via a PKIX public CA system constraint (using the PKIX-TA or
	PKIX-EE usage modes).
      </t>
    </section>


    <section title="Client Identifiers in X.509 certificates"
	     anchor="cert_id">
      <t>
	The client certificate MUST have have the client's DNS name 
	specified in the Subject Alternative Name extension's dNSName 
	type. Or, if an application specific identity is preferred or
	needed, the SRV-ID (PKIX OtherName SRVName) MUST be used to 
	specify the application service and the client's name, e.g.
	"_smtp-client.device1.example.com". See <xref target="RFC6125" />
	and <xref target="RFC4985" /> for a discussion of application 
	specific identifiers in X.509 certificates.
      </t>
      <t>
	The initial revision of this document talks mainly about
	dNSName identifiers, because SRV-ID has not seen much
	adoption in the Internet to date. However, with TLSA usage modes 
	except for DANE-EE, if there is a need to isolate multiple 
	application specific credentials from each other on the same
	client (i.e. with the same underlying base domain name), then
	SRV-ID would need to be employed.
      </t>
    </section>


    <section title="Signaling the Client's DANE Identity in TLS"
	     anchor="client_signal">
      <t>
	The protocol described in the initial version of this document
	assumes either that client authentication is mandatory, or that 
	where it is optional, clients can handle a Client Certificate 
	Request message from the server without issues if they are not 
	equipped with client certificates. Technically, the TLS protocol 
	specification states that the client may respond with a Client 
	Certificate message with no certificate, and that the server may 
	at its discretion continue the handshake without client 
	authentication. However in practice, problems may arise. There
	are deployed client software implementations that do not react 
	gracefully when encountering a certificate request that they did 
	not expect. 
      </t>
      <t>
	More importantly, a server may want an explicit indication
	from the client that it has a DANE record, so as to avoid 
	unnecessary DNS queries in-band with the TLS handshake for
	clients that don't support this.
      </t>
      <t>
	Hence, to address this issue generally, a client identity 
	signaling solution will need to be devised, whereby the 
	client indicates its DANE identity (i.e. its domain name 
	identity and the fact that this identity has an associated 
	TLSA record) to the server. Application specific protocol 
	enhancements are one way to achieve this, e.g. a new SMTP 
	command. A more general way would be to develop a new TLS 
	extension to convey this information.
      </t>
      <t>
	[Another internet draft is currently being written to define 
	such a TLS extension to convey DANE client identity.]
      </t>
    </section>


    <section title="Example TLSA records for clients">

      <t>
	The following examples are provided in the textual presentation 
	format of the TLSA record.
      </t>
      <t>
	An example TLSA record for the client "device1.example.com." and
	the application "smtp-client". This record specifies the SHA-256 hash
	of a PKIX CA certificate to authenticate the client's certificate.
      </t>
      <figure>
        <artwork><![CDATA[

_smtp-client.device1.example.com. IN TLSA (
   0 0 1 d2abde240d7cd3ee6b4b28c54df034b9
         7983a1d16e8a410e4561cb106618e971 )
  	]]></artwork>
      </figure>

      <t>
	An example TLSA record for the client "client2.example.com." and
	the application "localsvc". This record specifies the SHA-512 hash 
	of the subject public key component of the client's certificate. 
	The usage mode for this record is 3 (DANE-EE) and hence no PKIX 
	validation for this certificate should be performed.
      </t>

      <figure>
        <artwork><![CDATA[

_localsvc.client2.example.com. IN TLSA (
   3 1 2 0f8b48ff5fd94117f21b6550aaee89c8
         d8adbc3f433c8e587a85a14e54667b25
         f4dcd8c4ae6162121ea9166984831b57
         b408534451fd1b9702f8de0532ecd03c )
  	]]></artwork>
      </figure>
    </section>


    <section title="Changes to Client and Server behavior" anchor="changes">

      <t>
	[Note: As the client identity signaling solution is developed, 
	 this section will undergo enhancements to use it. A future
	 revision of this document will explicitly address the additional
	 use case of raw public keys instead of X.509 certificates.]
      </t>

      <t>
	A TLS Client conforming to this specification MUST
	have a signed DNS TLSA record published corresponding to 
	its DNS name and X.509 certificate. The client 
	presents this certificate in the TLS handshake with the 
	server. The presented client certificate MUST have have 
	the client's DNS name specified either in the 
	Subject Alternative Name extension's dNSName type, 
	or the SRVName type.
      </t>

      <t>
	A TLS Server implementing this specification performs the 
	following steps:

	<list counter="reqs" hangIndent="4" style="format S%d">

	  <t>Request a client certificate in the TLS handshake (the
	  "Client Certificate Request" message).</t>

	  <t>Extract the client identity from the Subject Alternative
	  Name extension's dNSName or SRVName type in the client certificate.
	  (If no client certificate is provided, then the server may
	  terminate the connection, or at its discretion may continue 
	  the handshake without client authentication.)</t>

	  <t>Construct the DNS query name for the corresponding TLSA
	  record. For dNSName, the underscored application service label
	  is prepended to the domain name, corresponding to the application
	  in use. For SRVName, the DNS query name is identical to the
	  content of the SRVName identifier. See 
	  <xref target="owner_format" /> for the proposed owner name 
	  format.</t>

	  <t>Look up the TLSA record in the DNS. The response MUST be
	  cryptographically validated using DNSSEC. The server could
	  perform the DNSSEC validation itself. It could also be
	  configured to trust responses obtained via a validating 
	  resolver to which it has a secure connection.</t>

	  <t>Extract the RDATA of the TLSA record and match it to the
	  presented client certificate according to the rules specified
	  in the <xref target="RFC6698">DANE TLS protocol</xref>.
	  If successfully matched, the client is authenticated and
	  the TLS session proceeds. If not, the session is terminated
	  with a "bad_certificate" alert message.</t>

	  <t>If there are multiple records in the TLSA record set,
	  then the client is authenticated as long as at least one of 
	  the TLSA records matches.</t>

	</list>
      </t>

      <t>
	If the presented client certificate has  multiple
	distinct reference identifier types (e.g. a dNSName, and an
	rfc822Name) then TLS servers configured to perform DANE 
	authentication according to this specification should only 
	examine and authenticate the dNSName or SRVName identity. 
	If the certificate contains both dNSName and SRVName identities,
	SRVName should be preferred. See 
	<xref target="RFC6125" /> for a description of reference
	identifiers and matching rules.
      </t>

      <t>
	If the presented client certificate has multiple dNSName
	or SRVName identities, then the client MUST use an identity 
	signalling mechanism to indicate the intended name to the 
	server.
      </t>

      <t>
	Specific applications may be designed to require more detailed 
	validation steps. For example, a server might want to verify the 
	client's IP address is associated with the certificate in some 
	manner, e.g. by confirming that a secure reverse DNS lookup of 
	that address ties it back to the same domain name, or by requiring 
	an iPAddress component to be included in the certificate. Such
	details are outside the scope of this document, and should be
	outlined in other documents specific to the applications that
	require this behavior.
      </t>

      <t>
	Servers may have their own whitelisting and authorization rules
	for which certificates they accept. For example a TLS server may
	be configured to only allow TLS sessions from clients with 
	certificate identities within a specific domain or set of domains.
      </t>

    </section>


    <section title="Raw Public Keys" anchor="raw_keys">
      <t>
	This specification can also support the use of 
	<xref target="RFC7250">raw public keys in TLS</xref>.
	This use case employs only usage mode 3 (DANE-EE) and a
	selector value of 1 (SPKI) in the DANE TLSA record, as 
	described in <xref target="DANEOPS" />. It requires the
	use of the new client identity signaling solution discussed
	previously.
      </t>
    </section>


    <section title="Open Issues" anchor="open_issues">
      <t>
	Should this document also consider client identities in the form
	of e-mail addresses? The use case might be an SMTP client talking
	to an SMTP submission server. In that case, the email address of a
	user would most likely be conveyed in the certificate in a subject 
	alt name rfc822Name type. The corresponding TLSA record would have 
	to then have an owner name format similar to the OPENPGPKEY or SMIMEA
	records. This use case might be best left to the SMIMEA specification 
	to consider.
      </t>
    </section>


    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>
	This document benefited from discussions with the following 
	people: Duane Wessels, Allison Mankin, Casey Deccio, and Warren 
	Kumari.
      </t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document includes no request to IANA.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>
	This document makes a narrow update to RFC 6698 by defining the 
	usage of the TLSA record for client TLS certificates. There are 
	no security considerations for this document beyond those described 
	in RFC 6698 and in the specifications for TLS and DTLS [RFC5246], 
	[RFC6347].
      </t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references title="Normative References">
      &RFC4035;
      &RFC4985;
      &RFC5246;
      &RFC5280;
      &RFC6125;
      &RFC6347;
      &RFC6698;
      &RFC7218;
      &RFC7250;
    </references>

    <references title="Informative References">
      &RFC3552;
      <reference anchor="SRVREG"
        target="https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt">
	<front>
          <title>Service Name and Transport Protocol Port Number Registry</title>
          <author fullname="IANA" surname="IANA" />
	</front>
      </reference>
    <reference anchor="DANEOPS"
      target="https://tools.ietf.org/html/draft-ietf-dane-ops">
      <front>
        <title>Updates to and Operational Guidance for the DANE Protocol</title>
        <author fullname="Viktor Dukhovni" initials="V" surname="Dukhovni" />
      </front>
    </reference>
    </references>
  </back>

</rfc>
