1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
|
<pre>Internet Engineering Task Force (IETF) A. Melnikov
Request for Comments: 7817 Isode Ltd
Updates: <a href="./rfc2595">2595</a>, <a href="./rfc3207">3207</a>, <a href="./rfc3501">3501</a>, <a href="./rfc5804">5804</a> March 2016
Category: Standards Track
ISSN: 2070-1721
<span class="h1">Updated Transport Layer Security (TLS) Server Identity Check Procedure</span>
<span class="h1">for Email-Related Protocols</span>
Abstract
This document describes the Transport Layer Security (TLS) server
identity verification procedure for SMTP Submission, IMAP, POP, and
ManageSieve clients. It replaces <a href="#section-2.4">Section 2.4</a> (Server Identity Check)
of <a href="./rfc2595">RFC 2595</a> and updates <a href="#section-4.1">Section 4.1</a> (Processing After the STARTTLS
Command) of <a href="./rfc3207#section-11.1">RFC 3207, Section 11.1</a> (STARTTLS Security Considerations)
of <a href="./rfc3501">RFC 3501</a>, and <a href="#section-2.2.1">Section 2.2.1</a> (Server Identity Check) of <a href="./rfc5804">RFC 5804</a>.
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 <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc7817">http://www.rfc-editor.org/info/rfc7817</a>.
Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) 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.
<span class="grey">Melnikov Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Conventions Used in This Document . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. Email Server Certificate Verification Rules . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4">4</a>. Compliance Checklist for Certification Authorities . . . . . <a href="#page-5">5</a>
4.1. Notes on Handling of Delegated Email Services by
Certification Authorities . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
5. Compliance Checklist for Mail Service Providers and
Certificate Signing Request Generation Tools . . . . . . . . <a href="#page-6">6</a>
<a href="#section-5.1">5.1</a>. Notes on Hosting Multiple Domains . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-6">6</a>. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-7">7</a>. Operational Considerations . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-8">8</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-9">9</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-9.1">9.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-9.2">9.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#appendix-A">Appendix A</a>. Changes to RFCs 2595, 3207, 3501, and 5804 . . . . . <a href="#page-12">12</a>
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
Use of TLS by SMTP Submission, IMAP, POP, and ManageSieve clients is
described in [<a href="./rfc3207" title=""SMTP Service Extension for Secure SMTP over Transport Layer Security"">RFC3207</a>], [<a href="./rfc3501" title=""INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1"">RFC3501</a>], [<a href="./rfc2595" title=""Using TLS with IMAP, POP3 and ACAP"">RFC2595</a>], and [<a href="./rfc5804" title=""A Protocol for Remotely Managing Sieve Scripts"">RFC5804</a>],
respectively. Each of the documents describes slightly different
rules for server certificate identity verification (or doesn't define
any rules at all). In reality, email client and server developers
implement many of these protocols at the same time, so it would be
good to define modern and consistent rules for verifying email server
identities using TLS.
This document describes the updated TLS server identity verification
procedure for SMTP Submission [<a href="./rfc6409" title=""Message Submission for Mail"">RFC6409</a>] [<a href="./rfc3207" title=""SMTP Service Extension for Secure SMTP over Transport Layer Security"">RFC3207</a>], IMAP [<a href="./rfc3501" title=""INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1"">RFC3501</a>],
POP [<a href="./rfc1939" title=""Post Office Protocol - Version 3"">RFC1939</a>], and ManageSieve [<a href="./rfc5804" title=""A Protocol for Remotely Managing Sieve Scripts"">RFC5804</a>] clients. <a href="#section-3">Section 3</a> of this
document replaces <a href="./rfc2595#section-2.4">Section 2.4 of [RFC2595]</a>.
Note that this document doesn't apply to use of TLS in MTA-to-MTA
SMTP.
This document provides a consistent TLS server identity verification
procedure across multiple email-related protocols. This should make
it easier for Certification Authorities (CAs) and ISPs to deploy TLS
for email use and would enable email client developers to write more
secure code.
<span class="grey">Melnikov Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Conventions Used in This Document</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
The following terms or concepts are used through the document:
reference identifier: One of the domain names that the email client
(an SMTP, IMAP, POP3, or ManageSieve client) associates with the
target email server. For some identifier types, the identifier
also includes an application service type. Reference identifiers
are used for performing name checks on server certificates. (This
term is formally defined in [<a href="./rfc6125" title=""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)"">RFC6125</a>].)
CN-ID, DNS-ID, SRV-ID, and URI-ID are identifier types (see [<a href="./rfc6125" title=""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)"">RFC6125</a>]
for details). For convenience, their short definitions from
[<a href="./rfc6125" title=""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)"">RFC6125</a>] are listed below:
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).
DNS-ID: A subjectAltName entry of type dNSName
SRV-ID: A subjectAltName entry of type otherName whose name form is
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 [<a href="./rfc5234" title=""Augmented BNF for Syntax Specifications: ABNF"">RFC5234</a>]
productions from [<a href="./rfc3986" title=""Uniform Resource Identifier (URI): Generic Syntax"">RFC3986</a>]).
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Email Server Certificate Verification Rules</span>
During a TLS negotiation, an email client (i.e., an SMTP, IMAP, POP3,
or ManageSieve client) MUST check its understanding of the server
identity (client's reference identifiers) against the server's
identity as presented in the server Certificate message in order to
prevent man-in-the-middle attacks. This check is only performed
after the server certificate passes certification path validation as
described in <a href="./rfc5280#section-6">Section 6 of [RFC5280]</a>. Matching is performed according
to the rules specified in <a href="./rfc6125#section-6">Section 6 of [RFC6125]</a>, including the
relative order of matching of different identifier types,
"certificate pinning", and the procedure on failure to match. The
<span class="grey">Melnikov Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
following inputs are used by the verification procedure used in
[<a href="./rfc6125" title=""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)"">RFC6125</a>]:
1. For DNS-ID and CN-ID identifier types, the client MUST use one or
more of the following as "reference identifiers": (a) the domain
portion of the user's email address, (b) the hostname it used to
open the connection (without CNAME canonicalization). The client
MAY also use (c) a value securely derived from (a) or (b), such
as using "secure" DNSSEC [<a href="./rfc4033" title=""DNS Security Introduction and Requirements"">RFC4033</a>] [<a href="./rfc4034" title=""Resource Records for the DNS Security Extensions"">RFC4034</a>] [<a href="./rfc4035" title=""Protocol Modifications for the DNS Security Extensions"">RFC4035</a>] validated
lookup.
2. When using email service discovery procedure specified in
[<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>], the client MUST also use the domain portion of the
user's email address as another "reference identifier" to compare
against an SRV-ID identifier in the server certificate.
The rules and guidelines defined in [<a href="./rfc6125" title=""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)"">RFC6125</a>] apply to an email
server certificate with the following supplemental rules:
1. Support for the DNS-ID identifier type (subjectAltName of dNSName
type [<a href="./rfc5280" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">RFC5280</a>]) is REQUIRED in email client software
implementations.
2. Support for the SRV-ID identifier type (subjectAltName of SRVName
type [<a href="./rfc4985" title=""Internet X.509 Public Key Infrastructure Subject Alternative Name for Expression of Service Name"">RFC4985</a>]) is REQUIRED for email client software
implementations that support [<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>]. A list of SRV-ID types
for email services is specified in [<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>]. For the
ManageSieve protocol, the service name "sieve" is used.
3. A URI-ID identifier type (subjectAltName of
uniformResourceIdentifier type [<a href="./rfc5280" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">RFC5280</a>]) MUST NOT be used by
clients for server verification, as URI-IDs were not historically
used for email.
4. For backward compatibility with deployed software, a CN-ID
identifier type (CN attribute from the subject name, see
[<a href="./rfc6125" title=""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)"">RFC6125</a>]) MAY be used for server identity verification.
5. Email protocols allow use of certain wildcards in identifiers
presented by email servers. The "*" wildcard character MAY be
used as the left-most name component of a DNS-ID or CN-ID in the
certificate. For example, a DNS-ID of "*.example.com" would
match "a.example.com", "foo.example.com", etc., but would not
match "example.com". Note that the wildcard character MUST NOT
be used as a fragment of the left-most name component (e.g.,
"*oo.example.com", "f*o.example.com", or "foo*.example.com").
<span class="grey">Melnikov Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Compliance Checklist for Certification Authorities</span>
1. CAs MUST support issuance of server certificates with a DNS-ID
identifier type (subjectAltName of dNSName type [<a href="./rfc5280" title=""Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile"">RFC5280</a>]).
(Note that some DNS-IDs may refer to domain portions of email
addresses, so they might not have corresponding A/AAAA DNS
records.)
2. CAs MUST support issuance of server certificates with an SRV-ID
identifier type (subjectAltName of SRVName type [<a href="./rfc4985" title=""Internet X.509 Public Key Infrastructure Subject Alternative Name for Expression of Service Name"">RFC4985</a>]) for
each type of email service. See <a href="#section-4.1">Section 4.1</a> for more discussion
on what this means for CAs.
3. For backward compatibility with a deployed client base, CAs MUST
support issuance of server certificates with a CN-ID identifier
type (CN attribute from the subject name, see [<a href="./rfc6125" title=""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)"">RFC6125</a>]).
4. CAs MAY allow "*" (wildcard) as the left-most name component of a
DNS-ID or CN-ID in server certificates it issues.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Notes on Handling of Delegated Email Services by Certification</span>
<span class="h3"> Authorities</span>
[<a id="ref-RFC6186">RFC6186</a>] provides an easy way for organizations to autoconfigure
email clients. It also allows for delegation of email services to an
email hosting provider. When connecting to such delegated hosting
service, an email client that attempts to verify TLS server identity
needs to know that if it connects to "imap.hosting.example.net", such
server is authorized to provide email access for an email such as
alice@example.org. In absence of SRV-IDs, users of compliant email
clients would be forced to manually confirm exceptions because the
TLS server certificate verification procedures specified in this
document would result in failure to match the TLS server certificate
against the expected domain(s). One way to provide such
authorization is for the TLS certificate for
"imap.hosting.example.net" to include SRV-ID(s) (or a DNS-ID) for the
"example.org" domain. Note that another way is for DNS Service
Record (SRV) lookups to be protected by DNSSEC, but this solution
depends on ubiquitous use of DNSSEC and availability of DNSSEC-aware
APIs and thus is not discussed in this document. A future update to
this document might rectify this.
A CA that receives a Certificate Signing Request containing multiple
unrelated DNS-IDs and/or SRV-IDs (e.g., a DNS-ID of "example.org" and
a DNS-ID of "example.com") needs to verify that the entity that
supplied such Certificate Signing Request is authorized to provide
email service for all requested domains.
<span class="grey">Melnikov Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
The ability to issue certificates that contain an SRV-ID (or a DNS-ID
for the domain part of email addresses) implies the ability to verify
that entities requesting them are authorized to run email service for
these SRV-IDs/DNS-IDs. In particular, CAs that can't verify such
authorization (whether for a particular domain or in general) MUST
NOT include such email SRV-IDs/DNS-IDs in certificates they issue.
This document doesn't specify exact mechanism(s) that can be used to
achieve this. However, a few special case recommendations are listed
below.
A CA willing to sign a certificate containing a particular DNS-ID
SHOULD also support signing a certificate containing one or more of
the email SRV-IDs for the same domain because the SRV-ID effectively
provides more restricted access to an email service for the domain
(as opposed to unrestricted use of any services for the same domain,
as specified by the DNS-ID).
A CA that also provides DNS service for a domain can use DNS
information to validate SRV-IDs/DNS-IDs for the domain.
A CA that is also a Mail Service Provider for a hosted domain can use
that knowledge to validate SRV-IDs/DNS-IDs for the domain.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Compliance Checklist for Mail Service Providers and Certificate</span>
<span class="h2"> Signing Request Generation Tools</span>
Mail Service Providers and Certificate Signing Request generation
tools:
1. MUST include the DNS-ID identifier type in Certificate Signing
Requests for the host name(s) where the email server(s) are
running. They SHOULD include the DNS-ID identifier type in
Certificate Signing Requests for the domain portion of served
email addresses.
2. MUST include the SRV-ID identifier type for each type of email
service in Certificate Signing Requests if the email services
provided are discoverable using DNS SRV as specified in
[<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>].
3. SHOULD include the CN-ID identifier type for the host name where
the email server(s) is running in Certificate Signing Requests
for backward compatibility with deployed email clients. (Note, a
certificate can only include a single CN-ID, so if a mail service
is running on multiple hosts, either each host has to use
different certificate with its own CN-ID, a single certificate
with multiple DNS-IDs, or a single certificate with wildcard in a
CN-ID can be used).
<span class="grey">Melnikov Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
4. MAY include "*" (wildcard) as the left-most name component of a
DNS-ID or CN-ID in Certificate Signing Requests.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Notes on Hosting Multiple Domains</span>
A server that hosts multiple domains needs to do one of the following
(or some combination thereof):
1. Use DNS SRV records to redirect each hosted email service to a
fixed domain, deploy TLS certificate(s) for that single domain,
and instruct users to configure their clients with appropriate
pinning (unless the SRV records can always be obtained via
DNSSEC). Some email clients come with preloaded lists of pinned
certificates for some popular domains; this can avoid the need
for manual confirmation.
2. Use a single TLS certificate that includes a complete list of all
the domains it is serving.
3. Serve each domain on its own IP/port, using separate TLS
certificates on each IP/port.
4. Use the Server Name Indication (SNI) TLS extension [<a href="./rfc6066" title=""Transport Layer Security (TLS) Extensions: Extension Definitions"">RFC6066</a>] to
select the right certificate to return during TLS negotiation.
Each domain has its own TLS certificate in this case.
Each of these deployment choices have their scaling disadvantages
when the list of domains changes. Use of DNS SRV without an SRV-ID
requires manual confirmation from users. While preloading pinned
certificates avoids the need for manual confirmation, this
information can get stale quickly or would require support for a new
mechanism for distributing preloaded pinned certificates. A single
certificate (the second choice) requires that when a domain is added,
then a new Certificate Signing Request that includes a complete list
of all the domains needs to be issued and passed to a CA in order to
generate a new certificate. A separate IP/port can avoid
regenerating the certificate but requires more transport layer
resources. Use of TLS SNI requires each email client to use it.
Several Mail Service Providers host hundreds and even thousands of
domains. This document, as well as its predecessors, RFCs 2595,
3207, 3501, and 5804, don't address scaling issues caused by use of
TLS in multi-tenanted environments. Further work is needed to
address this issue, possibly using DNSSEC or something like PKIX over
Secure HTTP (POSH) [<a href="./rfc7711" title=""PKIX over Secure HTTP (POSH)"">RFC7711</a>].
<span class="grey">Melnikov Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Examples</span>
Consider an IMAP-accessible email server that supports both IMAP and
IMAP-over-TLS (IMAPS) at the host "mail.example.net" servicing email
addresses of the form "user@example.net". A certificate for this
service needs to include DNS-IDs of "example.net" (because it is the
domain portion of emails) and "mail.example.net" (this is what a user
of this server enters manually if not using [<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>]). It might
also include a CN-ID of "mail.example.net" for backward compatibility
with deployed infrastructure.
Consider the IMAP-accessible email server from the previous paragraph
that is additionally discoverable via DNS SRV lookups in domain
"example.net" (using DNS SRV records "_imap._tcp.example.net" and
"_imaps._tcp.example.net"). In addition to the DNS-ID/CN-ID identity
types specified above, a certificate for this service also needs to
include SRV-IDs of "_imap.example.net" (when STARTTLS is used on the
IMAP port) and "_imaps.example.net" (when TLS is used on IMAPS port).
See [<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>] for more details. (Note that unlike DNS SRV there is
no "_tcp" component in SRV-IDs).
Consider the IMAP-accessible email server from the first paragraph
that is running on a host also known as "mycompany.example.com". In
addition to the DNS-ID identity types specified above, a certificate
for this service also needs to include a DNS-ID of
"mycompany.example.com" (this is what a user of this server enters
manually if not using [<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>]). It might also include a CN-ID of
"mycompany.example.com" instead of the CN-ID "mail.example.net" for
backward compatibility with deployed infrastructure. (This is so,
because a certificate can only include a single CN-ID)
Consider an SMTP Submission server at the host "submit.example.net"
servicing email addresses of the form "user@example.net" and
discoverable via DNS SRV lookups in domain "example.net" (using DNS
SRV record "_submission._tcp.example.net"). A certificate for this
service needs to include SRV-IDs of "_submission.example.net" (see
[<a href="./rfc6186" title=""Use of SRV Records for Locating Email Submission/Access Services"">RFC6186</a>]) along with DNS-IDs of "example.net" and
"submit.example.net". It might also include a CN-ID of
"submit.example.net" for backward compatibility with deployed
infrastructure.
Consider a host "mail.example.net" servicing email addresses of the
form "user@example.net" and discoverable via DNS SRV lookups in
domain "example.net", which runs SMTP Submission, IMAPS and POP3S
(POP3-over-TLS), and ManageSieve services. Each of the servers can
use their own certificate specific to their service (see examples
above). Alternatively, they can all share a single certificate that
would include SRV-IDs of "_submission.example.net",
<span class="grey">Melnikov Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
"_imaps.example.net", "_pop3s.example.net", and "_sieve.example.net"
along with DNS-IDs of "example.net" and "mail.example.net". It might
also include a CN-ID of "mail.example.net" for backward compatibility
with deployed infrastructure.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Operational Considerations</span>
<a href="#section-5">Section 5</a> covers operational considerations (in particular, use of
DNS SRV for autoconfiguration) related to generating TLS certificates
for email servers so that they can be successfully verified by email
clients. Additionally, <a href="#section-5.1">Section 5.1</a> talks about operational
considerations related to hosting multiple domains.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Security Considerations</span>
The goal of this document is to improve interoperability and thus
security of email clients wishing to access email servers over TLS-
protected email protocols by specifying a consistent set of rules
that email service providers, email client writers, and CAs can use
when creating server certificates.
The TLS server identity check for email relies on use of trustworthy
DNS hostnames when constructing "reference identifiers" that are
checked against an email server certificate. Such trustworthy names
are either entered manually (for example, if they are advertised on a
Mail Service Provider's website), explicitly confirmed by the user
(e.g., if they are a target of a DNS SRV lookup), or derived using a
secure third party service (e.g., DNSSEC-protected SRV records that
are verified by the client or trusted local resolver). Future work
in this area might benefit from integration with DNS-Based
Authentication of Named Entities (DANE) [<a href="./rfc6698" title=""The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA"">RFC6698</a>], but it is not
covered by this document.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. Normative References</span>
[<a id="ref-RFC1939">RFC1939</a>] Myers, J. and M. Rose, "Post Office Protocol - Version 3",
STD 53, <a href="./rfc1939">RFC 1939</a>, DOI 10.17487/RFC1939, May 1996,
<<a href="http://www.rfc-editor.org/info/rfc1939">http://www.rfc-editor.org/info/rfc1939</a>>.
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="http://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>>.
<span class="grey">Melnikov Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
[<a id="ref-RFC3207">RFC3207</a>] Hoffman, P., "SMTP Service Extension for Secure SMTP over
Transport Layer Security", <a href="./rfc3207">RFC 3207</a>, DOI 10.17487/RFC3207,
February 2002, <<a href="http://www.rfc-editor.org/info/rfc3207">http://www.rfc-editor.org/info/rfc3207</a>>.
[<a id="ref-RFC3501">RFC3501</a>] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", <a href="./rfc3501">RFC 3501</a>, DOI 10.17487/RFC3501, March 2003,
<<a href="http://www.rfc-editor.org/info/rfc3501">http://www.rfc-editor.org/info/rfc3501</a>>.
[<a id="ref-RFC4985">RFC4985</a>] Santesson, S., "Internet X.509 Public Key Infrastructure
Subject Alternative Name for Expression of Service Name",
<a href="./rfc4985">RFC 4985</a>, DOI 10.17487/RFC4985, August 2007,
<<a href="http://www.rfc-editor.org/info/rfc4985">http://www.rfc-editor.org/info/rfc4985</a>>.
[<a id="ref-RFC5280">RFC5280</a>] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", <a href="./rfc5280">RFC 5280</a>, DOI 10.17487/RFC5280, May 2008,
<<a href="http://www.rfc-editor.org/info/rfc5280">http://www.rfc-editor.org/info/rfc5280</a>>.
[<a id="ref-RFC5804">RFC5804</a>] Melnikov, A., Ed. and T. Martin, "A Protocol for Remotely
Managing Sieve Scripts", <a href="./rfc5804">RFC 5804</a>, DOI 10.17487/RFC5804,
July 2010, <<a href="http://www.rfc-editor.org/info/rfc5804">http://www.rfc-editor.org/info/rfc5804</a>>.
[<a id="ref-RFC6066">RFC6066</a>] Eastlake 3rd, D., "Transport Layer Security (TLS)
Extensions: Extension Definitions", <a href="./rfc6066">RFC 6066</a>,
DOI 10.17487/RFC6066, January 2011,
<<a href="http://www.rfc-editor.org/info/rfc6066">http://www.rfc-editor.org/info/rfc6066</a>>.
[<a id="ref-RFC6125">RFC6125</a>] Saint-Andre, P. and J. Hodges, "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)", <a href="./rfc6125">RFC 6125</a>, DOI 10.17487/RFC6125, March
2011, <<a href="http://www.rfc-editor.org/info/rfc6125">http://www.rfc-editor.org/info/rfc6125</a>>.
[<a id="ref-RFC6186">RFC6186</a>] Daboo, C., "Use of SRV Records for Locating Email
Submission/Access Services", <a href="./rfc6186">RFC 6186</a>,
DOI 10.17487/RFC6186, March 2011,
<<a href="http://www.rfc-editor.org/info/rfc6186">http://www.rfc-editor.org/info/rfc6186</a>>.
[<a id="ref-RFC6409">RFC6409</a>] Gellens, R. and J. Klensin, "Message Submission for Mail",
STD 72, <a href="./rfc6409">RFC 6409</a>, DOI 10.17487/RFC6409, November 2011,
<<a href="http://www.rfc-editor.org/info/rfc6409">http://www.rfc-editor.org/info/rfc6409</a>>.
<span class="grey">Melnikov Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Informative References</span>
[<a id="ref-RFC2595">RFC2595</a>] Newman, C., "Using TLS with IMAP, POP3 and ACAP",
<a href="./rfc2595">RFC 2595</a>, DOI 10.17487/RFC2595, June 1999,
<<a href="http://www.rfc-editor.org/info/rfc2595">http://www.rfc-editor.org/info/rfc2595</a>>.
[<a id="ref-RFC3986">RFC3986</a>] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
<a href="./rfc3986">RFC 3986</a>, DOI 10.17487/RFC3986, January 2005,
<<a href="http://www.rfc-editor.org/info/rfc3986">http://www.rfc-editor.org/info/rfc3986</a>>.
[<a id="ref-RFC4033">RFC4033</a>] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "DNS Security Introduction and Requirements",
<a href="./rfc4033">RFC 4033</a>, DOI 10.17487/RFC4033, March 2005,
<<a href="http://www.rfc-editor.org/info/rfc4033">http://www.rfc-editor.org/info/rfc4033</a>>.
[<a id="ref-RFC4034">RFC4034</a>] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Resource Records for the DNS Security Extensions",
<a href="./rfc4034">RFC 4034</a>, DOI 10.17487/RFC4034, March 2005,
<<a href="http://www.rfc-editor.org/info/rfc4034">http://www.rfc-editor.org/info/rfc4034</a>>.
[<a id="ref-RFC4035">RFC4035</a>] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Protocol Modifications for the DNS Security
Extensions", <a href="./rfc4035">RFC 4035</a>, DOI 10.17487/RFC4035, March 2005,
<<a href="http://www.rfc-editor.org/info/rfc4035">http://www.rfc-editor.org/info/rfc4035</a>>.
[<a id="ref-RFC5234">RFC5234</a>] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>,
DOI 10.17487/RFC5234, January 2008,
<<a href="http://www.rfc-editor.org/info/rfc5234">http://www.rfc-editor.org/info/rfc5234</a>>.
[<a id="ref-RFC6698">RFC6698</a>] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication
of Named Entities (DANE) Transport Layer Security (TLS)
Protocol: TLSA", <a href="./rfc6698">RFC 6698</a>, DOI 10.17487/RFC6698, August
2012, <<a href="http://www.rfc-editor.org/info/rfc6698">http://www.rfc-editor.org/info/rfc6698</a>>.
[<a id="ref-RFC7711">RFC7711</a>] Miller, M. and P. Saint-Andre, "PKIX over Secure HTTP
(POSH)", <a href="./rfc7711">RFC 7711</a>, DOI 10.17487/RFC7711, November 2015,
<<a href="http://www.rfc-editor.org/info/rfc7711">http://www.rfc-editor.org/info/rfc7711</a>>.
<span class="grey">Melnikov Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Changes to RFCs 2595, 3207, 3501, and 5804</span>
This section lists detailed changes this document applies to RFCs
2595, 3207, 3501, and 5804.
The entire <a href="./rfc2595#section-2.4">Section 2.4 of RFC 2595</a> is replaced with the following
text:
During the TLS negotiation, the client checks its understanding of
the server identity against the provided server's identity as
specified in <a href="./rfc7817#section-3">Section 3 of [RFC7817]</a>.
The 3rd paragraph (and its subparagraphs) in <a href="./rfc3501#section-11.1">Section 11.1 of RFC 3501</a>
is replaced with the following text:
During the TLS negotiation, the IMAP client checks its
understanding of the server identity against the provided server's
identity as specified in <a href="./rfc7817#section-3">Section 3 of [RFC7817]</a>.
The 3rd paragraph (and its subparagraphs) in <a href="./rfc3207#section-4.1">Section 4.1 of RFC 3207</a>
is replaced with the following text:
During the TLS negotiation, the Submission client checks its
understanding of the server identity against the provided server's
identity as specified in <a href="./rfc7817#section-3">Section 3 of [RFC7817]</a>.
Sections <a href="#section-2.2.1">2.2.1</a> and <a href="#section-2.2.1.1">2.2.1.1</a> of <a href="./rfc5804">RFC 5804</a> are replaced with the
following text:
During the TLS negotiation, the ManageSieve client checks its
understanding of the server identity against the server's identity
as specified in <a href="./rfc7817#section-3">Section 3 of [RFC7817]</a>. When the reference
identity is an IP address, the iPAddress subjectAltName SHOULD be
used by the client for comparison. The comparison is performed as
described in <a href="./rfc5804#section-2.2.1.2">Section 2.2.1.2 of RFC 5804</a>.
<span class="grey">Melnikov Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc7817">RFC 7817</a> TLS Server Identity Check for Email March 2016</span>
Acknowledgements
Thank you to Chris Newman, Viktor Dukhovni, Sean Turner, Russ
Housley, Alessandro Vesely, Harald Alvestrand, and John Levine for
comments on this document.
The editor of this document copied lots of text from RFCs 2595 and
6125, so the hard work of editors of these documents is appreciated.
Author's Address
Alexey Melnikov
Isode Ltd
14 Castle Mews
Hampton, Middlesex TW12 2NP
United Kingdom
EMail: Alexey.Melnikov@isode.com
Melnikov Standards Track [Page 13]
</pre>
|