<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-uta-rfc6125bis-15" number="9525" submissionType="IETF" category="std" consensus="true" obsoletes="6125" updates="" tocDepth="4" tocInclude="true" sortRefs="true" symRefs="true" xml:lang="en" version="3">

  <!-- xml2rfc v2v3 conversion 3.17.5 -->

  <front>
    <title abbrev="Service Identity in TLS">Service Identity in TLS</title>
    <seriesInfo name="RFC" value="9525"/>
    <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
      <organization>Independent</organization>
      <address>
        <postal>
          <country>United States of America</country>
        </postal>
        <email>stpeter@stpeter.im</email>
      </address>
    </author>
    <author initials="R." surname="Salz" fullname="Rich Salz">
      <organization>Akamai Technologies</organization>
      <address>
        <postal>
          <country>United States of America</country>
        </postal>
        <email>rsalz@akamai.com</email>
      </address>
    </author>
    <date year="2023" month="November"/>
    <area>art</area>
    <workgroup>uta</workgroup>

<keyword>TLS</keyword>
<keyword>server</keyword>
<keyword>X509</keyword>
<keyword>identity</keyword>
<keyword>naming</keyword>
<keyword>verifying</keyword>
<keyword>representing</keyword>
<keyword>PKIX</keyword>
<keyword>certificates</keyword>
<keyword>validation</keyword>

    <abstract>
<t>Many application technologies enable secure communication between two entities
by means of Transport Layer Security (TLS) with
Internet Public Key Infrastructure using X.509 (PKIX) certificates.
This document specifies
procedures for representing and verifying the identity of application services
in such interactions.</t>
      <t>This document obsoletes RFC 6125.</t>
    </abstract>
  </front>
  <middle>

<section anchor="intro">
      <name>Introduction</name>
      <section anchor="motivation">
        <name>Motivation</name>
        <t>The visible face of the Internet largely consists of services that employ a
client-server architecture in which a client
communicates with an application service.  When a client communicates with an
application service using <xref target="RFC8446"/>, <xref target="RFC9147"/>, or a protocol built on those
(<xref target="RFC9001"/> being a notable example),
it has some notion of the server's
identity (e.g., "the website at bigcompany.example") while attempting to establish
secure communication.  Likewise, during TLS negotiation, the server presents
its notion of the service's identity in the form of a public key certificate
that was issued by a certification authority (CA) in the context of the
Internet Public Key Infrastructure using X.509 <xref target="RFC5280"/>.  Informally, we can
think of these identities as the client's "reference identity" and the
server's "presented identity"; more formal definitions are given later.  A
client needs to verify that the server's presented identity matches its
reference identity so it can deterministically and automatically authenticate the communication.</t>
        <t>This document defines procedures for how clients perform this verification.
It therefore defines requirements on other parties, such as
the certification authorities that issue certificates, the service administrators requesting
	them, and the protocol designers defining interactions between clients and servers.</t>
        <t>This document obsoletes RFC 6125 <xref target="RFC6125"/>. Changes from RFC 6125 <xref target="RFC6125"/> are described under <xref target="changes"/>.</t>
      </section>
      <section anchor="applicability">
        <name>Applicability</name>
        <t>This document does not supersede the rules for certificate issuance or
validation specified by <xref target="RFC5280"/>.  That document also governs any
certificate-related topic on which this document is silent.  This includes
certificate syntax, extensions such as name constraints or
extended key usage, and handling of certification paths.</t>
        <t>This document addresses only name forms in the leaf "end entity" server
certificate.  It does not address the name forms in the chain of certificates
used to validate a certificate, nor does it create or check the validity
of such a chain.  In order to ensure proper authentication, applications need
to verify the entire certification path.</t>
      </section>
      <section anchor="overview">
        <name>Overview of Recommendations</name>
        <t>The previous version of this specification, <xref target="RFC6125"/>, surveyed the then-current
practice from many IETF standards and tried to generalize best practices
(see <xref target="RFC6125" section="A" sectionFormat="of"/> for details).</t>
        <t>This document takes the lessons learned since then and codifies them.
The following is a summary of the rules, which are described at greater
length in the remainder of this document:</t>
        <ul spacing="normal">
          <li>Only check DNS domain names via the subjectAltName
extension designed for that purpose: dNSName.</li>
          <li>Allow use of even more specific
subjectAltName extensions where appropriate such as
uniformResourceIdentifier, iPAddress, and the otherName form SRVName.</li>
          <li>Wildcard support is now the default in certificates.
Constrain wildcard certificates so that the wildcard can only
be the complete left-most label of a domain name.</li>
          <li>Do not include or check strings that look like domain names
in the subject's Common Name.</li>
        </ul>
      </section>
      <section anchor="scope">
        <name>Scope</name>
        <section anchor="in-scope">
          <name>In Scope</name>
          <t>This document applies only to service identities that are used in TLS or DTLS
and that are included in PKIX certificates.</t>
          <t>With regard to TLS and DTLS, these security protocols are used to
protect data exchanged over a wide variety of application protocols,
which use both the TLS or DTLS handshake protocol and the TLS or
DTLS record layer, either directly or through a profile as in Network
Time Security <xref target="RFC8915"/>.  The TLS handshake protocol can also be used
with different record layers to define secure transport protocols;
at present, the most prominent example is QUIC <xref target="RFC9000"/>.  The
rules specified here are intended to apply to all protocols in this
extended TLS "family".</t>
          <t>With regard to PKIX certificates, the primary usage is in the
context of the public key infrastructure described in <xref target="RFC5280"/>.
In addition, technologies such as DNS-Based Authentication
of Named Entities (DANE) <xref target="RFC6698"/> sometimes use certificates based
on PKIX (more precisely, certificates structured via <xref target="X.509"/> or
specific encodings thereof such as <xref target="X.690"/>), at least in certain
modes.  Alternatively, a TLS peer could issue delegated credentials
that are based on a CA-issued certificate, as in <xref target="RFC9345"/>.
In both cases, a TLS client could learn of a service identity
through its inclusion in the relevant certificate.  The rules specified
here are intended to apply whenever service identities are included in
X.509 certificates or credentials that are derived from such certificates.</t>
        </section>
        <section anchor="out-of-scope">
          <name>Out of Scope</name>
          <t>The following topics are out of scope for this specification:</t>
          <ul spacing="normal">
            <li>Security protocols other than those
described above.</li>
            <li>Keys or certificates employed outside the context of PKIX-based systems.</li>
            <li>Client or end-user identities.
Other than as described above, certificates representing client identities
	    (e.g., rfc822Name) are beyond the scope of this document.</li>
            <li>Identification of servers using other than a domain name, an IP address, or an SRV service name.
This document discusses Uniform Resource Identifiers <xref target="RFC3986"/> only to the
extent that they are expressed in certificates. Other aspects of a service
such as a specific resource (the URI "path" component) or parameters (the URI
"query" component) are the responsibility of specific protocols or URI
schemes.</li>
            <li>
              <t>Certification authority policies.
This includes items such as the following:  </t>
              <ul spacing="normal">
                <li>How to certify or validate fully qualified domain names (FQDNs) and application
service types (see <xref target="RFC8555"/>).</li>
                <li>What types or "classes" of certificates to issue and whether to apply different
policies for them.</li>
                <li>How to certify or validate other kinds of information that might be
included in a certificate (e.g., organization name).</li>
              </ul>
            </li>
            <li>Resolution of DNS domain names.
Although the process whereby a client resolves the DNS domain name of an
application service can involve several steps, for the purposes of this
specification, the only relevant consideration is that the client needs to
verify the identity of the entity with which it will communicate once the
resolution process is complete.  Thus, the resolution process itself is
out of scope for this specification.</li>
            <li>User interface issues.
In general, such issues are properly the responsibility of client
software developers and standards development organizations
dedicated to particular application technologies (for example, see
<xref target="WSC-UI"/>).</li>
          </ul>
        </section>
      </section>
      <section anchor="terminology">
        <name>Terminology</name>
        <t>Because many concepts related to "identity" are often too vague to be
