idnits 2.17.1 draft-saintandre-tls-server-id-check-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.ii or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 4 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (October 2, 2009) is 5313 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 3490 (ref. 'IDNA') (Obsoleted by RFC 5890, RFC 5891) ** Obsolete normative reference: RFC 2460 (ref. 'IPv6') (Obsoleted by RFC 8200) -- Obsolete informational reference (is this intentional?): RFC 2616 (ref. 'HTTP') (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 2818 (ref. 'HTTP-TLS') (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 3501 (ref. 'IMAP') (Obsoleted by RFC 9051) -- Obsolete informational reference (is this intentional?): RFC 2830 (ref. 'LDAP-TLS') (Obsoleted by RFC 4510, RFC 4511, RFC 4513) -- Obsolete informational reference (is this intentional?): RFC 4741 (ref. 'NETCONF') (Obsoleted by RFC 6241) -- Obsolete informational reference (is this intentional?): RFC 4742 (ref. 'NETCONF-SSH') (Obsoleted by RFC 6242) -- Obsolete informational reference (is this intentional?): RFC 5539 (ref. 'NETCONF-TLS') (Obsoleted by RFC 7589) -- Obsolete informational reference (is this intentional?): RFC 2459 (Obsoleted by RFC 3280) == Outdated reference: A later version (-07) exists of draft-ietf-sip-domain-certs-04 -- Obsolete informational reference (is this intentional?): RFC 5246 (ref. 'TLS') (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 3920 (ref. 'XMPP') (Obsoleted by RFC 6120) == Outdated reference: A later version (-22) exists of draft-ietf-xmpp-3920bis-02 Summary: 3 errors (**), 0 flaws (~~), 5 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 None P. Saint-Andre 3 Internet-Draft Cisco 4 Intended status: Standards Track K. Zeilenga 5 Expires: April 5, 2010 Isode Limited 6 J. Hodges 7 PayPal 8 R. Morgan 9 Internet2 10 October 2, 2009 12 Server Identity Verification in Application Protocols 13 draft-saintandre-tls-server-id-check-02 15 Status of this Memo 17 This Internet-Draft is submitted to IETF in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF), its areas, and its working groups. Note that 22 other groups may also distribute working documents as Internet- 23 Drafts. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 The list of current Internet-Drafts can be accessed at 31 http://www.ietf.org/ietf/1id-abstracts.txt. 33 The list of Internet-Draft Shadow Directories can be accessed at 34 http://www.ietf.org/shadow.html. 36 This Internet-Draft will expire on April 5, 2010. 38 Copyright Notice 40 Copyright (c) 2009 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents in effect on the date of 45 publication of this document (http://trustee.ietf.org/license-info). 46 Please review these documents carefully, as they describe your rights 47 and restrictions with respect to this document. 49 Abstract 51 Technologies such as Transport Layer Security (TLS) and IPsec enable 52 a secure connection between two entities (a "client" and a "server") 53 using X.509 certificates. This document specifies recommended 54 procedures for checking the identity of the server in such an 55 interaction. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Verification Process . . . . . . . . . . . . . . . . . . . . . 5 62 3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 5 63 3.2. Comparison Rules . . . . . . . . . . . . . . . . . . . . . 6 64 3.2.1. Domain Names . . . . . . . . . . . . . . . . . . . . . 6 65 3.2.2. IP Addresses . . . . . . . . . . . . . . . . . . . . . 7 66 3.2.3. Email Addresses . . . . . . . . . . . . . . . . . . . 7 67 3.2.4. SIP Addresses . . . . . . . . . . . . . . . . . . . . 8 68 3.2.5. XMPP Addresses . . . . . . . . . . . . . . . . . . . . 8 69 3.3. Outcome . . . . . . . . . . . . . . . . . . . . . . . . . 8 70 4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 71 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 72 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 6.1. Normative References . . . . . . . . . . . . . . . . . . . 9 74 6.2. Informative References . . . . . . . . . . . . . . . . . . 9 75 Appendix A. Prior Art . . . . . . . . . . . . . . . . . . . . . . 12 76 A.1. IMAP, POP3, and ACAP (1999) . . . . . . . . . . . . . . . 13 77 A.2. HTTP (2000) . . . . . . . . . . . . . . . . . . . . . . . 13 78 A.3. LDAP (2000/2006) . . . . . . . . . . . . . . . . . . . . . 15 79 A.4. SMTP (2002/2007) . . . . . . . . . . . . . . . . . . . . . 18 80 A.5. XMPP (2004) . . . . . . . . . . . . . . . . . . . . . . . 19 81 A.6. NNTP (2006) . . . . . . . . . . . . . . . . . . . . . . . 20 82 A.7. NETCONF (2006/2009) . . . . . . . . . . . . . . . . . . . 21 83 A.8. Syslog (2009) . . . . . . . . . . . . . . . . . . . . . . 23 84 A.9. SIP (2009) . . . . . . . . . . . . . . . . . . . . . . . . 24 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24 87 1. Introduction 89 Technologies such as Transport Layer Security [TLS] and [IPSEC] 90 enable a secure connection between two entities using the Internet 91 X.509 Public Key Infrastructure (PKI) as described in [X509]. In 92 such interactions, the entity that initiates the connection is called 93 a "client" and the entity that receives the connection is called a 94 "server". 96 Note: The terms "client" and "server" as used here refer to 97 security roles, not application roles; a server in the context of 98 TLS or IPSec might be a "client" (i.e., a user agent) in the 99 context of an application protocol as deployed on the Internet. 101 If a client wishes to connect to a server securely, it needs to check 102 the identity of the server so that it can determine if the server is 103 what it claims to be, verify that there is no attacker in the middle, 104 and enforce other relevant security considerations. Typically this 105 checking is done by correlating the information presented in the 106 server's certificate with information available about the server 107 contained in the Domain Name System (DNS) or provided by a human 108 user. 110 Different application protocols that make use of the client-server 111 pattern for security purposes have traditionally specified their own 112 procedures for checking server identities. Examples include but are 113 not limited to: 115 o The Hypertext Transfer Protocol [HTTP], for which see also 116 [HTTP-TLS] 117 o The Internet Message Access Protocol [IMAP] and the Post Office 118 Protocol [POP3], for which see also [USINGTLS] 119 o The Lightweight Directory Access Protocol [LDAP], for which see 120 also [LDAP-AUTH] and its predecessor [LDAP-TLS] 121 o The NETCONF Configuration Protocol [NETCONF], for which see also 122 [NETCONF-SSH] and [NETCONF-TLS] 123 o The Network News Transfer Protocol [NNTP], for which see also 124 [NNTP-TLS] 125 o The Session Initiation Protocol [SIP], for which see also 126 [SIP-CERTS] 127 o The Simple Mail Transfer Protocol [SMTP], for which see also 128 [SMTP-AUTH] and [SMTP-TLS] 129 o The Syslog Protocol [SYSLOG], for which see also [SYSLOG-TLS] 130 o The Extensible Messaging and Presence Protocol [XMPP], for which 131 see also [XMPPBIS] 133 Unfortunately, this divergence of approaches has caused some 134 confusion among developers and protocol designers. Therefore this 135 document specifies recommended identity checking procedures for 136 application protocols produced within the Internet Standards Process, 137 for the purpose of codifying secure authentication practices. 139 Note: This document is currently limited in scope to the presentation 140 of identities in X.509 certificates as issued in the context of the 141 Public Key Infrastructure (PKI) and as applied to Transport Layer 142 Security [TLS]; a future version of this document might address X.509 143 certificates as issued outside the context of the PKI, non-X.509 144 public keys such as OpenPGP keys, presentation of identities in ways 145 other than in the certificate itself (e.g., certificate fingerprints 146 for Secure Shell as described in [SSH] or for Datagram Transport 147 Layer Security DTLS and Secure Real-time Transport Protocol as 148 described in [DTLS-SRTP]), and applications that use security 149 technologies other than TLS. 151 2. Conventions 153 The following capitalized keywords are to be interpreted as described 154 in [TERMS]: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; 155 "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", 156 "OPTIONAL". 158 Most security-related terms are to be understood in the sense defined 159 in [SECTERMS]; such terms include, but are not limited to, "attack", 160 "authentication", "authorization", "certificate", "credential", 161 "fingerprint", "identity", "self-signed certificate", "trust", "trust 162 anchor", "trust chain", "validate", and "verify". 164 In addition, we define the following terms to assist in understanding 165 the process of verifying server identity: 167 identity set: The set of identities that are presented by the server 168 to the client (in the form of the server's X.509 certificate) when 169 the client attempts to establish a secure connection to the 170 server. 171 identity type: The "natural kind" of identity to which a presented 172 identity or reference identity belongs. For example, the 173 reference identity might be a domain name, an IPv4 or IPv6 174 address, an email address, a SIP address, an XMPP address, or some 175 other type (this specification does not yet provide a complete 176 taxonomy of identity types). In the case of domain names, the 177 reference identity MUST NOT contain the wildcard character '*' 178 (ASCII 42) in the left-most (least significant) domain name 179 component or component fragment. 181 presented identity: A single member of the identity set. 182 reference identity: The client's conception of the server's identity 183 before it attempts to establish a secure connection to the server, 184 i.e. the identity that the client expects the server to present 185 and to which the client makes reference when attempting to verify 186 the server's identity. It is either the address to which the 187 client connected or the explicit value of the TLS "server_name" 188 extension as specified in [TLS]. The reference identity might be 189 based on a DNS lookup, user configuration, or some other 190 mechanism. 192 3. Verification Process 194 When a client connects to a server, it MUST verify the server's 195 identity in order to prevent certain passive and active attacks 196 against the connection. By "verify identity" we mean that the client 197 needs to establish that at least one of the presented identities 198 matches the reference identity. 200 3.1. Overview 202 At a high level, the client verifies the server identity in 203 accordance with the following rules: 205 1. Before connecting to the server, the client determines the 206 identity type of the reference identity. 207 2. During the process of attempting to establish a secure 208 connection, the server MUST present its identity set to the 209 client in the form of an X.509 certificate [X509]. 210 3. Upon being presented with the server's identity set, the client 211 MUST check the reference identity against the presented 212 identities for the purpose of finding a match. To do so, the 213 client iterates through all of the subjectAltName extensions it 214 recognizes in the server's certificate (potentially in an 215 application-specific preference order) and compares the value of 216 each extension against the reference identity until it has either 217 produced a match or exhausted the identities in the identity set 218 (comparison rules for matching particular identity types are 219 provided under Section 3.2, including fallbacks to several 220 subjectName fields). 221 4. Before attempting to find a match in relation to a particular 222 presented identity, the client MAY map the reference identity to 223 a different identity type. Such a mapping MAY be performed for 224 any available subjectAltName type to which the reference identity 225 can be mapped; however, the reference identity SHOULD be mapped 226 only to types for which the mapping is either inherently secure 227 (e.g., extracting the DNS name from a URI to compare with a 228 subjectAltName of type dNSName or SRVName) or for which the 229 mapping is performed in a secure manner (e.g., using [DNSSEC], or 230 using a user-configured or admin-configured lookup table for 231 host-to-address or address-to-host translations). 232 5. If the identity set has more than one member, a match with any of 233 the presented identities is acceptable. 235 Note: Beyond the server identity check described in this section, 236 clients might complete further checking to ensure that the server 237 is authorized to provide the service it is requested to provide. 238 The client might need to make use of local policy information in 239 making this determination. 241 3.2. Comparison Rules 243 3.2.1. Domain Names 245 If the reference identity is a domain name as defined by [RFC1034] 246 and [RFC1035] for "traditional" domain names or by [IDNA] for 247 internationalized domain names, then the client can match the 248 reference identity against subjectAltName extensions of type dNSName 249 and SRVName [SRVNAME] according to the following rules. 251 If the reference identity is a "traditional" domain name, then 252 matching of reference identity against the presented identity is 253 performed by comparing the set of domain components using a case- 254 insensitive ASCII comparison. 256 If the reference identity is an internationalized domain name, then 257 an implementation MUST convert the reference identity to the ASCII 258 Compatible Encoding (ACE) format as specified in Section 4 of [IDNA] 259 before comparison with subjectAltName values of type dNSName; 260 specifically, the conversion operation specified in Section 4 of 261 [IDNA] MUST be performed as follows: 263 o In step 1, the domain name SHALL be considered a "stored string". 264 o In step 3, set the flag called "UseSTD3ASCIIRules". 265 o In step 4, process each label with the "ToASCII" operation. 266 o In step 5, change all label separators to U+002E (full stop). 268 After performing the "to-ASCII" conversion with regard to an 269 internationalized domain name, the DNS labels and names MUST be 270 compared for equality according to the rules specified in Section 3 271 of [IDNA]. 273 Unless otherwise specified by an application protocol, the dNSName 274 MAY contain one instance of the wildcard character '*'. The wildcard 275 character applies only to the left-most domain name component and 276 matches any single component (thus a dNSName of *.example.com matches 277 foo.example.com but not bar.foo.example.com or example.com itself). 278 The wildcard character is not allowed in component fragments (thus a 279 dNSName of baz*.example.net is not allowed and shall not be taken to 280 match baz1.example.net and baz2.example.net). 282 In addition to checking the subjectAltName extensions of type dNSName 283 and SRVNAME, the client MAY as a fallback check the value of the 284 Common Name (CN) (see [LDAP-SCHEMA]) as presented in the subjectName 285 component of the server's X.509 certificate. In existing 286 certificates, the CN is often used for encapsulating a domain name; 287 for example, consider the following subjectName: 289 cn=www.example.com, ou=Web Services, c=GB 291 Here the Common Name is "www.example.com" and the client could choose 292 to compare the reference identity against that CN. 294 When comparing the referenced identity against the Common Name, the 295 client MUST follow the comparison rules described above for 296 subjectAltName extensions of type dNSName and SRVName, with the 297 exception that no wildcard matching is allowed. 299 In order to match domain names, a client MUST NOT check Relative 300 Distinguished Names (RDNs) other than the Common Name; in particular, 301 this means that a series of Domain Component (DC) attributes MUST NOT 302 be checked (because the order of Domain Components is not guaranteed, 303 certain attacks are possible if DC attributes are checked). 305 3.2.2. IP Addresses 307 If the reference identity is an IP address as defined by [IP] or 308 [IPv6], then the client can match the reference identity against 309 subjectAltName extensions of type iPaddress according to the 310 following rules. 312 The reference identity MUST be converted to the "network byte order" 313 octet string representation; for IP Version 4 the octet string will 314 contain exactly four octets, and for IP Version 6 the octet string 315 will contain exactly sixteen octets. The client then compares this 316 octet string, where a match occurs if the reference identity and 317 presented identity octet strings are identical. 319 3.2.3. Email Addresses 321 If the reference identity is an email address as defined by [EMAIL], 322 then the client SHOULD compare the reference identity against the 323 value of the "rfc822Name" subjectAltName extension described in 325 [X509]. 327 The client MAY also compare the reference identity against the value 328 of the "E" attribute of the subjectName as described in [CRMF]. 330 3.2.4. SIP Addresses 332 If the reference identity is a SIP address as defined by [SIP], then 333 the client SHOULD compare map the reference identity to a domain name 334 or email address and proceed as described for those identity types, 335 or proceed as described in [SIP-CERTS]. 337 3.2.5. XMPP Addresses 339 If the reference identity is an XMPP address ("JabberID") as defined 340 by [XMPP], then the client SHOULD compare the reference identity 341 against the value of the following subjectAltName extensions, in this 342 order: SRVName, dNSName, and (as defined in [XMPP]) "id-on-xmppAddr". 344 3.3. Outcome 346 The outcome of the checking procedure is one of the following: 348 Case #1: The client finds at least one presented identity that 349 matches the reference identity; the entity MUST use this as the 350 validated identity of the server. 351 Case #2: The client finds no subjectAltName that matches the 352 reference identity but a human user has permanently accepted the 353 certificate during a previous connection attempt; the client MUST 354 verify that the cached certificate was presented and MUST notify 355 the user if the certificate has changed since the last time that a 356 secure connection was successfully negotiated. 357 Case #3: The client finds no subjectAltName that matches the 358 reference identity and a human user has not permanently accepted 359 the certificate during a previous connection attempt; the client 360 MUST NOT use the presented identity (if any) as the validated 361 identity of the server and instead MUST proceed as described in 362 the next section. Instead, if the client is a user-oriented 363 application, then it MUST either (1) automatically terminate the 364 connection with a bad certificate error or (2) show the 365 certificate (including the entire certificate chain) to the user 366 and give the user the choice of terminating the connecting or 367 accepting the certificate temporarily (i.e., for this connection 368 attempt only) or permanently (i.e., for all future connection 369 attempts) and then continuing with the connection; if a user 370 permanently accepts a certificate in this way, the client MUST 371 cache the certificate (or some non-forgeable representation such 372 as a hash value) and in future connection attempts behave as in 373 Case #2. (It is the resposibility of the human user to verify the 374 hash value or fingerprint of the certificate with the peer over a 375 trusted communication layer.) If the client is an automated 376 application, then it SHOULD terminate the connection with a bad 377 certificate error and log the error to an appropriate audit log; 378 an automated application MAY provide a configuration setting that 379 disables this check, but MUST provide a setting that enables the 380 check. 382 4. Security Considerations 384 This entire document discusses security. 386 5. IANA Considerations 388 This document has no actions for the IANA. 390 6. References 392 6.1. Normative References 394 [IDNA] Faltstrom, P., Hoffman, P., and A. Costello, 395 "Internationalizing Domain Names in Applications (IDNA)", 396 RFC 3490, March 2003. 398 [IP] Postel, J., "Internet Protocol", STD 5, RFC 791, 399 September 1981. 401 [IPv6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 402 (IPv6) Specification", RFC 2460, December 1998. 404 [TERMS] Bradner, S., "Key words for use in RFCs to Indicate 405 Requirement Levels", BCP 14, RFC 2119, March 1997. 407 [X509] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 408 Housley, R., and W. Polk, "Internet X.509 Public Key 409 Infrastructure Certificate and Certificate Revocation List 410 (CRL) Profile", RFC 5280, May 2008. 412 6.2. Informative References 414 [CRMF] Schaad, J., "Internet X.509 Public Key Infrastructure 415 Certificate Request Message Format (CRMF)", RFC 4211, 416 September 2005. 418 [DNSSEC] Arends, R., Austein, R., Larson, M., Massey, D., and S. 419 Rose, "DNS Security Introduction and Requirements", 420 RFC 4033, March 2005. 422 [DTLS-SRTP] 423 McGrew, D. and E. Rescorla, "Datagram Transport Layer 424 Security (DTLS) Extension to Establish Keys for Secure 425 Real-time Transport Protocol (SRTP)", 426 draft-ietf-avt-dtls-srtp-07 (work in progress), 427 February 2009. 429 [EMAIL] Resnick, P., Ed., "Internet Message Format", RFC 5322, 430 October 2008. 432 [HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 433 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 434 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 436 [HTTP-TLS] 437 Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 439 [IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 440 4rev1", RFC 3501, March 2003. 442 [IPSEC] Kent, S. and K. Seo, "Security Architecture for the 443 Internet Protocol", RFC 4301, December 2005. 445 [LDAP] Sermersheim, J., "Lightweight Directory Access Protocol 446 (LDAP): The Protocol", RFC 4511, June 2006. 448 [LDAP-AUTH] 449 Harrison, R., "Lightweight Directory Access Protocol 450 (LDAP): Authentication Methods and Security Mechanisms", 451 RFC 4513, June 2006. 453 [LDAP-SCHEMA] 454 Sciberras, A., "Lightweight Directory Access Protocol 455 (LDAP): Schema for User Applications", RFC 4519, 456 June 2006. 458 [LDAP-TLS] 459 Hodges, J., Morgan, R., and M. Wahl, "Lightweight 460 Directory Access Protocol (v3): Extension for Transport 461 Layer Security", RFC 2830, May 2000. 463 [NETCONF] Enns, R., "NETCONF Configuration Protocol", RFC 4741, 464 December 2006. 466 [NETCONF-SSH] 467 Wasserman, M. and T. Goddard, "Using the NETCONF 468 Configuration Protocol over Secure SHell (SSH)", RFC 4742, 469 December 2006. 471 [NETCONF-TLS] 472 Badra, M., "NETCONF over Transport Layer Security (TLS)", 473 RFC 5539, May 2009. 475 [NNTP] Feather, C., "Network News Transfer Protocol (NNTP)", 476 RFC 3977, October 2006. 478 [NNTP-TLS] 479 Murchison, K., Vinocur, J., and C. Newman, "Using 480 Transport Layer Security (TLS) with Network News Transfer 481 Protocol (NNTP)", RFC 4642, October 2006. 483 [POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3", 484 STD 53, RFC 1939, May 1996. 486 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 487 STD 13, RFC 1034, November 1987. 489 [RFC1035] Mockapetris, P., "Domain names - implementation and 490 specification", STD 13, RFC 1035, November 1987. 492 [RFC2459] Housley, R., Ford, W., Polk, T., and D. Solo, "Internet 493 X.509 Public Key Infrastructure Certificate and CRL 494 Profile", RFC 2459, January 1999. 496 [SECTERMS] 497 Shirey, R., "Internet Security Glossary, Version 2", 498 RFC 4949, August 2007. 500 [SIP] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 501 A., Peterson, J., Sparks, R., Handley, M., and E. 502 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 503 June 2002. 505 [SIP-CERTS] 506 Gurbani, V., Lawrence, S., and B. Laboratories, "Domain 507 Certificates in the Session Initiation Protocol (SIP)", 508 draft-ietf-sip-domain-certs-04 (work in progress), 509 May 2009. 511 [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 512 October 2008. 514 [SMTP-AUTH] 515 Siemborski, R. and A. Melnikov, "SMTP Service Extension 516 for Authentication", RFC 4954, July 2007. 518 [SMTP-TLS] 519 Hoffman, P., "SMTP Service Extension for Secure SMTP over 520 Transport Layer Security", RFC 3207, February 2002. 522 [SRVNAME] Santesson, S., "Internet X.509 Public Key Infrastructure 523 Subject Alternative Name for Expression of Service Name", 524 RFC 4985, August 2007. 526 [SSH] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) 527 Protocol Architecture", RFC 4251, January 2006. 529 [SYSLOG] Gerhards, R., "The Syslog Protocol", RFC 5424, March 2009. 531 [SYSLOG-TLS] 532 Miao, F., Ma, Y., and J. Salowey, "Transport Layer 533 Security (TLS) Transport Mapping for Syslog", RFC 5425, 534 March 2009. 536 [TLS] Dierks, T. and E. Rescorla, "The Transport Layer Security 537 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 539 [USINGTLS] 540 Newman, C., "Using TLS with IMAP, POP3 and ACAP", 541 RFC 2595, June 1999. 543 [XMPP] Saint-Andre, P., Ed., "Extensible Messaging and Presence 544 Protocol (XMPP): Core", RFC 3920, October 2004. 546 [XMPPBIS] Saint-Andre, P., "Extensible Messaging and Presence 547 Protocol (XMPP): Core", draft-ietf-xmpp-3920bis-02 (work 548 in progress), September 2009. 550 Appendix A. Prior Art 552 This section is non-normative. 554 The recommendations in this document are an abstraction from 555 recommendations in specifications for a wide range of application 556 protocols. For the purpose of comparison and to delineate the 557 history of thinking about server identity verification within the 558 IETF, this informative section gathers together prior art by 559 including the exact text from various RFCs (the only modifications 560 are changes to the names of several references to maintain coherence 561 with the main body of this document, and the elision of irrelevant 562 text as marked by the characters "[...]"). 564 A.1. IMAP, POP3, and ACAP (1999) 566 In 1999, [USINGTLS] specified the following text regarding server 567 identity verification in IMAP, POP3, and ACAP: 569 ###### 571 2.4. Server Identity Check 573 During the TLS negotiation, the client MUST check its understanding 574 of the server hostname against the server's identity as presented in 575 the server Certificate message, in order to prevent man-in-the-middle 576 attacks. Matching is performed according to these rules: 578 o The client MUST use the server hostname it used to open the 579 connection as the value to compare against the server name as 580 expressed in the server certificate. The client MUST NOT use any 581 form of the server hostname derived from an insecure remote source 582 (e.g., insecure DNS lookup). CNAME canonicalization is not done. 583 o If a subjectAltName extension of type dNSName is present in the 584 certificate, it SHOULD be used as the source of the server's 585 identity. 586 o Matching is case-insensitive. 587 o A "*" wildcard character MAY be used as the left-most name 588 component in the certificate. For example, *.example.com would 589 match a.example.com, foo.example.com, etc. but would not match 590 example.com. 591 o If the certificate contains multiple names (e.g. more than one 592 dNSName field), then a match with any one of the fields is 593 considered acceptable. 595 If the match fails, the client SHOULD either ask for explicit user 596 confirmation, or terminate the connection and indicate the server's 597 identity is suspect. 599 ###### 601 A.2. HTTP (2000) 603 In 2000, [HTTP-TLS] specified the following text regarding server 604 identity verification in HTTP: 606 ###### 608 3.1. Server Identity 609 In general, HTTP/TLS requests are generated by dereferencing a URI. 610 As a consequence, the hostname for the server is known to the client. 611 If the hostname is available, the client MUST check it against the 612 server's identity as presented in the server's Certificate message, 613 in order to prevent man-in-the-middle attacks. 615 If the client has external information as to the expected identity of 616 the server, the hostname check MAY be omitted. (For instance, a 617 client may be connecting to a machine whose address and hostname are 618 dynamic but the client knows the certificate that the server will 619 present.) In such cases, it is important to narrow the scope of 620 acceptable certificates as much as possible in order to prevent man 621 in the middle attacks. In special cases, it may be appropriate for 622 the client to simply ignore the server's identity, but it must be 623 understood that this leaves the connection open to active attack. 625 If a subjectAltName extension of type dNSName is present, that MUST 626 be used as the identity. Otherwise, the (most specific) Common Name 627 field in the Subject field of the certificate MUST be used. Although 628 the use of the Common Name is existing practice, it is deprecated and 629 Certification Authorities are encouraged to use the dNSName instead. 631 Matching is performed using the matching rules specified by 632 [RFC2459]. If more than one identity of a given type is present in 633 the certificate (e.g., more than one dNSName name, a match in any one 634 of the set is considered acceptable.) Names may contain the wildcard 635 character * which is considered to match any single domain name 636 component or component fragment. E.g., *.a.com matches foo.a.com but 637 not bar.foo.a.com. f*.com matches foo.com but not bar.com. 639 In some cases, the URI is specified as an IP address rather than a 640 hostname. In this case, the iPAddress subjectAltName must be present 641 in the certificate and must exactly match the IP in the URI. 643 If the hostname does not match the identity in the certificate, user 644 oriented clients MUST either notify the user (clients MAY give the 645 user the opportunity to continue with the connection in any case) or 646 terminate the connection with a bad certificate error. Automated 647 clients MUST log the error to an appropriate audit log (if available) 648 and SHOULD terminate the connection (with a bad certificate error). 649 Automated clients MAY provide a configuration setting that disables 650 this check, but MUST provide a setting which enables it. 652 Note that in many cases the URI itself comes from an untrusted 653 source. The above-described check provides no protection against 654 attacks where this source is compromised. For example, if the URI 655 was obtained by clicking on an HTML page which was itself obtained 656 without using HTTP/TLS, a man in the middle could have replaced the 657 URI. In order to prevent this form of attack, users should carefully 658 examine the certificate presented by the server to determine if it 659 meets their expectations. 661 ###### 663 A.3. LDAP (2000/2006) 665 In 2000, [LDAP-TLS] specified the following text regarding server 666 identity verification in LDAP: 668 ###### 670 3.6. Server Identity Check 672 The client MUST check its understanding of the server's hostname 673 against the server's identity as presented in the server's 674 Certificate message, in order to prevent man-in-the-middle attacks. 676 Matching is performed according to these rules: 678 o The client MUST use the server hostname it used to open the LDAP 679 connection as the value to compare against the server name as 680 expressed in the server's certificate. The client MUST NOT use 681 the server's canonical DNS name or any other derived form of name. 682 o If a subjectAltName extension of type dNSName is present in the 683 certificate, it SHOULD be used as the source of the server's 684 identity. 685 o Matching is case-insensitive. 686 o The "*" wildcard character is allowed. If present, it applies 687 only to the left-most name component. 689 E.g. *.bar.com would match a.bar.com, b.bar.com, etc. but not 690 bar.com. If more than one identity of a given type is present in the 691 certificate (e.g. more than one dNSName name), a match in any one of 692 the set is considered acceptable. 694 If the hostname does not match the dNSName-based identity in the 695 certificate per the above check, user-oriented clients SHOULD either 696 notify the user (clients MAY give the user the opportunity to 697 continue with the connection in any case) or terminate the connection 698 and indicate that the server's identity is suspect. Automated 699 clients SHOULD close the connection, returning and/or logging an 700 error indicating that the server's identity is suspect. 702 Beyond the server identity checks described in this section, clients 703 SHOULD be prepared to do further checking to ensure that the server 704 is authorized to provide the service it is observed to provide. The 705 client MAY need to make use of local policy information. 707 ###### 709 In 2006, [LDAP-AUTH] specified the following text regarding server 710 identity verification in LDAP: 712 ###### 714 3.1.3. Server Identity Check 716 In order to prevent man-in-the-middle attacks, the client MUST verify 717 the server's identity (as presented in the server's Certificate 718 message). In this section, the client's understanding of the 719 server's identity (typically the identity used to establish the 720 transport connection) is called the "reference identity". 722 The client determines the type (e.g., DNS name or IP address) of the 723 reference identity and performs a comparison between the reference 724 identity and each subjectAltName value of the corresponding type 725 until a match is produced. Once a match is produced, the server's 726 identity has been verified, and the server identity check is 727 complete. Different subjectAltName types are matched in different 728 ways. Sections 3.1.3.1 - 3.1.3.3 explain how to compare values of 729 various subjectAltName types. 731 The client may map the reference identity to a different type prior 732 to performing a comparison. Mappings may be performed for all 733 available subjectAltName types to which the reference identity can be 734 mapped; however, the reference identity should only be mapped to 735 types for which the mapping is either inherently secure (e.g., 736 extracting the DNS name from a URI to compare with a subjectAltName 737 of type dNSName) or for which the mapping is performed in a secure 738 manner (e.g., using DNSSEC, or using user- or admin-configured host- 739 to-address/address-to-host lookup tables). 741 The server's identity may also be verified by comparing the reference 742 identity to the Common Name (CN) [LDAP-SCHEMA] value in the leaf 743 Relative Distinguished Name (RDN) of the subjectName field of the 744 server's certificate. This comparison is performed using the rules 745 for comparison of DNS names in Section 3.1.3.1, below, with the 746 exception that no wildcard matching is allowed. Although the use of 747 the Common Name value is existing practice, it is deprecated, and 748 Certification Authorities are encouraged to provide subjectAltName 749 values instead. Note that the TLS implementation may represent DNs 750 in certificates according to X.500 or other conventions. For 751 example, some X.500 implementations order the RDNs in a DN using a 752 left-to-right (most significant to least significant) convention 753 instead of LDAP's right-to-left convention. 755 If the server identity check fails, user-oriented clients SHOULD 756 either notify the user (clients may give the user the opportunity to 757 continue with the LDAP session in this case) or close the transport 758 connection and indicate that the server's identity is suspect. 759 Automated clients SHOULD close the transport connection and then 760 return or log an error indicating that the server's identity is 761 suspect or both. 763 Beyond the server identity check described in this section, clients 764 should be prepared to do further checking to ensure that the server 765 is authorized to provide the service it is requested to provide. The 766 client may need to make use of local policy information in making 767 this determination. 769 3.1.3.1. Comparison of DNS Names 771 If the reference identity is an internationalized domain name, 772 conforming implementations MUST convert it to the ASCII Compatible 773 Encoding (ACE) format as specified in Section 4 of RFC 3490 [IDNA] 774 before comparison with subjectAltName values of type dNSName. 775 Specifically, conforming implementations MUST perform the conversion 776 operation specified in Section 4 of RFC 3490 as follows: 778 o in step 1, the domain name SHALL be considered a "stored string"; 779 o in step 3, set the flag called "UseSTD3ASCIIRules"; 780 o in step 4, process each label with the "ToASCII" operation; and 781 o in step 5, change all label separators to U+002E (full stop). 783 After performing the "to-ASCII" conversion, the DNS labels and names 784 MUST be compared for equality according to the rules specified in 785 Section 3 of RFC3490. 787 The '*' (ASCII 42) wildcard character is allowed in subjectAltName 788 values of type dNSName, and then only as the left-most (least 789 significant) DNS label in that value. This wildcard matches any 790 left-most DNS label in the server name. That is, the subject 791 *.example.com matches the server names a.example.com and 792 b.example.com, but does not match example.com or a.b.example.com. 794 3.1.3.2. Comparison of IP Addresses 796 When the reference identity is an IP address, the identity MUST be 797 converted to the "network byte order" octet string representation 798 [IP] [IPv6]. For IP Version 4, as specified in RFC 791, the octet 799 string will contain exactly four octets. For IP Version 6, as 800 specified in RFC 2460, the octet string will contain exactly sixteen 801 octets. This octet string is then compared against subjectAltName 802 values of type iPAddress. A match occurs if the reference identity 803 octet string and value octet strings are identical. 805 3.1.3.3. Comparison of Other subjectName Types 807 Client implementations MAY support matching against subjectAltName 808 values of other types as described in other documents. 810 ###### 812 A.4. SMTP (2002/2007) 814 In 2002, [SMTP-TLS] specified the following text regarding server 815 identity verification in SMTP: 817 ###### 819 4.1 Processing After the STARTTLS Command 821 [...] 823 The decision of whether or not to believe the authenticity of the 824 other party in a TLS negotiation is a local matter. However, some 825 general rules for the decisions are: 827 o A SMTP client would probably only want to authenticate an SMTP 828 server whose server certificate has a domain name that is the 829 domain name that the client thought it was connecting to. 831 [...] 833 ###### 835 In 2006, [SMTP-AUTH] specified the following text regarding server 836 identity verification in SMTP: 838 ###### 840 14. Additional Requirements When Using SASL PLAIN over TLS 842 [...] 844 After a successful [TLS] negotiation, the client MUST check its 845 understanding of the server hostname against the server's identity as 846 presented in the server Certificate message, in order to prevent man- 847 in-the-middle attacks. If the match fails, the client MUST NOT 848 attempt to authenticate using the SASL PLAIN mechanism. Matching is 849 performed according to the following rules: 851 The client MUST use the server hostname it used to open the 852 connection as the value to compare against the server name as 853 expressed in the server certificate. The client MUST NOT use any 854 form of the server hostname derived from an insecure remote source 855 (e.g., insecure DNS lookup). CNAME canonicalization is not done. 856 If a subjectAltName extension of type dNSName is present in the 857 certificate, it SHOULD be used as the source of the server's 858 identity. 859 Matching is case-insensitive. 860 A "*" wildcard character MAY be used as the leftmost name 861 component in the certificate. For example, *.example.com would 862 match a.example.com, foo.example.com, etc., but would not match 863 example.com. 864 If the certificate contains multiple names (e.g., more than one 865 dNSName field), then a match with any one of the fields is 866 considered acceptable. 868 ###### 870 A.5. XMPP (2004) 872 In 2004, [XMPP] specified the following text regarding server 873 identity verification in XMPP: 875 ###### 877 14.2. Certificate Validation 879 When an XMPP peer communicates with another peer securely, it MUST 880 validate the peer's certificate. There are three possible cases: 882 Case #1: The peer contains an End Entity certificate which appears 883 to be certified by a chain of certificates terminating in a trust 884 anchor (as described in Section 6.1 of [X509]). 885 Case #2: The peer certificate is certified by a Certificate 886 Authority not known to the validating peer. 887 Case #3: The peer certificate is self-signed. 889 In Case #1, the validating peer MUST do one of two things: 890 1. Verify the peer certificate according to the rules of [X509]. 891 The certificate SHOULD then be checked against the expected 892 identity of the peer following the rules described in [HTTP-TLS], 893 except that a subjectAltName extension of type "xmpp" MUST be 894 used as the identity if present. If one of these checks fails, 895 user-oriented clients MUST either notify the user (clients MAY 896 give the user the opportunity to continue with the connection in 897 any case) or terminate the connection with a bad certificate 898 error. Automated clients SHOULD terminate the connection (with a 899 bad certificate error) and log the error to an appropriate audit 900 log. Automated clients MAY provide a configuration setting that 901 disables this check, but MUST provide a setting that enables it. 902 2. The peer SHOULD show the certificate to a user for approval, 903 including the entire certificate chain. The peer MUST cache the 904 certificate (or some non-forgeable representation such as a 905 hash). In future connections, the peer MUST verify that the same 906 certificate was presented and MUST notify the user if it has 907 changed. 909 In Case #2 and Case #3, implementations SHOULD act as in (2) above. 911 ###### 913 As of this writing, [XMPPBIS] specified updated text regarding server 914 identity verification in XMPP. However, that specification has not 915 yet been approved by the IESG, and the relevant text might be 916 replaced by a reference to this document. 918 A.6. NNTP (2006) 920 In 2006, [NNTP-TLS] specified the following text regarding server 921 identity verification in NNTP: 923 ###### 925 5. Security Considerations 927 [...] 929 During the TLS negotiation, the client MUST check its understanding 930 of the server hostname against the server's identity as presented in 931 the server Certificate message, in order to prevent man-in-the-middle 932 attacks. Matching is performed according to these rules: 934 o The client MUST use the server hostname it used to open the 935 connection (or the hostname specified in TLS "server_name" 936 extension [TLS]) as the value to compare against the server name 937 as expressed in the server certificate. The client MUST NOT use 938 any form of the server hostname derived from an insecure remote 939 source (e.g., insecure DNS lookup). CNAME canonicalization is not 940 done. 941 o If a subjectAltName extension of type dNSName is present in the 942 certificate, it SHOULD be used as the source of the server's 943 identity. 945 o Matching is case-insensitive. 946 o A "*" wildcard character MAY be used as the left-most name 947 component in the certificate. For example, *.example.com would 948 match a.example.com, foo.example.com, etc., but would not match 949 example.com. 950 o If the certificate contains multiple names (e.g., more than one 951 dNSName field), then a match with any one of the fields is 952 considered acceptable. 954 If the match fails, the client SHOULD either ask for explicit user 955 confirmation or terminate the connection with a QUIT command and 956 indicate the server's identity is suspect. 958 Additionally, clients MUST verify the binding between the identity of 959 the servers to which they connect and the public keys presented by 960 those servers. Clients SHOULD implement the algorithm in Section 6 961 of [X509] for general certificate validation, but MAY supplement that 962 algorithm with other validation methods that achieve equivalent 963 levels of verification (such as comparing the server certificate 964 against a local store of already-verified certificates and identity 965 bindings). 967 ###### 969 A.7. NETCONF (2006/2009) 971 In 2006, [NETCONF-SSH] specified the following text regarding server 972 identity verification in NETCONF: 974 ###### 976 6. Security Considerations 978 The identity of the server MUST be verified and authenticated by the 979 client according to local policy before password-based authentication 980 data or any configuration or state data is sent to or received from 981 the server. The identity of the client MUST also be verified and 982 authenticated by the server according to local policy to ensure that 983 the incoming client request is legitimate before any configuration or 984 state data is sent to or received from the client. Neither side 985 should establish a NETCONF over SSH connection with an unknown, 986 unexpected, or incorrect identity on the opposite side. 988 ###### 990 In 2009, [NETCONF-TLS] specified the following text regarding server 991 identity verification in NETCONF: 993 ###### 995 3.1. Server Identity 997 During the TLS negotiation, the client MUST carefully examine the 998 certificate presented by the server to determine if it meets the 999 client's expectations. Particularly, the client MUST check its 1000 understanding of the server hostname against the server's identity as 1001 presented in the server Certificate message, in order to prevent man- 1002 in-the-middle attacks. 1004 Matching is performed according to the rules below (following the 1005 example of [NNTP-TLS]): 1007 o The client MUST use the server hostname it used to open the 1008 connection (or the hostname specified in the TLS "server_name" 1009 extension [TLS]) as the value to compare against the server name 1010 as expressed in the server certificate. The client MUST NOT use 1011 any form of the server hostname derived from an insecure remote 1012 source (e.g., insecure DNS lookup). CNAME canonicalization is not 1013 done. 1014 o If a subjectAltName extension of type dNSName is present in the 1015 certificate, it MUST be used as the source of the server's 1016 identity. 1017 o Matching is case-insensitive. 1018 o A "*" wildcard character MAY be used as the leftmost name 1019 component in the certificate. For example, *.example.com would 1020 match a.example.com, foo.example.com, etc., but would not match 1021 example.com. 1022 o If the certificate contains multiple names (e.g., more than one 1023 dNSName field), then a match with any one of the fields is 1024 considered acceptable. 1026 If the match fails, the client MUST either ask for explicit user 1027 confirmation or terminate the connection and indicate the server's 1028 identity is suspect. 1030 Additionally, clients MUST verify the binding between the identity of 1031 the servers to which they connect and the public keys presented by 1032 those servers. Clients SHOULD implement the algorithm in Section 6 1033 of [X509] for general certificate validation, but MAY supplement that 1034 algorithm with other validation methods that achieve equivalent 1035 levels of verification (such as comparing the server certificate 1036 against a local store of already-verified certificates and identity 1037 bindings). 1039 If the client has external information as to the expected identity of 1040 the server, the hostname check MAY be omitted. 1042 ###### 1044 A.8. Syslog (2009) 1046 In 2009, [SYSLOG-TLS] specified the following text regarding server 1047 identity verification in Syslog: 1049 ###### 1051 5.2. Subject Name Authorization 1053 Implementations MUST support certification path validation [X509]. 1054 In addition, they MUST support specifying the authorized peers using 1055 locally configured host names and matching the name against the 1056 certificate as follows. 1058 o Implementations MUST support matching the locally configured host 1059 name against a dNSName in the subjectAltName extension field and 1060 SHOULD support checking the name against the common name portion 1061 of the subject distinguished name. 1062 o The '*' (ASCII 42) wildcard character is allowed in the dNSName of 1063 the subjectAltName extension (and in common name, if used to store 1064 the host name), but only as the left-most (least significant) DNS 1065 label in that value. This wildcard matches any left-most DNS 1066 label in the server name. That is, the subject *.example.com 1067 matches the server names a.example.com and b.example.com, but does 1068 not match example.com or a.b.example.com. Implementations MUST 1069 support wildcards in certificates as specified above, but MAY 1070 provide a configuration option to disable them. 1071 o Locally configured names MAY contain the wildcard character to 1072 match a range of values. The types of wildcards supported MAY be 1073 more flexible than those allowed in subject names, making it 1074 possible to support various policies for different environments. 1075 For example, a policy could allow for a trust-root-based 1076 authorization where all credentials issued by a particular CA 1077 trust root are authorized. 1078 o If the locally configured name is an internationalized domain 1079 name, conforming implementations MUST convert it to the ASCII 1080 Compatible Encoding (ACE) format for performing comparisons, as 1081 specified in Section 7 of [X509]. 1082 o Implementations MAY support matching a locally configured IP 1083 address against an iPAddress stored in the subjectAltName 1084 extension. In this case, the locally configured IP address is 1085 converted to an octet string as specified in [X509], Section 1086 4.2.1.6. A match occurs if this octet string is equal to the 1087 value of iPAddress in the subjectAltName extension. 1089 ###### 1091 A.9. SIP (2009) 1093 As of this writing, [SIP-CERTS] specified text regarding server 1094 identity verification in SIP. However, that specification has not 1095 yet been approved by the IESG, and the relevant text might be 1096 replaced by a reference to this document. 1098 Authors' Addresses 1100 Peter Saint-Andre 1101 Cisco 1103 Email: Peter.SaintAndre@WebEx.com 1105 Kurt D. Zeilenga 1106 Isode Limited 1108 Email: Kurt.Zeilenga@Isode.COM 1110 Jeff Hodges 1111 PayPal 1113 Email: Jeff.Hodges@KingsMountain.com 1115 RL 'Bob' Morgan 1116 UWashington/Internet2 1118 Email: rlmorgan@washington.edu