Internet Engineering Task Force (IETF) P. Saint-Andre
Request for Comments: 6125 Cisco
Category: Standards Track J. Hodges
ISSN: 2070-1721 PayPal
March 2011 Representation and Verification of Domain-Based Application Service
Identity within Internet Public Key Infrastructure Using X.509 (PKIX)
Certificates in the Context of Transport Layer Security (TLS)
Many application technologies enable secure communication between two
entities by means of Internet Public Key Infrastructure Using X.509
(PKIX) certificates in the context of Transport Layer Security (TLS).
This document specifies procedures for representing and verifying the
identity of application services in such interactions.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Therefore, to codify secure procedures for the implementation and
deployment of PKIX-based authentication, this document specifies
recommended procedures for representing and verifying application
service identity in certificates intended for use in application
protocols employing TLS.
The primary audience for this document consists of application
protocol designers, who can reference this document instead of
defining their own rules for the representation and verification of
application service identity. Secondarily, the audience consists of
certification authorities, service providers, and client developers
from technology communities that might reuse the recommendations in
this document when defining certificate issuance policies, generating
certificate signing requests, or writing software algorithms for
1.3. How to Read This Document
This document is longer than the authors would have liked because it
was necessary to carefully define terminology, explain the underlying
concepts, define the scope, and specify recommended behavior for both
certification authorities and application software implementations.
The following sections are of special interest to various audiences:
o Protocol designers might want to first read the checklist in
o Certification authorities might want to first read the
recommendations for representation of server identity in
o Service providers might want to first read the recommendations for
requesting of server certificates in Section 5.
o Software implementers might want to first read the recommendations
for verification of server identity in Section 6.
The sections on terminology (Section 1.8), naming of application
services (Section 2), document scope (Section 1.7), and the like
provide useful background information regarding the recommendations
and guidelines that are contained in the above-referenced sections,
but are not absolutely necessary for a first reading of this
This document does not supersede the rules for certificate issuance
or validation provided in [PKIX]. Therefore, [PKIX] is authoritative
on any point that might also be discussed in this document.
Furthermore, [PKIX] also governs any certificate-related topic on
which this document is silent, including but not limited to
certificate syntax, certificate extensions such as name constraints
and extended key usage, and handling of certification paths.
This document addresses only name forms in the leaf "end entity"
server certificate, not any name forms in the chain of certificates
used to validate the server certificate. Therefore, in order to
ensure proper authentication, application clients need to verify the
entire certification path per [PKIX].
This document also does not supersede the rules for verifying service
identity provided in specifications for existing application
protocols published prior to this document, such as those excerpted
under Appendix B. However, the procedures described here can be
referenced by future specifications, including updates to
specifications for existing application protocols if the relevant
technology communities agree to do so.
1.5. Overview of Recommendations
To orient the reader, this section provides an informational overview
of the recommendations contained in this document.
For the primary audience of application protocol designers, this
document provides recommended procedures for the representation and
verification of application service identity within PKIX certificates
used in the context of TLS.
For the secondary audiences, in essence this document encourages
certification authorities, application service providers, and
application client developers to coalesce on the following practices:
o Move away from including and checking strings that look like
domain names in the subject's Common Name.
o Move toward including and checking DNS domain names via the
subjectAlternativeName extension designed for that purpose:
o Move toward including and checking even more specific
subjectAlternativeName extensions where appropriate for using the
protocol (e.g., uniformResourceIdentifier and the otherName form
o Move away from the issuance of so-called wildcard certificates
(e.g., a certificate containing an identifier for
These suggestions are not entirely consistent with all practices that
are currently followed by certification authorities, client
developers, and service providers. However, they reflect the best
aspects of current practices and are expected to become more widely
adopted in the coming years.
1.6. Generalization from Current Technologies
This document attempts to generalize best practices from the many
application technologies that currently use PKIX certificates with
TLS. Such technologies include, but are not limited to:
o The Internet Message Access Protocol [IMAP] and the Post Office
Protocol [POP3]; see also [USINGTLS]
o The Hypertext Transfer Protocol [HTTP]; see also [HTTP-TLS]
o The Lightweight Directory Access Protocol [LDAP]; see also
[LDAP-AUTH] and its predecessor [LDAP-TLS]
o The Simple Mail Transfer Protocol [SMTP]; see also [SMTP-AUTH] and
o The Extensible Messaging and Presence Protocol [XMPP]; see also
o The Network News Transfer Protocol [NNTP]; see also [NNTP-TLS]
o The NETCONF Configuration Protocol [NETCONF]; see also
[NETCONF-SSH] and [NETCONF-TLS]
o The Syslog Protocol [SYSLOG]; see also [SYSLOG-TLS] and
o The Session Initiation Protocol [SIP]; see also [SIP-CERTS]
o The Simple Network Management Protocol [SNMP]; see also [SNMP-TLS]
o The General Internet Signalling Transport [GIST]
However, as noted, this document does not supersede the rules for
verifying service identity provided in specifications for those
1.7.1. In Scope
This document applies only to service identities associated with
fully qualified DNS domain names, only to TLS and DTLS (or the older
Secure Sockets Layer (SSL) technology), and only to PKIX-based
systems. As a result, the scenarios described in the following
section are out of scope for this specification (although they might
be addressed by future specifications).
1.7.2. Out of Scope
The following topics are out of scope for this specification:
o Client or end-user identities.
Certificates representing client or end-user identities (e.g., the
rfc822Name identifier) can be used for mutual authentication
between a client and server or between two clients, thus enabling
stronger client-server security or end-to-end security. However,
certification authorities, application developers, and service
operators have less experience with client certificates than with
server certificates, thus giving us fewer models from which to
generalize and a less solid basis for defining best practices.
o Identifiers other than fully qualified DNS domain names.
Some certification authorities issue server certificates based on
IP addresses, but preliminary evidence indicates that such
certificates are a very small percentage (less than 1%) of issued
certificates. Furthermore, IP addresses are not necessarily
reliable identifiers for application services because of the
existence of private internets [PRIVATE], host mobility, multiple
interfaces on a given host, Network Address Translators (NATs)
resulting in different addresses for a host from different
locations on the network, the practice of grouping many hosts
together behind a single IP address, etc. Most fundamentally,
most users find DNS domain names much easier to work with than IP
addresses, which is why the domain name system was designed in the
first place. We prefer to define best practices for the much more
common use case and not to complicate the rules in this
Furthermore, we focus here on application service identities, not
specific resources located at such services. Therefore this
document discusses Uniform Resource Identifiers [URI] only as a
way to communicate a DNS domain name (via the URI "host" component
or its equivalent), not as a way to communicate other aspects of a
service such as a specific resource (via the URI "path" component)
or parameters (via the URI "query" component).
We also do not discuss attributes unrelated to DNS domain names,
such as those defined in [X.520] and other such specifications
(e.g., organizational attributes, geographical attributes, company
logos, and the like).
o Security protocols other than [TLS], [DTLS], or the older Secure
Sockets Layer (SSL) technology.
Although other secure, lower-layer protocols exist and even employ
PKIX certificates at times (e.g., IPsec [IPSEC]), their use cases
can differ from those of TLS-based and DTLS-based application
technologies. Furthermore, application technologies have less
experience with IPsec than with TLS, thus making it more difficult
to gather feedback on proposed best practices.
o Keys or certificates employed outside the context of PKIX-based
Some deployed application technologies use a web of trust model
based on or similar to OpenPGP [OPENPGP], or use self-signed
certificates, or are deployed on networks that are not directly
connected to the public Internet and therefore cannot depend on
Certificate Revocation Lists (CRLs) or the Online Certificate
Status Protocol [OCSP] to check CA-issued certificates. However,
the method for binding a public key to an identifier in OpenPGP
differs essentially from the method in X.509, the data in self-
signed certificates has not been certified by a third party in any
way, and checking of CA-issued certificates via CRLs or OCSP is
critically important to maintaining the security of PKIX-based
systems. Attempting to define best practices for such
technologies would unduly complicate the rules defined in this
o Certification authority policies, such as:
* What types or "classes" of certificates to issue and whether to
apply different policies for them (e.g., allow the wildcard
character in certificates issued to individuals who have
provided proof of identity but do not allow the wildcard
character in "Extended Validation" certificates [EV-CERTS]).
* Whether to issue certificates based on IP addresses (or some
other form, such as relative domain names) in addition to fully
qualified DNS domain names.
* Which identifiers to include (e.g., whether to include SRV-IDs
or URI-IDs as defined in the body of this specification).
* How to certify or validate fully qualified DNS domain names and
application service types.
* How to certify or validate other kinds of information that
might be included in a certificate (e.g., organization name).
o Resolution of DNS domain names.
Although the process whereby a client resolves the DNS domain name
of an application service can involve several steps (e.g., this is
true of resolutions that depend on DNS SRV resource records,
Naming Authority Pointer (NAPTR) DNS resource records [NAPTR], and
related technologies such as [S-NAPTR]), for our purposes we care
only about the fact that the client needs to verify the identity
of the entity with which it communicates as a result of the
resolution process. Thus the resolution process itself is out of
scope for this specification.
o User interface issues.
In general, such issues are properly the responsibility of client
software developers and standards development organizations
dedicated to particular application technologies (see, for
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.
application service: A service on the Internet that enables
interactive and automated clients to connect for the purpose of
retrieving or uploading information, communicating with other
entities, or connecting to a broader network of services.
application service provider: An organization or individual that
hosts or deploys an application service.
application service type: A formal identifier for the application
protocol used to provide a particular kind of application service
at a domain; the application service type typically takes the form
of a Uniform Resource Identifier scheme [URI] or a DNS SRV Service
attribute-type-and-value pair: A colloquial name for the ASN.1-based
construction comprising a Relative Distinguished Name (RDN), which
itself is a building-block component of Distinguished Names. See
Section 2 of [LDAP-DN].
automated client: A software agent or device that is not directly
controlled by a human user.
delegated domain: A domain name or host name that is explicitly
configured for communicating with the source domain, by either (a)
the human user controlling an interactive client or (b) a trusted
administrator. In case (a), one example of delegation is an
account setup that specifies the domain name of a particular host
to be used for retrieving information or connecting to a network,
which might be different from the server portion of the user's
account name (e.g., a server at mailhost.example.com for
connecting to an IMAP server hosting an email address of
firstname.lastname@example.org). In case (b), one example of delegation is an
admin-configured host-to-address/address-to-host lookup table.
derived domain: A domain name or host name that a client has derived
from the source domain in an automated fashion (e.g., by means of
a [DNS-SRV] lookup).
identifier: 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.
identifier type: A formally defined category of identifier that can
be included in a certificate and therefore that can also be used
for matching purposes. For conciseness and convenience, we define
the following identifier types of interest, which are based on
those found in the PKIX specification [PKIX] and various PKIX
* CN-ID = a Relative Distinguished Name (RDN) in the certificate
subject field that contains one and only one attribute-type-
and-value pair of type Common Name (CN), where the value
matches the overall form of a domain name (informally, dot-
separated letter-digit-hyphen labels); see [PKIX] and also
* DNS-ID = a subjectAltName entry of type dNSName; see [PKIX]
* SRV-ID = a subjectAltName entry of type otherName whose name
form is SRVName; see [SRVNAME]
* URI-ID = a subjectAltName entry of type
uniformResourceIdentifier whose value includes both (i) a
"scheme" and (ii) a "host" component (or its equivalent) that
matches the "reg-name" rule (where the quoted terms represent
the associated [ABNF] productions from [URI]); see [PKIX] and
interactive client: A software agent or device that is directly
controlled by a human user. (Other specifications related to
security and application protocols, such as [WSC-UI], often refer
to this entity as a "user agent".)
pinning: The act of establishing a cached name association between
the application service's certificate and one of the client's
reference identifiers, despite the fact that none of the presented
identifiers matches the given reference identifier. Pinning is
accomplished by allowing a human user to positively accept the
mismatch during an attempt to communicate with the application
service. Once a cached name association is established, the
certificate is said to be pinned to the reference identifier and
in future communication attempts the client simply verifies that
the service's presented certificate matches the pinned
certificate, as described under Section 6.6.2. (A similar
definition of "pinning" is provided in [WSC-UI].)
PKIX: PKIX is a short name for the Internet Public Key
Infrastructure using X.509 defined in RFC 5280 [PKIX], which
comprises a profile of the X.509v3 certificate specifications and
X.509v2 certificate revocation list (CRL) specifications for use
in the Internet.
PKIX-based system: A software implementation or deployed service
that makes use of X.509v3 certificates and X.509v2 certificate
revocation lists (CRLs).
PKIX certificate: An X.509v3 certificate generated and employed in
the context of PKIX.
presented identifier: An identifier that is 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.
reference identifier: An identifier, constructed from a source
domain and optionally an application service type, used by the
client for matching purposes when examining presented identifiers.
source domain: The fully qualified DNS domain name that a client
expects an application service to present in the certificate
(e.g., "www.example.com"), typically input by a human user,
configured into a client, or provided by reference such as in a
hyperlink. The combination of a source domain and, optionally, an
application service type enables a client to construct one or more
subjectAltName entry: An identifier placed in a subjectAltName
subjectAltName extension: A standard PKIX certificate extension
[PKIX] enabling identifiers of various types to be bound to the
certificate subject -- in addition to, or in place of, identifiers
that may be embedded within or provided as a certificate's subject
subject field: The subject field of a PKIX certificate identifies
the entity associated with the public key stored in the subject
public key field (see Section 220.127.116.11 of [PKIX]).
subject name: In an overall sense, a subject's name(s) can be
represented by or in the subject field, the subjectAltName
extension, or both (see [PKIX] for details). More specifically,
the term often refers to the name of a PKIX certificate's subject,
encoded as the X.501 type Name and conveyed in a certificate's
subject field (see Section 18.104.22.168 of [PKIX]).
TLS client: An entity that assumes the role of a client in a
Transport Layer Security [TLS] negotiation. In this specification
we generally assume that the TLS client is an (interactive or
automated) application client; however, in application protocols
that enable server-to-server communication, the TLS client could
be a peer application service.
TLS server: An entity that assumes the role of a server in a
Transport Layer Security [TLS] negotiation; in this specification
we assume that the TLS server is an application service.
Most security-related terms in this document are to be understood in
the sense defined in [SECTERMS]; such terms include, but are not
limited to, "attack", "authentication", "authorization",
"certification authority", "certification path", "certificate",
"credential", "identity", "self-signed certificate", "trust", "trust
anchor", "trust chain", "validate", and "verify".
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in RFC
2. Naming of Application Services
This section discusses naming of application services on the
Internet, followed by a brief tutorial about subject naming in PKIX.
2.1. Naming Application Services
This specification assumes that the name of an application service is
based on a DNS domain name (e.g., "example.com") -- supplemented in
some circumstances by an application service type (e.g., "the IMAP
server at example.com").
From the perspective of the application client or user, some names
are direct because they are provided directly by a human user (e.g.,
via runtime input, prior configuration, or explicit acceptance of a
client communication attempt), whereas other names are indirect
because they are automatically resolved by the client based on user
input (e.g., a target name resolved from a source name using DNS SRV
or NAPTR records). This dimension matters most for certificate
consumption, specifically verification as discussed in this document.
From the perspective of the application service, some names are
unrestricted because they can be used in any type of service (e.g., a
certificate might be reused for both the HTTP service and the IMAP
service at example.com), whereas other names are restricted because
they can be used in only one type of service (e.g., a special-purpose
certificate that can be used only for an IMAP service). This
dimension matters most for certificate issuance.
Therefore, we can categorize the identifier types of interest as
o A CN-ID is direct and unrestricted.
o A DNS-ID is direct and unrestricted.
o An SRV-ID can be either direct or (more typically) indirect, and
o A URI-ID is direct and restricted.
We summarize this taxonomy in the following table.
| | Direct | Restricted |
| CN-ID | Yes | No |
| DNS-ID | Yes | No |
| SRV-ID | Either | Yes |
| URI-ID | Yes | Yes |
When implementing software, deploying services, and issuing
certificates for secure PKIX-based authentication, it is important to
keep these distinctions in mind. In particular, best practices
differ somewhat for application server implementations, application
client implementations, application service providers, and
certification authorities. Ideally, protocol specifications that
reference this document will specify which identifiers are mandatory-
to-implement by servers and clients, which identifiers ought to be
supported by certificate issuers, and which identifiers ought to be
requested by application service providers. Because these
requirements differ across applications, it is impossible to
categorically stipulate universal rules (e.g., that all software
implementations, service providers, and certification authorities for
all application protocols need to use or support DNS-IDs as a
baseline for the purpose of interoperability).
However, it is preferable that each application protocol will at
least define a baseline that applies to the community of software
developers, application service providers, and CAs actively using or
supporting that technology (one such community, the CA/Browser Forum,
has codified such a baseline for "Extended Validation Certificates"
2.2. DNS Domain Names
For the purposes of this specification, the name of an application
service is (or is based on) a DNS domain name that conforms to one of
the following forms:
1. A "traditional domain name", i.e., a fully qualified DNS domain
name or "FQDN" (see [DNS-CONCEPTS]) all of whose labels are "LDH
labels" as described in [IDNA-DEFS]. Informally, such labels are
constrained to [US-ASCII] letters, digits, and the hyphen, with
the hyphen prohibited in the first character position.
Additional qualifications apply (please refer to the above-
referenced specifications for details), but they are not relevant
to this specification.
2. An "internationalized domain name", i.e., a DNS domain name that
conforms to the overall form of a domain name (informally, dot-
separated letter-digit-hyphen labels) but includes at least one
label containing appropriately encoded Unicode code points
outside the traditional US-ASCII range. That is, it contains at
least one U-label or A-label, but otherwise may contain any
mixture of NR-LDH labels, A-labels, or U-labels, as described in
[IDNA-DEFS] and the associated documents.
2.3. Subject Naming in PKIX Certificates
In theory, the Internet Public Key Infrastructure using X.509 [PKIX]
employs the global directory service model defined in [X.500] and
[X.501]. Under that model, information is held in a directory
information base (DIB) and entries in the DIB are organized in a
hierarchy called the directory information tree (DIT). An object or
alias entry in that hierarchy consists of a set of attributes (each
of which has a defined type and one or more values) and is uniquely
identified by a Distinguished Name (DN). The DN of an entry is
constructed by combining the Relative Distinguished Names of its
superior entries in the tree (all the way down to the root of the
DIT) with one or more specially nominated attributes of the entry
itself (which together comprise the Relative Distinguished Name (RDN)
of the entry, so-called because it is relative to the Distinguished
Names of the superior entries in the tree). The entry closest to the
root is sometimes referred to as the "most significant" entry, and
the entry farthest from the root is sometimes referred to as the
"least significant" entry. An RDN is a set (i.e., an unordered
group) of attribute-type-and-value pairs (see also [LDAP-DN]), each
of which asserts some attribute about the entry.
In practice, the certificates used in [X.509] and [PKIX] borrow key
concepts from X.500 and X.501 (e.g., DNs and RDNs) to identify
entities, but such certificates are not necessarily part of a global
directory information base. Specifically, the subject field of a
PKIX certificate is an X.501 type Name that "identifies the entity
associated with the public key stored in the subject public key
field" (see Section 22.214.171.124 of [PKIX]). However, it is perfectly
acceptable for the subject field to be empty, as long as the
certificate contains a subject alternative name ("subjectAltName")
extension that includes at least one subjectAltName entry, because
the subjectAltName extension allows various identities to be bound to
the subject (see Section 126.96.36.199 of [PKIX]). The subjectAltName
extension itself is a sequence of typed entries, where each type is a
distinct kind of identifier.
For our purposes, an application service can be identified by a name
or names carried in the subject field (i.e., a CN-ID) and/or in one
of the following identifier types within subjectAltName entries:
Existing certificates often use a CN-ID in the subject field to
represent a fully qualified DNS domain name; for example, consider
the following three subject names, where the attribute of type Common
Name contains a string whose form matches that of a fully qualified
DNS domain name ("im.example.org", "mail.example.net", and
However, the Common Name is not strongly typed because a Common Name
might contain a human-friendly string for the service, rather than a
string whose form matches that of a fully qualified DNS domain name
(a certificate with such a single Common Name will typically have at
least one subjectAltName entry containing the fully qualified DNS
CN=A Free Chat Service,O=Example Org,C=GB
Or, a certificate's subject might contain both a CN-ID as well as
another common name attribute containing a human-friendly string:
CN=A Free Chat Service,CN=im.example.org,O=Example Org,C=GB
In general, this specification recommends and prefers use of
subjectAltName entries (DNS-ID, SRV-ID, URI-ID, etc.) over use of the
subject field (CN-ID) where possible, as more completely described in
the following sections. However, specifications that reuse this one
can legitimately encourage continued support for the CN-ID identifier
type if they have good reasons to do so, such as backward
compatibility with deployed infrastructure (see, for example,
2.3.1. Implementation Notes
Confusion sometimes arises from different renderings or encodings of
the hierarchical information contained in a certificate.
Certificates are binary objects and are encoded using the
Distinguished Encoding Rules (DER) specified in [X.690]. However,
some implementations generate displayable (a.k.a. printable)
renderings of the certificate issuer, subject field, and
subjectAltName extension, and these renderings convert the DER-
encoded sequences into a "string representation" before being
displayed. Because a certificate subject field (of type Name
[X.509], the same as for a Distinguished Name (DN) [X.501]) is an
ordered sequence, order is typically preserved in subject string
representations, although the two most prevalent subject (and DN)
string representations differ in employing left-to-right vs. right-
to-left ordering. However, because a Relative Distinguished Name
(RDN) is an unordered group of attribute-type-and-value pairs, the
string representation of an RDN can differ from the canonical DER
encoding (and the order of attribute-type-and-value pairs can differ
in the RDN string representations or display orders provided by
various implementations). Furthermore, various specifications refer
to the order of RDNs in DNs or certificate subject fields using
terminology that is implicitly related to an information hierarchy
(which may or may not actually exist), such as "most specific" vs.
"least specific", "left-most" vs. "right-most", "first" vs. "last",
or "most significant" vs. "least significant" (see, for example,
To reduce confusion, in this specification we avoid such terms and
instead use the terms provided under Section 1.8; in particular, we
do not use the term "(most specific) Common Name field in the subject
field" from [HTTP-TLS] and instead state that a CN-ID is a Relative
Distinguished Name (RDN) in the certificate subject containing one
and only one attribute-type-and-value pair of type Common Name (thus
removing the possibility that an RDN might contain multiple AVAs
(Attribute Value Assertions) of type CN, one of which could be
considered "most specific").
Finally, although theoretically some consider the order of RDNs
within a subject field to have meaning, in practice that rule is
often not observed. An AVA of type CN is considered to be valid at
any position within the subject field.