actionable in application protocols, we define a set of more concrete terms
for use in this specification.</t>
        <dl>
          <dt>application service:</dt>
          <dd>
            <t>A service on the Internet that enables clients to connect for the
purpose of retrieving or uploading information, communicating with other
entities, or connecting to a broader network of services.</t>
          </dd>
          <dt>application service provider:</dt>
          <dd>
            <t>An entity that hosts or deploys an application service.</t>
          </dd>
          <dt>application service type:</dt>
          <dd>
            <t>A formal identifier for the application protocol used to provide a
particular kind of application service at a domain.  This often appears as
a URI scheme <xref target="RFC3986"/>, a DNS SRV Service <xref target="RFC2782"/>, or an Application-Layer Protocol Negotiation (ALPN) <xref target="RFC7301"/>
identifier.</t>
          </dd>
          <dt>identifier:</dt>
          <dd>
            <t>A particular instance of an identifier type that is either presented by a
server in a certificate or referenced by a client for matching purposes.</t>
          </dd>
          <dt>identifier type:</dt>
          <dd>
            <t>A formally defined category of identifier that can be included in a
certificate and therefore be used for matching purposes. For
conciseness and convenience, we define the following identifier types of
interest:
</t>
       <dl spacing="normal">
              <dt>DNS-ID:</dt><dd> A subjectAltName entry of type dNSName as defined in <xref target="RFC5280"/>.</dd>
              <dt>IP-ID:</dt><dd> A subjectAltName entry of type iPAddress as defined in <xref target="RFC5280"/>.</dd>
              <dt>SRV-ID:</dt><dd> A subjectAltName entry of type otherName whose name form is
SRVName as defined in <xref target="RFC4985"/>.</dd>
              <dt>URI-ID:</dt><dd> A subjectAltName entry of type uniformResourceIdentifier
as defined in <xref target="RFC5280"/>. See further discussion in <xref target="security-uri"/>.</dd>
            </dl>
          </dd>
          <dt>PKIX:</dt>
          <dd>
            <t>The short name for the Internet Public Key Infrastructure using X.509
defined in <xref target="RFC5280"/>.  That document provides a profile of the X.509v3
certificate specifications and X.509v2 certificate revocation list (CRL)
specifications for use on the Internet.</t>
          </dd>
          <dt>presented identifier:</dt>
          <dd>
            <t>An identifier presented by a server to a client within a PKIX certificate
when the client attempts to establish secure communication with the server.
The certificate can include one or more presented identifiers of different
types, and if the server hosts more than one domain, then the certificate
might present distinct identifiers for each domain.</t>
          </dd>
          <dt>reference identifier:</dt>
          <dd>
            <t>An identifier expected by the client when examining presented identifiers.
It is constructed from the source domain and, optionally, an application
service type.</t>
          </dd>
          <dt>Relative Distinguished Name (RDN):</dt>
          <dd>
            <t>An ASN.1-based construction that is itself a building-block component of
Distinguished Names. See <xref section="2" sectionFormat="comma" target="RFC4514"/>.</t>
          </dd>
          <dt>source domain:</dt>
          <dd>
            <t>The FQDN that a client expects an application
service to present in the certificate. This is typically input by
a human user, configured into a client, or provided by reference such as
a URL. The combination of a source domain and, optionally, an application
service type enables a client to construct one or more reference
identifiers. This specification covers FQDNs. Use of any names that
are not fully qualified is out of scope and may result in unexpected
or undefined behavior.</t>
          </dd>
          <dt>subjectAltName entry:</dt>
          <dd>
            <t>An identifier placed in a subjectAltName extension.</t>
          </dd>
          <dt>subjectAltName extension:</dt>
          <dd>
            <t>A standard PKIX extension enabling identifiers of various types to be
bound to the certificate subject.</t>
          </dd>
          <dt>subjectName:</dt>
          <dd>
            <t>The name of a PKIX certificate's subject, encoded in a certificate's
subject field (see <xref section="4.1.2.6" sectionFormat="comma" target="RFC5280"/>).</t>
          </dd>
        </dl>
        <t>TLS uses the words "client" and "server", where the client is the entity
that initiates the connection.  In many cases, this is consistent with common practice,
such as a browser connecting to a web origin.
For the sake of clarity, and to follow the usage in <xref target="RFC8446"/> and related
specifications, we will continue
to use the terms client and server in this document.
However, these are TLS-layer roles, and the application protocol
could support the TLS server making requests to the TLS client after the
TLS handshake; there is no requirement that the roles at the application
layer match the TLS layer.</t>
        <t>Security-related terms used in this document, but not defined here or in
<xref target="RFC5280"/>, should be understood in the sense defined in <xref target="RFC4949"/>. Such
terms include "attack", "authentication", "identity", "trust", "validate",
	and "verify".</t>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
</section>
    </section>
    <section anchor="names">
      <name>Identifying Application Services</name>
      <t>This document assumes that an application service is identified by a DNS domain
name (e.g., <tt>bigcompany.example</tt>), an IP address (IPv4 or IPv6), or an identifier
that contains additional supplementary information.  Supplementary information
is limited to the application service type as expressed in a DNS SRV record
(e.g., "the IMAP server at isp.example" for "_imap.isp.example") or a URI.</t>
      <t>In a DNS-ID -- and in the DNS domain name portion of an SRV-ID or URI-ID -- any
characters outside the range described in <xref target="US-ASCII"/> are prohibited, and internationalized
domain labels are represented as A-labels <xref target="RFC5890"/>.</t>
      <t>An IP address is either a 4-octet IPv4 address <xref target="RFC0791"/> or a 16-octet
IPv6 address <xref target="RFC4291"/>.  The identifier might need to be converted from a
textual representation to obtain this value.</t>
      <t>From the perspective of the application client or user, some identifiers are
<em>direct</em> because they are provided directly by a human user.  This includes
runtime input, prior configuration, or explicit acceptance of a client
communication attempt.  Other names are <em>indirect</em> because they are
automatically resolved by the application based on user input, such as a
target name resolved from a source name using DNS SRV or the records described in <xref target="RFC3403"/>.
The distinction matters most for certificate consumption, specifically
verification as discussed in this document.</t>
      <t>From the perspective of the application service, some identifiers are
<em>unrestricted</em> because they can be used in any type of service, such as a
single certificate being used for both the HTTP and IMAP services at the host
"bigcompany.example".  Other identifiers are <em>restricted</em> because they can only be used for
one type of service, such as a special-purpose certificate that can only be
used for an IMAP service.  This distinction matters most for certificate
issuance.</t>
      <t>The four identifier types can be categorized as follows:</t>
      <ul spacing="normal">
        <li>A DNS-ID is direct and unrestricted.</li>
        <li>An IP-ID is direct and unrestricted.</li>
        <li>An SRV-ID is typically indirect but can be direct, and it is restricted.</li>
        <li>A URI-ID is direct and restricted.</li>
      </ul>
      <t>It is important to keep these distinctions in mind because best practices
for the deployment and use of the identifiers differ.
Note that cross-protocol attacks such as those described in <xref target="ALPACA"/>
are possible when two
different protocol services use the same certificate.
This can be addressed by using restricted identifiers or deploying
services so that they do not share certificates.
Protocol specifications <bcp14>MUST</bcp14> specify which identifiers are
mandatory to implement and <bcp14>SHOULD</bcp14> provide operational guidance when necessary.</t>
      <t>The Common Name RDN <bcp14>MUST NOT</bcp14> be used to identify a service because
it is not strongly typed (it is essentially free-form text) and therefore
suffers from ambiguities in interpretation.</t>
      <t>For similar reasons, other RDNs within the subjectName <bcp14>MUST NOT</bcp14> be used to
identify a service.</t>
      <t>An IP address that is the result of a DNS query is indirect. Use of IP-IDs
