<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<?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 xmlns:xi="http://www.w3.org/2001/XInclude"
        category="std" consensus="true"
        docName="draft-ietf-dance-client-auth-06"
        ipr="trust200902" updates="6698,7671" obsoletes=""
        submissionType="IETF" xml:lang="en"
        tocInclude="true" tocDepth="4"
        symRefs="true" sortRefs="true" version="3">

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

  <front>

    <title abbrev="TLSA client authentication">TLS Client Authentication via DANE TLSA records</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-dance-client-auth-06"/>
    <author fullname="Shumon Huque" initials="S." surname="Huque">
      <organization>Salesforce</organization>
      <address>
        <email>shuque@gmail.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="07" month="11" year="2024"/>
    <!-- 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 DANE TLSA protocol <xref target="RFC6698" format="default"/> <xref target="RFC7671" format="default"/>
      describes how to publish Transport Layer Security (TLS) server
      certificates or public keys in the DNS. This document updates RFC
      6698 and RFC 7671.
      It describes how to additionally use the TLSA record to publish
      client certificates or public keys, and also the rules and
      considerations for using them with TLS.
      </t>
    </abstract>

  </front>

  <middle>

    <section numbered="true" toc="default">
      <name>Introduction and Motivation</name>
      <t>
	The Transport Layer Security (TLS) protocol <xref target="RFC5246" format="default"/>
        <xref target="RFC8446" format="default"/> optionally supports the authentication of
        clients using <xref target="RFC5280" format="default">X.509 certificates</xref> or
	<xref target="RFC7250" format="default">raw public keys</xref>. TLS applications
	that perform 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) plan to 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. Other potential applications
        include authenticating the client side of SMTP transport security.
      </t>
      <t>
        A more detailed treatment of application architectures for DANE
        client authentication is provided in
        <xref target="DANCEARCH" format="default">
        "An Architecture for DNS-Bound Client and Sender Identities"</xref>.
      </t>
      <t>
	In this document, the term TLS is used generically to describe
	both the TLS and
	<xref target="RFC6347" format="default">DTLS (Datagram Transport Layer Security)
        </xref> protocols.
      </t>
    </section>

    <section anchor="owner_format" numbered="true" toc="default">
      <name>Associating Client Identities in TLSA Records</name>
      <t>
        Different applications may have quite different conventions
        for naming clients via domain names. This document thus does not
        proscribe a single format, but mentions a few that may have
        wide applicability.
      </t>

      <section anchor="owner_format1" numbered="true" toc="default">
        <name>Format 1: Service specific client identity</name>

        <t>
          In this format, the owner name of the client TLSA record
          has the following structure:
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[

[_service].[client-domain-name]
  	]]></artwork>
        <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" format="default">IANA Service Name Registry</xref>.
        </t>
        <t>
	  The RDATA or data field portion of the TLSA record is formed
	  exactly as specified in <xref target="RFC6698"/> and
        <xref target="RFC7671" format="default"/>, and carries the
	  same meaning.
        </t>
      </section>

      <section anchor="owner_format2" numbered="true" toc="default">
        <name>Format 2: DevId: IOT Device Identity</name>
        <t>
          The DevID form of the TLSA record has the following structure:
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[

[devicename]._device.[org-domain-name]
        ]]></artwork>
        <t>
          It is loosely based on the proposed
          <xref target="CERTDEVID">PKI Certificate Identifier Format
          for Devices</xref>, but is simpler in form. It makes no
          distinction between manufacturer issued and locally issued
          certificates, and does away with the "serial" and "type"
          labels. The "_device"
          label that precedes the organization domain name allows all
          the device identities to be delegated to a subzone or to another
          party.
        </t>
      </section>

    </section>

    <section anchor="auth_model" numbered="true" toc="default">
      <name>Authentication Model</name>
      <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 has a private and public key pair. Where client
        certificates are being used, the client also has a certificate
        binding the name to its public key.
	The certificate or public key 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 certificate
	usage modes) or via a PKIX public CA system constraint if the
        client's certificate was issued by a public CA (using  the PKIX-TA
        or PKIX-EE DANE usage modes).
      </t>
    </section>

    <section anchor="cert_id" numbered="true" toc="default">
      <name>Client Identifiers in X.509 certificates</name>
      <t>
	If the TLS DANE Client Identity extension
	(see <xref target="client_signal" format="default"/>) is not being used, the
	client certificate MUST have have the client's DNS name
	specified in the Subject Alternative Name extension's dNSName
	type.
      </t>
      <t>
	If the TLS DANE Client Identity extension is in use, then with
	DANE-EE(3), the subject name need not be present in the certificate.
      </t>
    </section>

    <section anchor="client_signal" numbered="true" toc="default">
      <name>Signaling the Client's DANE Identity in TLS</name>
      <t>
	The client SHOULD explicitly signal that it has a DANE identity.
        The most important reason is that the 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.
      </t>
      <t>
        The <xref target="TLSCLIENTID" format="default">DANE Client Identity TLS
        extension</xref> is used for this purpose. This extension can also
        be used to convey the actual DANE client identity (i.e. domain name)
        that the TLS server should attempt to authenticate. This is required
        when using TLS raw public key authentication, since there is no
        client certificate from which to extract the client's DNS identity.
        It is also helpful when the client certificate contains multiple
        identities, and only a specific one has a DANE record.
      </t>
      <t>
	An additional case where such client signaling is helpful, is
        one where DANE client authentication is optional, and there is a
        population of buggy client software that does not react gracefully
        to receipt of a Certificate Request message from the TLS server.
        This extension allows TLS servers to deal with this situation by
        selectively sending a Certificate Request message only to clients
        that have sent this extension.
      </t>
    </section>

    <section numbered="true" toc="default">
      <name>Example TLSA records for clients</name>
      <t>
	The following examples are provided in the textual presentation
	format of the TLSA record.
      </t>

      <section numbered="true" toc="default">
        <name>Format 1: Service Specific Client Identity</name>
        <t>
	  An example TLSA record for the client "device1.example.com." and
	  the application "smtp-client". This record specifies the SHA-256 hash
	  of the subject public key component of the end-entity certificate
	  corresponding to the client. The certificate usage for this record
	  is 3 (DANE-EE) and thus is validated in accordance with section
	  5.1 of RFC 7671.
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[

_smtp-client.device1.example.com. IN TLSA (
   3 1 1 d2abde240d7cd3ee6b4b28c54df034b9
         7983a1d16e8a410e4561cb106618e971 )
  	]]></artwork>
      </section>

      <section numbered="true" toc="default">
        <name>Format 2: DevID</name>
        <t>
	  An example TLSA record for the device named "sensor7" managed
          by the organization "example.com" This record specifies the
          SHA-512 hash of the subject public key component of an EE
          certificate corresponding to the client.
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[

sensor7._device.example.com. IN TLSA (
   3 1 2 0f8b48ff5fd94117f21b6550aaee89c8
         d8adbc3f433c8e587a85a14e54667b25
         f4dcd8c4ae6162121ea9166984831b57
         b408534451fd1b9702f8de0532ecd03c )
  	]]></artwork>
        <t>
	  The example below shows a wildcard TLSA record mapped to a
          TLSA record with a DANE-TA usage mode. This allows all client
          identifiers matching the wildcard to be authenticated by client
          certificates issued by an organization managed Certification
          Authority.
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[

*._device.example.com. IN TLSA (
   2 0 1 20efa254ecd5b646e701211095bc3fe4
         423e21941b0b29efb21da57ec944a9b5 )
  	]]></artwork>
      </section>

    </section>

    <section anchor="changes" numbered="true" toc="default">
      <name>Changes to Client and Server behavior</name>
      <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 or public key. The client
	presents this certificate or public key in the TLS handshake
	with the server. The client should not offer ciphersuites
	that are incompatible with its certificate or public key.
	If the client's certificate has a DANE record with a certificate
	usage other than DANE-EE, then the presented client certificate
	MUST have have the client's DNS name specified in the
	Subject Alternative Name extension's dNSName type.
      </t>
      <t>
	Additionally, when using raw public key authentication, the client
        MUST send the <xref target="TLSCLIENTID" format="default">TLS DANE
        Client Identity extension</xref> in its Client Hello message. When
        using X.509 certificate authentication, it SHOULD send this extension.
      </t>
      <t>
        A TLS Server implementing this specification performs the
	following steps:

      </t>
      <ul spacing="normal">
        <li>Request a client certificate in the TLS handshake (the
	  "Client Certificate Request" message). This could be done
	  unconditionally, or only when it receives the TLS DANE
	  Client Identity extension from the client.</li>
        <li>If the client has sent a non-empty DANE Client Identity extension,
	  then extract the client's domain name from the extension.
	  Otherwise, extract the client identity from the Subject Alternative
	  Name extension's dNSName type.
	  </li>
        <li>Construct the DNS query name for the corresponding TLSA
	  record. If the TLS DANE client identity extension was present,
	  then this name should be used. Otherwise, identities from the
	  client certificate are used.</li>
        <li>Look up the TLSA record set 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.</li>
        <li>Extract the RDATA of the TLSA records and match them to the
	  presented client certificate according to the rules specified
	  in the DANE TLS protocol <xref target="RFC6698" format="default"/>
          <xref target="RFC7671" format="default"/>.
	  If successfully matched, the client is authenticated and
	  the TLS session proceeds. If unsuccessful, the server MUST
	  treat the client as unauthenticated (e.g. it could terminate
	  the session, or proceed with the session giving the client
	  access to resources as a generic unauthenticated user).</li>
        <li>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, subject to RFC7671 digest agility,
	  which SHOULD be implemented.</li>
      </ul>
      <t>
	If the DANE Client Identity extension is not present, and 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.
      </t>
      <t>
	If the presented client certificate has multiple dNSName
	identities, then the client MUST use the TLS DANE client identity
        extension to unambiguously indicate its intended name to the server.
      </t>
      <t>
	Specific applications may be designed to require additional
	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 anchor="raw_keys" numbered="true" toc="default">
      <name>Raw Public Keys</name>
      <t>
	When using <xref target="RFC7250" format="default">raw public keys in TLS</xref>,
	this specification requires the use of the TLS DANE Client
	Identity extension. The associated DANE TLSA records employ only
	certificate usage 3 (DANE-EE) and a selector value of 1 (SPKI),
	as described in <xref target="RFC7671" format="default"/>.
      </t>
    </section>
    <section anchor="Acknowledgements" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>
        The authors thank the many members of the IETF DANCE working
        group for helpful comments and input.
      </t>
    </section>

    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document includes no request to IANA.</t>
    </section>

    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
	This document updates RFC 6698 by defining the use of the TLSA
        record for client TLS certificates. Placing client identities
        in the DNS may pose privacy issues for certain applications,
        depending on the nature of the clients, and the structure and
        content of the client names. Applications employing this protocol
        should carefully assess those potential issues.
        There are no other security considerations for this document beyond
        those described in RFC 6698 and RFC 7671 and in the specifications
        for TLS and DTLS [RFC8446], [RFC5246], [RFC6347].
      </t>
    </section>

  </middle>

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

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5246.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6347.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6698.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7250.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7671.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <reference anchor="TLSCLIENTID" target="https://datatracker.ietf.org/doc/html/draft-ietf-dance-tls-clientid">
          <front>
            <title>TLS Extension for DANE Client Identity</title>
            <author fullname="Shumon Huque" initials="S" surname="Huque"/>
            <author fullname="Viktor Dukhovni" initials="V" surname="Dukhovni"/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="DANCEARCH" target="https://datatracker.ietf.org/doc/draft-ietf-dance-architecture/">
          <front>
            <title>An Architecture for DNS-Bound Client and Sender Identities</title>
            <author fullname="Ash Wilson" initials="A" surname="Wilson"/>
            <author fullname="Shumon Huque" initials="S" surname="Huque"/>
            <author fullname="Olle E. Johansson" initials="O" surname="Johansson"/>
            <author fullname="Michael Richardson" initials="M" surname="Richardson"/>
          </front>
        </reference>
        <reference anchor="CERTDEVID" target="https://tools.ietf.org/id/draft-friel-pki-for-devices-00.html">
          <front>
            <title>PKI Certificate Identifier Format for Devices</title>
            <author fullname="O Friel" initials="O" surname="Friel"/>
            <author fullname="Richard Barnes" initials="R" surname="Barnes"/>
          </front>
        </reference>
        <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>
      </references>
    </references>

  </back>

</rfc>