that are indirect is out of scope for this document.</t>
      <t>The IETF continues to define methods for looking up information needed
to make connections to network services. One recent example is service
binding via the "SVCB" and "HTTPS" DNS resource record (RR) types. This
document does not define any identity representation or verification procedures
that are specific to SVCB-compatible records, because the use of such records during
connection establishment does not currently alter any of the PKIX validation
requirements specified herein or in any other relevant specification.
For example,
the PKIX validation rules for <xref target="RFC9110"/> and <xref target="RFC7858"/> do not change
when the client uses the DNS resource records defined in <xref target="RFC9460"/> or <xref target="RFC9461"/> to look up connection information. However, it is possible
that future SVCB mapping documents could specify altered PKIX rules for new use cases.</t>
    </section>
    <section anchor="design">
      <name>Designing Application Protocols</name>
      <t>This section defines how protocol designers should reference this document,
      which would typically be a normative reference in their specification.</t>
      <t>A specification
<bcp14>MAY</bcp14> choose to allow only one of the identifier types defined here.</t>
      <t>If the technology does not use DNS SRV records to resolve the DNS domain
names of application services, then the specification <bcp14>MUST</bcp14> state that SRV-ID
as defined in this document is not supported.  Note that many existing
application technologies use DNS SRV records to resolve the DNS domain names
of application services, but they do not rely on representations of those records
in PKIX certificates by means of SRV-IDs as defined in <xref target="RFC4985"/>.</t>
      <t>If the technology does not use URIs to identify application services, then
the specification <bcp14>MUST</bcp14> state that URI-ID as defined in this document is not
supported.  Note that many existing application technologies use URIs to
identify application services, but they do not rely on representation of those
URIs in PKIX certificates by means of URI-IDs.</t>
      <t>A technology <bcp14>MAY</bcp14> disallow the use of the wildcard character in presented identifiers. If
it does so, then the specification <bcp14>MUST</bcp14> state that wildcard certificates as
defined in this document are not supported.</t>
      <t>A protocol can allow the use of an IP address in place of a DNS name.  This
might use the same field without distinguishing the type of identifier as, for
example, in the "host" components of a URI.  In this case, applications need to be aware that the textual
representation of an IPv4 address is a valid DNS name. The two
types can be distinguished by first testing if the identifier is a valid IPv4
address, as is done by the "first-match-wins" algorithm in <xref section="3.2.2" sectionFormat="of" target="RFC3986"/>.</t>
    </section>
    <section anchor="represent">
      <name>Representing Server Identity</name>
      <t>This section provides instructions for issuers of
certificates.</t>
      <section anchor="represent-rules">
        <name>Rules</name>
        <t>When a certification authority issues a certificate based on the FQDN
at which the application service provider
will provide the relevant application, the following rules apply to
the representation of application service identities.
Note that some of these rules are cumulative
and can interact in important ways that are illustrated later in this
document.</t>
        <ol spacing="normal" type="1"><li>The certificate <bcp14>MUST</bcp14> include at least one identifier.</li>
          <li>The certificate <bcp14>SHOULD</bcp14> include a DNS-ID as a baseline
for interoperability.  This is not mandatory because
it is legitimate for a certificate to include only an SRV-ID or
URI-ID so as to scope its use to a particular application type.</li>

<li>If the service using the certificate deploys a technology for which
the relevant specification stipulates that certificates should
include identifiers of type SRV-ID (e.g., this is true of the Extensible Messaging and Presence Protocol (XMPP) as described in <xref target="RFC6120"/>),
then the certificate <bcp14>SHOULD</bcp14> include an SRV-ID.  This
identifier type could supplement the DNS-ID, unless the certificate
is meant to be scoped to only the protocol in question.</li>
          <li>If the service using the certificate deploys a technology for which
the relevant specification stipulates that certificates should include
identifiers of type URI-ID (e.g., this is true of the Session Initiation Protocol <xref target="RFC3261"/> as specified by
<xref target="RFC5922"/>), then the certificate <bcp14>SHOULD</bcp14> include a URI-ID.  The scheme
<bcp14>MUST</bcp14> be that of the protocol associated with the application service type,
and the "host" component <bcp14>MUST</bcp14> be the FQDN
of the service.  The application protocol specification
<bcp14>MUST</bcp14> specify which URI schemes are acceptable in URI-IDs contained in PKIX
certificates used for the application protocol (e.g., <tt>sip</tt> but not <tt>sips</tt>
or <tt>tel</tt> for SIP as described in <xref target="RFC5630"/>). Typically, this
identifier type would supplement the DNS-ID, unless the certificate
is meant to be scoped to only the protocol in question.</li>
          <li>The certificate <bcp14>MAY</bcp14> contain more than one DNS-ID, SRV-ID, URI-ID, or IP-ID
as further explained in <xref target="security-multi"/>.</li>
          <li>The certificate <bcp14>MAY</bcp14> include other application-specific identifiers
for compatibility with a deployed base, especially identifiers for
types that were defined before publication of <xref target="RFC4985"/> or for which
SRV service names or URI schemes do not exist. Such identifiers are out
of scope for this specification.</li>
        </ol>
      </section>
      <section anchor="represent-examples">
        <name>Examples</name>
        <t>Consider a simple website at <tt>&lt;www.bigcompany.example&gt;</tt>, which is not discoverable via
DNS SRV lookups.  Because HTTP does not specify the use of URIs in server
certificates, a certificate for this service might include only a DNS-ID of
<tt>&lt;www.bigcompany.example&gt;</tt>.</t>
        <t>Consider another website, which is reachable by a fixed IP address of
<tt>2001:db8::5c</tt>.  If the two sites refer to the same web service, then
the certificate might also include this value in an IP-ID to allow
clients to use the fixed IP address as a reference identity.</t>
        <t>Consider an IMAP-accessible email server at the host <tt>mail.isp.example</tt>
servicing email addresses of the form <tt>user@isp.example</tt> and discoverable via
DNS SRV lookups on the application service name of <tt>isp.example</tt>. A
certificate for this service might include SRV-IDs of <tt>_imap.isp.example</tt> and
<tt>_imaps.isp.example</tt> (see <xref target="RFC6186"/>) along with DNS-IDs of <tt>isp.example</tt>
	and <tt>mail.isp.example</tt>.</t>
	
        <t>Consider a SIP-accessible voice-over-IP (VoIP) server at the host
<tt>voice.college.example</tt> servicing SIP addresses of the form
<tt>user@voice.college.example</tt> and identified by a URI of &lt;sip:voice.college.example&gt;.
A certificate for this service would include a URI-ID of
<tt>&lt;sip:voice.college.example&gt;</tt> (see <xref target="RFC5922"/>) along with a DNS-ID of
	<tt>voice.college.example</tt>.</t>
        <t>Consider an XMPP-compatible instant messaging (IM) server at the host
<tt>messenger.example</tt> that services IM addresses of the form <tt>user@messenger.example</tt> and that is
discoverable via DNS SRV lookups on the <tt>messenger.example</tt> domain.  A
certificate for this service might include SRV-IDs of
<tt>_xmpp-client.messenger.example</tt> and <tt>_xmpp-server.messenger.example</tt> (see
<xref target="RFC6120"/>), as well as a DNS-ID of <tt>messenger.example</tt>.</t>
      </section>
    </section>
    <section anchor="request">
      <name>Requesting Server Certificates</name>
      <t>This section provides instructions for service providers regarding
the information to include in certificate signing requests (CSRs).
In general, service providers <bcp14>SHOULD</bcp14> request certificates that
include all the identifier types that are required or recommended for
the application service type that will be secured using the certificate to
be issued.</t>
      <t>A service provider <bcp14>SHOULD</bcp14> request certificates with as few identifiers as
necessary to identify a single service; see <xref target="security-multi"/>.</t>
      <t>If the certificate will be used for only a single type of application
service, the service provider <bcp14>SHOULD</bcp14> request a certificate that includes
DNS-ID or IP-ID values that identify that service or,
if appropriate for the application service type, SRV-ID or
URI-ID values that limit the deployment scope of the certificate to only the
defined application service type.</t>
      <t>If the certificate might be used for any type of application service, 
the service provider <bcp14>SHOULD</bcp14> request a certificate that includes
only DNS-IDs or IP-IDs. Again, because of multiprotocol attacks, this practice is
discouraged; it can be mitigated by deploying only one service on
a host.</t>
      <t>If a service provider offers multiple application service types and wishes to
limit the applicability of certificates using SRV-IDs or URI-IDs, it <bcp14>SHOULD</bcp14>
request that multiple certificates rather than a single certificate containing
multiple SRV-IDs or URI-IDs each identify a different application service
type. This rule does not apply to application service type "bundles" that
identify distinct access methods to the same underlying application such as
an email application with access methods denoted by the application service
types of <tt>imap</tt>, <tt>imaps</tt>, <tt>pop3</tt>, <tt>pop3s</tt>, and <tt>submission</tt> as described in
<xref target="RFC6186"/>.</t>
    </section>
    <section anchor="verify">
      <name>Verifying Service Identity</name>
      <t>At a high level, the client verifies the application service's
identity by performing the following actions:</t>
      <ol spacing="normal" type="1"><li>The client constructs a list of reference identifiers it would find acceptable
based on the source domain and, if applicable, the type of service to
which the client is connecting.</li>
        <li>The server provides its presented identifiers in the form of a PKIX
certificate.</li>
        <li>The client checks each of its reference identifiers against the
server's presented identifiers for the purpose of finding a match. When checking a
reference identifier against a presented identifier, the client matches the
source domain of the identifiers and, optionally, their application service
type.</li>
      </ol>
      <t>Naturally, in addition to checking identifiers, a client should perform
further checks, such as expiration and revocation, to ensure that the server
is authorized to provide the requested service.  Because such checking is not a
matter of verifying the application service identity presented in a
certificate, methods for doing so are out of scope for
this document.</t>
      <section anchor="verify-reference">
        <name>Constructing a List of Reference Identifiers</name>
        <section anchor="verify-reference-rules">
          <name>Rules</name>
          <t>The client <bcp14>MUST</bcp14> construct a list of acceptable reference identifiers
and <bcp14>MUST</bcp14> do so independently of the identifiers presented by the
server.</t>
          <t>The inputs used by the client to construct its list of reference identifiers
might be a URI that a user has typed into an interface (e.g., an HTTPS URL
for a website), configured account information (e.g., the domain name of a
host for retrieving email, which might be different from the DNS domain name
portion of a username), a hyperlink in a web page that triggers a browser to
retrieve a media object or script, or some other combination of information
that can yield a source domain and an application service type.</t>
          <t>This document does not precisely define how reference identifiers are generated.
Defining reference identifiers is the responsibility of applications or protocols that use this
document. Because the security of a system that uses this document will depend
on how reference identifiers are generated, great care should be taken in this
process. For example, a protocol or application could specify that the application
service type is obtained through a one-to-one mapping of URI schemes to service
types or that the protocol or application supports only a restricted set of URI schemes.
Similarly, it could
specify that a domain name or an IP address taken as input to the reference
identifier must be obtained in a secure context such as a hyperlink embedded in
a web page that was delivered over an authenticated and encrypted channel
(for instance, see <xref target="SECURE-CONTEXTS"/> with regard to the web platform).</t>
          <t>Naturally, if the inputs themselves are invalid or corrupt (e.g., a user has
clicked a hyperlink provided by a malicious entity in a phishing attack),
then the client might end up communicating with an unexpected application
service.</t>
          <t>During the course of processing, a client might be exposed to identifiers that
look like, but are not, reference identifiers. For example, DNS resolution that
starts at a DNS-ID reference identifier might produce intermediate domain names
that need to be further resolved. Unless an application defines a process
for authenticating intermediate identifiers in a way that then allows
them to be used as a reference identifier (for example, see <xref target="RFC8689"/>),
any intermediate values are not reference
identifiers and <bcp14>MUST NOT</bcp14> be treated as such.
In the DNS case, not treating intermediate domain names as reference identifiers
removes DNS and DNS resolution from the attack surface.</t>
          <t>As one example of the process of generating a reference identifier, from the user
input of the URI &lt;sip:alice@voice.college.example&gt;, a client could derive the application
service type <tt>sip</tt> from the URI scheme and parse the domain name <tt>college.example</tt>
	  from the "host" component.</t>
          <t>Using the combination of one or more FQDNs or IP addresses, plus optionally an application service type, the client
<bcp14>MUST</bcp14> construct its list of reference identifiers in accordance with the
following rules:</t>
          <ul spacing="normal">
            <li>If a server for the application service type is typically associated
with a URI for security purposes (i.e., a formal protocol document
specifies the use of URIs in server certificates), the reference identifier
<bcp14>SHOULD</bcp14> be a URI-ID.</li>
            <li>If a server for the application service type is typically discovered
by means of DNS SRV records, the reference identifier <bcp14>SHOULD</bcp14> be an SRV-ID.</li>
            <li>If the reference identifier is an IP address, the reference identifier is an
IP-ID.</li>
            <li>In the absence of more specific identifiers, the reference identifier is a DNS-ID.
A reference identifier of type DNS-ID can be directly constructed from an
FQDN that is (a) contained in or securely derived from the inputs or
(b) explicitly associated with the source domain by means of user
configuration.</li>
          </ul>
          <t>Which identifier types a client includes in its list of reference
identifiers, and their priority, is a matter of local policy.  For example, a
client that is built to connect only to a particular kind of service might be
configured to accept as valid only certificates that include an SRV-ID for
that application service type.  By contrast, a more lenient client, even if
built to connect only to a particular kind of service, might include
SRV-IDs, DNS-IDs, and IP-IDs in its list of reference identifiers.</t>
        </section>
        <section anchor="verify-reference-examples">
          <name>Examples</name>
          <t>The following examples are for illustrative purposes only and are not
intended to be comprehensive.</t>
          <ol spacing="normal" type="1"><li>A web browser that is connecting via HTTPS to the website at
<tt>&lt;https://www.bigcompany.example/&gt;</tt> would have a single reference identifier:
a DNS-ID of <tt>www.bigcompany.example</tt>.</li>
            <li>A web browser connecting to <tt>&lt;https://192.0.2.107/&gt;</tt> would have a single
IP-ID reference identifier of <tt>192.0.2.107</tt>. Likewise, if connecting
to <tt>&lt;https://[2001:db8::abcd]&gt;</tt>, it would have a single IP-ID
reference identifier of <tt>2001:db8::abcd</tt>.</li>
            <li>A mail user agent that is connecting via IMAPS to the email service at
<tt>isp.example</tt> (resolved as <tt>mail.isp.example</tt>) might have three reference
identifiers: an SRV-ID of <tt>_imaps.isp.example</tt> (see <xref target="RFC6186"/>) and
DNS-IDs of <tt>isp.example</tt> and <tt>mail.isp.example</tt>.  An email user agent that
does not support <xref target="RFC6186"/> would probably be explicitly configured to
connect to <tt>mail.isp.example</tt>, whereas an SRV-aware user agent would derive
<tt>isp.example</tt> from an email address of the form <tt>user@isp.example</tt> but might
also accept <tt>mail.isp.example</tt> as the DNS domain name portion of reference
identifiers for the service.</li>
            <li>A VoIP user agent that is connecting via SIP to the voice
service at <tt>voice.college.example</tt> might have only one reference identifier:
a URI-ID of <tt>sip:voice.college.example</tt> (see <xref target="RFC5922"/>).</li>
            <li>An IM client that is connecting via XMPP to the IM
service at <tt>messenger.example</tt> might have three reference identifiers: an
SRV-ID of <tt>_xmpp-client.messenger.example</tt> (see <xref target="RFC6120"/>), a DNS-ID of
<tt>messenger.example</tt>, and an XMPP-specific <tt>XmppAddr</tt> of <tt>messenger.example</tt>
(see <xref target="RFC6120"/>).</li>
          </ol>
          <t>In all these cases, presented identifiers that do not match the reference
identifier(s) would be rejected; for instance:</t>
          <ul spacing="normal">
            <li>With regard to the first example, a DNS-ID of <tt>web.bigcompany.example</tt> would
be rejected because the DNS domain name portion does not match
<tt>www.bigcompany.example</tt>.</li>
            <li>With regard to the third example, a URI-ID of &lt;sip:www.college.example&gt;
would be rejected because the DNS domain name portion does not match
"voice.college.example", and a DNS-ID of "voice.college.example" would be
rejected because it lacks the appropriate application service type
portion (i.e., it does not specify a "sip:" URI).</li>
          </ul>
        </section>
      </section>
      <section anchor="verify-seek">
        <name>Preparing to Seek a Match</name>
        <t>Once the client has constructed its list of reference identifiers and has
received the server's presented identifiers,
the client checks its reference identifiers against the presented identifiers
for the purpose of finding a match.
The search fails if the client exhausts
its list of reference identifiers without finding a match.  The search succeeds
if any presented identifier matches one of the reference identifiers, at
which point the client <bcp14>SHOULD</bcp14> stop the search.</t>
        <t>Before applying the comparison rules provided in the following
sections, the client might need to split the reference identifier into
components.
Each reference identifier produces either a domain name or an IP address and
optionally an application service type as follows:</t>
        <ul spacing="normal">
          <li>A DNS-ID reference identifier <bcp14>MUST</bcp14> be used directly as the DNS domain
	  name, and there is no application service type.</li>
          <li>An IP-ID reference identifier <bcp14>MUST</bcp14> exactly match the value of an
iPAddress entry in subjectAltName, with no partial (e.g., network-level) matching. There is no application service type.</li>
          <li>For an SRV-ID reference identifier, the DNS domain name portion is
the Name and the application service type portion is the Service.  For
example, an SRV-ID of <tt>_imaps.isp.example</tt> has a DNS domain name portion
of <tt>isp.example</tt> and an application service type portion of
<tt>imaps</tt>, which maps to the IMAP application protocol as explained in
<xref target="RFC6186"/>.</li>
          <li>For a reference identifier of type URI-ID, the DNS domain name
portion is the "reg-name" part of the "host" component and the application
service type portion is the scheme, as defined above.  Matching only the
"reg-name" rule from <xref target="RFC3986"/> limits the additional domain name validation
(<xref target="verify-domain"/>) to DNS domain names or non-IP hostnames.
A URI that contains an IP address might be matched against an IP-ID in place
of a URI-ID by some lenient clients.  This document does not describe how a
URI that contains no "host" component can be matched.  Note that extraction of the
"reg-name" might necessitate normalization of the URI (as explained in
<xref section="6" sectionFormat="of" target="RFC3986"/>).  For example, a URI-ID of <tt>&lt;sip:voice.college.example&gt;</tt> would be split
into a DNS domain name portion of <tt>voice.college.example</tt> and an application
service type of <tt>sip</tt> (associated with an application protocol of SIP as
explained in <xref target="RFC5922"/>).</li>
        </ul>
        <t>If the reference identifier produces a domain name, the client <bcp14>MUST</bcp14> match the
DNS name; see <xref target="verify-domain"/>.
If the reference identifier produces an IP address, the client <bcp14>MUST</bcp14> match the IP
address; see <xref target="verify-ip"/>.
If an application service type is present, it <bcp14>MUST</bcp14> also match the
service type; see <xref target="verify-app"/>.</t>
      </section>
      <section anchor="verify-domain">
        <name>Matching the DNS Domain Name Portion</name>
        <t>This section describes how the client must determine if the presented DNS
name matches the reference DNS name.  The rules differ depending on whether
the domain to be checked is an
internationalized domain name, as defined in <xref target="names"/>, or not.
For clients
that support presented identifiers containing the wildcard character "*", this section
also specifies a supplemental rule for such "wildcard certificates".
This section uses the description of labels and domain names in
	<xref target="RFC1034"/>.</t>
      <t>If the DNS domain name portion of a reference identifier
	is not an internationalized domain name
	(i.e., an FQDN that conforms to "preferred name syntax" as
described in <xref section="3.5" sectionFormat="of" target="RFC1034"/>),
then the matching of the reference identifier against the presented
identifier <bcp14>MUST</bcp14> be performed by comparing the set of domain name labels using
a case-insensitive ASCII comparison, as clarified by <xref target="RFC4343"/>.  For
example, <tt>WWW.BigCompany.Example</tt> would be lower-cased to <tt>www.bigcompany.example</tt> for
comparison purposes.  Each label <bcp14>MUST</bcp14> match in order for the names to be
considered a match, except as supplemented by the rule about checking
wildcard labels in presented identifiers given below.</t>
        <t>If the DNS domain name portion of a reference identifier is an
internationalized domain name, then the client <bcp14>MUST</bcp14> convert any U-labels
<xref target="RFC5890"/> in the domain name to A-labels before checking the domain name
or comparing it with others.  In accordance with <xref target="RFC5891"/>, A-labels
<bcp14>MUST</bcp14> be compared as case-insensitive ASCII.  Each label <bcp14>MUST</bcp14> match in order
for the domain names to be considered to match, except as supplemented by
the rule about checking wildcard labels in presented identifiers given below.</t>
        <t>If the technology specification supports wildcards in presented identifiers, then the client <bcp14>MUST</bcp14>
match the reference identifier against a presented identifier whose DNS
domain name portion contains the wildcard character "*" in a label, provided
these requirements are met:</t>
        <ol spacing="normal" type="1"><li>There is only one wildcard character.</li>
          <li>The wildcard character appears only as the complete content of the left-most label.</li>
        </ol>
        <t>If the requirements are not met, the presented identifier is invalid and <bcp14>MUST</bcp14>
be ignored.</t>
        <t>A wildcard in a presented identifier can only match one label in a
reference identifier.  This specification covers only wildcard characters in
presented identifiers, not wildcard characters in reference identifiers or in
DNS domain names more generally.  Therefore, the use of wildcard characters
as described herein is not to be confused with DNS wildcard
matching, where the "*" label always matches at least one whole label and
sometimes more; see <xref section="4.3.3" sectionFormat="comma" target="RFC1034"/> and <xref target="RFC4592"/>.
In particular, it also deviates from <xref section="2.1.3" sectionFormat="comma" target="RFC4592"/>.</t>
        <t>For information regarding the security characteristics of wildcard
certificates, see <xref target="security-wildcards"/>.</t>
      </section>
      <section anchor="verify-ip">
        <name>Matching an IP Address Portion</name>
        <t>Matching of an IP-ID is based on an octet-for-octet comparison of the bytes of the
reference identity with the bytes contained in the iPAddress subjectAltName.</t>
        <t>For an IP address that appears in a URI-ID, the "host" component of both the
reference identity and the presented identifier must match.  These are parsed as either
an "IPv6address" (following <xref section="3.2.2" sectionFormat="comma" target="RFC3986"/>) or an "IPv4address" (following <xref target="RFC0791"/>).
If the resulting octets are equal, the IP address matches.</t>
        <t>This document does not specify how an SRV-ID reference identity can include an
IP address, as <xref target="RFC4985"/> only defines string names, not octet identifiers
such as an IP address.</t>
      </section>
      <section anchor="verify-app">
        <name>Matching the Application Service Type Portion</name>
        <t>The rules for matching the application service type depend on whether
the identifier is an SRV-ID or a URI-ID.</t>
        <t>These identifiers provide an application service type portion to be checked,
but that portion is combined only with the DNS domain name portion of the
SRV-ID or URI-ID itself.  Consider the example of a messaging client that has two reference
identifiers: (1) an SRV-ID of <tt>_xmpp-client.messenger.example</tt> and (2) a DNS-ID
of <tt>app.example</tt>.  The client <bcp14>MUST</bcp14> check (1) the combination of (a) an
application service type of <tt>xmpp-client</tt> and (b) a DNS domain name of
<tt>messenger.example</tt> as well as (2)
a DNS domain name of <tt>app.example</tt>.  However, the
client <bcp14>MUST NOT</bcp14> check the combination of an application service type of
<tt>xmpp-client</tt> and a DNS domain name of <tt>app.example</tt> because it does not
have an SRV-ID of <tt>_xmpp-client.app.example</tt> in its list of reference
identifiers.</t>
        <t>If the identifier is an SRV-ID, then the application service name <bcp14>MUST</bcp14>
be matched in a case-insensitive manner, in accordance with <xref target="RFC2782"/>.
Note that per <xref target="RFC4985"/>, the underscore "_" is part of the service name in
DNS SRV records and in SRV-IDs.</t>
        <t>If the identifier is a URI-ID, then the scheme name portion <bcp14>MUST</bcp14> be
matched in a case-insensitive manner, in accordance with <xref target="RFC3986"/>.
Note that the colon ":" is a separator between the scheme name
and the rest of the URI and thus does not need to be included in any
comparison.</t>
      </section>
      <section anchor="outcome">
        <name>Outcome</name>
        <t>If the client has found a presented identifier that matches a reference
identifier, then the service identity check has succeeded.  In this case, the
client <bcp14>MUST</bcp14> use the matched reference identifier as the validated identity of
the application service.</t>
        <t>If the client does not find a presented identifier matching any of the
reference identifiers, then the client <bcp14>MUST</bcp14> proceed as follows.</t>
        <t>If the client is an automated application,
then it <bcp14>SHOULD</bcp14> terminate the communication attempt with a bad
certificate error and log the error appropriately.  The application <bcp14>MAY</bcp14>
provide a configuration setting to disable this behavior, but it <bcp14>MUST NOT</bcp14>
disable this security control by default.</t>
        <t>If the client is one that is directly controlled by a human
user, then it <bcp14>SHOULD</bcp14> inform the user of the identity mismatch and
automatically terminate the communication attempt with a bad certificate
error in order to prevent users from inadvertently bypassing security
protections in hostile situations.
Such clients <bcp14>MAY</bcp14> give advanced users the option of proceeding
with acceptance despite the identity mismatch.  Although this behavior can be
appropriate in certain specialized circumstances, it needs to be handled with
extreme caution, for example by first encouraging even an advanced user to
terminate the communication attempt and, if they choose to proceed anyway, by
forcing the user to view the entire certification path before proceeding.</t>
        <t>The application <bcp14>MAY</bcp14> also present the user with the ability to accept the
presented certificate as valid for subsequent connections.  Such ad hoc
"pinning" <bcp14>SHOULD NOT</bcp14> restrict future connections to just the pinned
certificate. Local policy that statically enforces a given certificate for a
given peer <bcp14>SHOULD</bcp14> be made available only as prior configuration rather than a
just-in-time override for a failed connection.</t>
      </section>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <section anchor="security-wildcards">
        <name>Wildcard Certificates</name>
        <t>Wildcard certificates automatically vouch for any single-label hostnames
within their domain, but not multiple levels of domains.  This can be
convenient for administrators but also poses the risk of vouching for rogue
or buggy hosts. For example, see <xref target="Defeating-SSL"/> (beginning at slide 91) and
<xref target="HTTPSbytes"/> (slides 38-40).</t>
        <t>As specified in <xref target="verify-domain"/>, restricting the presented identifiers in certificates to only one
wildcard character (e.g., "*.bigcompany.example" but not "*.*.bigcompany.example") and
restricting the use of wildcards to only the left-most domain label can
help to mitigate certain aspects of the attack described in <xref target="Defeating-SSL"/>.</t>
        <t>That same attack also relies on the initial use of a cleartext HTTP connection,
which is hijacked by an active on-path attacker and subsequently upgraded to
HTTPS.  In order to mitigate such an attack, administrators and software
developers are advised to follow the strict TLS guidelines provided in
<xref section="3.2" sectionFormat="comma" target="RFC9325"/>.</t>
        <t>Because the attack described in <xref target="HTTPSbytes"/> relies on an underlying
cross-site scripting (XSS) attack, web browsers and applications are advised
to follow best practices to prevent XSS attacks; for example, see <xref target="XSS"/>, which was
published by the Open Web Application Security Project (OWASP).</t>
        <t>Protection against a wildcard that identifies a public suffix
<xref target="Public-Suffix"/>, such as <tt>*.co.uk</tt> or <tt>*.com</tt>, is beyond the scope of this
document.</t>
        <t>As noted in <xref target="design"/>, application protocols can disallow the use of
wildcard certificates entirely as a more foolproof mitigation.</t>
      </section>
      <section anchor="security-uri">
        <name>Uniform Resource Identifiers</name>
        <t>The URI-ID type is a subjectAltName entry of type uniformResourceIdentifier
as defined in <xref target="RFC5280"/>.  For the purposes of this specification, the URI-ID
<bcp14>MUST</bcp14> include both a "scheme" and a "host" component that matches the "reg-name"
rule; if the entry does not include both, it is not a valid URI-ID and <bcp14>MUST</bcp14> be
ignored.  Any other components are ignored because only the "scheme" and "host"
components are used for certificate matching as specified under <xref target="verify"/>.</t>
        <t>The quoted component names in the previous paragraph represent the associated
<xref target="RFC5234"/> productions from the IETF Proposed Standard for Uniform Resource Identifiers
<xref target="RFC3986"/>.  Although the reader should be aware that some applications (e.g.,
web browsers) might instead conform to the Uniform Resource Locator (URL)
specification maintained by the WHATWG <xref target="URL"/>, it is not expected that
differences between the URI and URL specifications would manifest themselves
in certificate matching.</t>
      </section>
      <section anchor="security-idn">
        <name>Internationalized Domain Names</name>
        <t>This document specifies only matching between reference identifiers and
presented identifiers, not the visual presentation of domain names. 
Specifically, the matching of internationalized domain names is performed on
A-labels only (<xref target="verify-domain"/>). The limited scope of this specification likely
mitigates potential confusion caused by the use of visually similar characters
in domain names (for example, as described in <xref section="4.4" sectionFormat="of" target="RFC5890"/>,
<xref target="UTS-36"/>, and <xref target="UTS-39"/>); in any case, such concerns are a matter for
application-level protocols and user interfaces, not the matching of certificates.</t>
      </section>
      <section anchor="ip-addresses">
        <name>IP Addresses</name>
        <t>The TLS Server Name Indication (SNI) extension only conveys domain names.
Therefore, a client with an IP-ID reference identity cannot present any
information about its reference identity when connecting to a server.  Servers
that wish to present an IP-ID therefore need to present this identity when a
connection is made without SNI.</t>
        <t>The textual representation of an IPv4 address might be misinterpreted
as a valid FQDN in some contexts.  This can result in different
security treatment that might cause different components of a system
to classify the value differently, which might lead to
vulnerabilities.  Consider a system in which one component enforces a
security rule that is conditional on the type of identifier but 
misclassifies an IP address as an FQDN, whereas a second component 
correctly classifies the identifier but incorrectly assumes that 
rules regarding IP addresses have been enforced by the first 
component. As a result, the system as a whole might behave in an 
insecure manner.  Consistent classification of identifiers avoids 
this problem.</t>
        <t>See also <xref target="design"/>, particularly the last paragraph.</t>
      </section>
      <section anchor="security-multi">
        <name>Multiple Presented Identifiers</name>
        <t>A given application service might be addressed by multiple DNS domain names
for a variety of reasons, and a given deployment might service multiple
domains or protocols.
TLS extensions such as the Server Name Indication (SNI), as discussed in <xref section="3" sectionFormat="comma" target="RFC6066"/>, and ALPN, as discussed in <xref target="RFC7301"/>, provide a way for the application
to indicate the desired identifier and protocol to the server, which it
can then use to select the most appropriate certificate.</t>
        <t>This specification allows multiple DNS-IDs, IP-IDs, SRV-IDs, or URI-IDs in a
certificate.  As a result, an application service can use the same
certificate for multiple hostnames, such as when a client does not support
the TLS SNI extension, or for multiple protocols, such as SMTP and HTTP, on a
single hostname.  Note that the set of names in a certificate is the set of
names that could be affected by a compromise of any other server named in
the set: the strength of any server in the set of names is determined by the
weakest of those servers that offer the names.</t>
        <t>The way to mitigate this risk is to limit the number of names that
any server can speak for and to ensure that all servers in the set
have a strong minimum configuration as described in <xref target="RFC9325" sectionFormat="comma" section="3.9"/>.</t>
      </section>
      <section anchor="multiple-reference-identifiers">
        <name>Multiple Reference Identifiers</name>
        <t>This specification describes how a client may construct multiple acceptable
reference identifiers and may match any of those reference identifiers with
the set of presented identifiers. <xref section="4.2.1.10" sectionFormat="comma" target="RFC5280"/> describes a
mechanism to allow CA certificates to be constrained in the set of presented
identifiers that they may include within server certificates.  However, these
constraints only apply to the explicitly enumerated name forms. For example,
a CA that is only name-constrained for DNS-IDs is not constrained for SRV-IDs
and URI-IDs, unless those name forms are also explicitly included within the
name constraints extension.</t>
        <t>A client that constructs multiple reference identifiers of different types,
such as both DNS-IDs and SRV-IDs as described in <xref target="verify-reference-rules"/>,
<bcp14>SHOULD</bcp14> take care to ensure that CAs issuing such certificates are
appropriately constrained. This <bcp14>MAY</bcp14> take the form of local policy through
agreement with the issuing CA or <bcp14>MAY</bcp14> be enforced by the client requiring
that if one form of presented identifier is constrained, such as a dNSName
name constraint for DNS-IDs, then all other forms of acceptable reference
identities are also constrained, such as requiring a uniformResourceIndicator
name constraint for URI-IDs.</t>
      </section>
      <section anchor="certificate-trust">
        <name>Certificate Trust</name>
        <t>This document assumes that if a client trusts a given CA, it trusts all
certificates issued by that CA.  The certificate checking process does not
include additional checks for bad behavior by the hosts identified with
such certificates, for instance, rogue servers or buggy applications.  Any
additional checks (e.g., checking the server name against trusted block
lists) are the responsibility of the application protocol or the client
itself.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>

<displayreference target="RFC1034" to="DNS-CONCEPTS"/>
<displayreference target="RFC2782" to="DNS-SRV"/>
<displayreference target="RFC4592" to="DNS-WILDCARDS"/>
<displayreference target="RFC5890" to="IDNA-DEFS"/>
<displayreference target="RFC5891" to="IDNA-PROTO"/>
<displayreference target="RFC4514" to="LDAP-DN"/>
<displayreference target="RFC5280" to="PKIX"/>
<displayreference target="RFC4985" to="SRVNAME"/>
<displayreference target="RFC3986" to="URI"/>
<displayreference target="RFC9325" to="TLS-REC"/>
<displayreference target="RFC0791" to="IPv4"/>
<displayreference target="RFC4291" to="IPv6"/>
<displayreference target="RFC5234" to="ABNF"/>
<displayreference target="RFC8555" to="ACME"/>
<displayreference target="RFC7301" to="ALPN"/>
<displayreference target="RFC6698" to="DANE"/>
<displayreference target="RFC4343" to="DNS-CASE"/>
<displayreference target="RFC7858" to="DNS-OVER-TLS"/>
<displayreference target="RFC9147" to="DTLS"/>
<displayreference target="RFC6186" to="EMAIL-SRV"/>
<displayreference target="RFC9110" to="HTTP"/>
<displayreference target="RFC3403" to="NAPTR"/>
<displayreference target="RFC8915" to="NTS"/>
<displayreference target="RFC9001" to="QUIC"/>
<displayreference target="RFC4949" to="SECTERMS"/>
<displayreference target="RFC3261" to="SIP"/>
<displayreference target="RFC5922" to="SIP-CERTS"/>
<displayreference target="RFC5630" to="SIP-SIPS"/>
<displayreference target="RFC8689" to="SMTP-TLS"/>
<displayreference target="RFC8446" to="TLS"/>
<displayreference target="RFC9345" to="TLS-SUBCERTS"/>
<displayreference target="RFC9461" to="SVCB-FOR-DNS"/>
<displayreference target="RFC9460" to="SVCB-FOR-HTTPS"/>
<displayreference target="RFC6125" to="VERIFY"/>
<displayreference target="RFC6120" to="XMPP"/>
<displayreference target="RFC6066" to ="TLS-EXT"/>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1034.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2782.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4592.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5890.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5891.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4514.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4985.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9325.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.0791.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4291.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
      </references>
      <references>
        <name>Informative References</name>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6066.xml"/>	
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8555.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7301.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6698.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4343.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7858.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9147.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6186.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3403.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8915.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9001.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4949.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5922.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5630.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8689.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9345.xml"/>

<!-- [SVCB-FOR-DNS] [I-D.ietf-add-svcb-dns] is now RFC 9461 -->
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9461.xml"/>

<!-- [SVCB-FOR-HTTPS] [I-D.ietf-dnsop-svcb-https] is now RFC 9460 -->
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9460.xml"/>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6125.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6120.xml"/>

        <reference anchor="ALPACA" target="https://alpaca-attack.com/ALPACA.pdf">
          <front>
            <title>ALPACA: Application Layer Protocol Confusion - Analyzing and Mitigating Cracks in TLS Authentication</title>
            <author initials="M." surname="Brinkmann" fullname="Marcus Brinkmann">
              <organization>Ruhr University Bochum</organization>
            </author>
            <author initials="C." surname="Dresen" fullname="Christian Dresen">
              <organization>Münster University of Applied Sciences</organization>
            </author>
            <author initials="R." surname="Merget" fullname="Robert Merget">
              <organization>Ruhr University Bochum</organization>
            </author>
            <author initials="D." surname="Poddebniak" fullname="Damian Poddebniak">
              <organization>Münster University of Applied Sciences</organization>
            </author>
            <author initials="J." surname="Müller" fullname="Jens Müller">
              <organization>Ruhr University Bochum</organization>
            </author>
            <author initials="J." surname="Somorovsky" fullname="Juraj Somorovsky">
              <organization>Paderborn University</organization>
            </author>
            <author initials="J." surname="Schwenk" fullname="Jörg Schwenk">
              <organization>Ruhr University Bochum</organization>
            </author>
            <author initials="S." surname="Schinzel" fullname="Sebastian Schinzel">
              <organization>Ruhr University Bochum</organization>
            </author>
            <date year="2021" month="September"/>
          </front>
	  <refcontent>30th USENIX Security Symposium (USENIX Security 21)</refcontent>
        </reference>

        <reference anchor="HTTPSbytes" target="https://media.blackhat.com/bh-ad-10/Hansen/Blackhat-AD-2010-Hansen-Sokol-HTTPS-Can-Byte-Me-slides.pdf">
          <front>
            <title>HTTPS Can Byte Me</title>
            <author initials="J." surname="Sokol" fullname="Josh Sokol">
              <organization>SecTheory Ltd.</organization>
            </author>
            <author initials="R." surname="Hansen" fullname="Robert Hansen">
              <organization>SecTheory Ltd.</organization>
            </author>
            <date year="2010" month="November"/>
          </front>
          <refcontent>Black Hat Briefings</refcontent>
        </reference>

        <reference anchor="Defeating-SSL" target="https://www.blackhat.com/presentations/bh-dc-09/Marlinspike/BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf">
          <front>
            <title>New Tricks for Defeating SSL in Practice</title>
            <author initials="M." surname="Marlinspike" fullname="Moxie Marlinspike">
              <organization/>
            </author>
            <date year="2009" month="February"/>
          </front>
          <refcontent>Black Hat DC</refcontent>
        </reference>

        <reference anchor="Public-Suffix" target="https://publicsuffix.org">
          <front>
            <title>Public Suffix List</title>
            <author>
              <organization>Mozilla Foundation</organization>
            </author>
          </front>
        </reference>

        <reference anchor="SECURE-CONTEXTS" target="https://www.w3.org/TR/secure-contexts/">
          <front>
            <title>Secure Contexts</title>
            <author initials="M." surname="West" fullname="Mike West">
              <organization/>
            </author>
            <date month="September" year="2021"/>
          </front>
	  <refcontent>W3C Candidate Recommendation Draft</refcontent>
        </reference>

        <reference anchor="US-ASCII">
          <front>
            <title>Coded Character Sets - 7-bit American Standard Code for Information Interchange (7-Bit ASCII)</title>
            <author>
              <organization>American National Standards Institute</organization>
            </author>
            <date year="2007" month="June"/>
          </front>
          <seriesInfo name="ANSI INCITS" value="4-1986 (R2007)"/>
        </reference>

        <reference anchor="URL" target="https://url.spec.whatwg.org/">
          <front>
            <title>URL</title>
            <author initials="A." surname="van Kesteren" fullname="Anne van Kesteren">
              <organization/>
            </author>
            <date month="September" year="2023"/>
          </front>
	  <refcontent>WHATWG Living Standard</refcontent>
        </reference>

        <reference anchor="UTS-36" target="https://unicode.org/reports/tr36/">
          <front>
            <title>Unicode Security Considerations</title>
            <author initials="M." surname="Davis" fullname="Mark Davis">
              <organization/>
            </author>
            <author initials="M." surname="Suignard" fullname="Michel Suignard">
              <organization/>
            </author>
            <date month= "September" year="2014"/>
          </front>
	  <seriesInfo name="Unicode Technical Report" value="#36"/>
	    <refcontent>Revision 15</refcontent>
        </reference>

        <reference anchor="UTS-39" target="https://unicode.org/reports/tr39/">
          <front>
            <title>Unicode Security Mechanisms</title>
            <author initials="M." surname="Davis" fullname="Mark Davis">
              <organization/>
            </author>
            <author initials="M." surname="Suignard" fullname="Michel Suignard">
              <organization/>
            </author>
            <date month="September" year="2023"/>
          </front>
	  <seriesInfo name="Unicode Technical Standard" value="#39"/>
	  <refcontent>Version 15.1.0, Revision 28</refcontent>
        </reference>

        <reference anchor="X.509">
          <front>
            <title>Information Technology - Open Systems Interconnection - The Directory: Public-key and attribute certificate frameworks</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date month="October" year="2019"/>
          </front>
	  <seriesInfo name="ISO/IEC" value="9594-8"/>
          <seriesInfo name="ITU-T Recommendation" value="X.509"/>
        </reference>

        <reference anchor="X.690">
          <front>
            <title>Information Technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date month="February" year="2021"/>
          </front>
	  <seriesInfo name="ISO/IEC" value="8825-1:2021 (E)"/>
          <seriesInfo name="ITU-T Recommendation" value="X.690"/>
        </reference>

        <reference anchor="WSC-UI" target="https://www.w3.org/TR/2010/REC-wsc-ui-20100812/">
          <front>
            <title>Web Security Context: User Interface Guidelines</title>
            <author initials="A." surname="Saldhana" fullname="Anil Saldhana">
              <organization/>
            </author>
            <author initials="T." surname="Roessler" fullname="Thomas Roessler">
              <organization/>
            </author>
            <date year="2010" month="August"/>
          </front>
	    <seriesInfo name="W3C Recommendation" value="REC-wsc-ui-20100812"/>
        </reference>
	
        <reference anchor="XSS" target="https://owasp.org/www-community/attacks/xss/">
          <front>
            <title>Cross Site Scripting (XSS)</title>
            <author>
              <organization>Kirsten, S., et al.</organization>
            </author>
            <date year="2020"/>
          </front>
	  <refcontent>OWASP Foundation</refcontent>
        </reference>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>

      </references>
    </references>
<section anchor="changes">
      <name>Changes from RFC 6125</name>
      <t>This document revises and obsoletes <xref target="RFC6125"/> based
on the decade of experience and changes since it was published.
The major changes, in no particular order, include:</t>
      <ul spacing="normal">
        <li>The only legal place for a certificate wildcard is as the complete left-most
label in a domain name.</li>
        <li>The server identity can only be expressed in the subjectAltNames
extension; it is no longer valid to use the commonName RDN,
known as <tt>CN-ID</tt> in <xref target="RFC6125"/>.</li>
        <li>Detailed discussion of pinning (configuring use of a certificate that
doesn't match the criteria in this document) has been removed and replaced
with two paragraphs in <xref target="outcome"/>.</li>
        <li>The sections detailing different target audiences and which sections
to read (first) have been removed.</li>
        <li>References to the X.500 directory, the survey of prior art, and the
sample text in Appendix A have been removed.</li>
        <li>All references have been updated to the latest versions.</li>
        <li>The TLS SNI extension is no longer new; it is commonplace.</li>
        <li>Additional text on multiple identifiers, and their security considerations,
has been added.</li>
        <li>IP-ID reference identifiers have been added.  This builds on the definition in <xref section="4.3.5" sectionFormat="comma" target="RFC9110"/>.</li>
        <li>The document title has been shortened because the previous title was difficult to cite.</li>
      </ul>
    </section>
    <section numbered="false" anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>We gratefully acknowledge everyone who contributed to the previous
version of this specification <xref target="RFC6125"/>.
Thanks also to <contact fullname="Carsten Bormann"/> for converting the previous version of this specification to Markdown so that we could more easily use <contact fullname="Martin Thomson's"/> <tt>i-d-template</tt>
software.</t>
<t>In addition to discussions within the UTA Working Group, the following people
provided official reviews or especially significant feedback:
<contact fullname="Corey Bonnell"/>,
<contact fullname="Roman Danyliw"/>,
<contact fullname="Viktor Dukhovni"/>,
<contact fullname="Lars Eggert"/>,
<contact fullname="Patrik Fältström"/>,
<contact fullname="Jim Fenton"/>,
<contact fullname="Olle Johansson"/>,
<contact fullname="John Klensin"/>,
<contact fullname="Murray Kucherawy"/>,
<contact fullname="Warren Kumari"/>,
<contact fullname="John Mattson"/>,
<contact fullname="Alexey Melnikov"/>,
<contact fullname="Derrell Piper"/>,
<contact fullname="Maria Ines Robles"/>,
<contact fullname="Rob Sayre"/>,
<contact fullname="Yaron Sheffer"/>,
<contact fullname="Ryan Sleevi"/>,
<contact fullname="Brian Smith"/>,
<contact fullname="Petr Špaček"/>,
<contact fullname="Orie Steele"/>,
<contact fullname="Martin Thomson"/>,
<contact fullname="Joe Touch"/>,
<contact fullname="Éric Vyncke"/>,
<contact fullname="Paul Wouters"/>,
and
<contact fullname="Qin Wu"/>.</t>
      <t>A few descriptive sentences were borrowed from <xref target="RFC9325"/>.</t>
    </section>
    <section anchor="contributors" numbered="false">
      <name>Contributors</name>
      <t><contact fullname="Jeff Hodges"/> coauthored the previous version of this specification <xref target="RFC6125"/>.
The authors gratefully acknowledge his essential contributions to this work.</t>
      <t><contact fullname="Martin Thomson"/> contributed the text on the handling of IP-IDs.</t>
    </section>            
  </back>
</rfc>
