Domain Name Associations (DNA) in the Extensible Messaging and Presence Protocol (XMPP)Cisco Systems, Inc.1899 Wynkoop Street, Suite 600DenverCO80202USApsaintan@cisco.comCisco Systems, Inc.1899 Wynkoop Street, Suite 600DenverCO80202USAmamille2@cisco.com
RAI
Internet-DraftXMPPExtensible Messaging and Presence ProtocolJabberfederationdelegationsecurityThis document improves the security of the Extensible Messaging and Presence Protocol (XMPP) in two ways. First, it specifies how "prooftypes" can establish a strong association between a domain name and an XML stream. Second, it describes how to securely delegate a source domain to a derived domain, which is especially important in virtual hosting environments.The need to establish a strong association between a domain name and an XML stream arises in both client-to-server and server-to-server communication using the Extensible Messaging and Presence Protocol (XMPP), because XMPP servers are typically identified by DNS domain names. However, a client or peer server needs to verify the identity of a server to which it connects. To date, such verification has been established based on information obtained from the Domain Name System (DNS), the Public Key Infrastructure (PKI), or similar sources. This document (1) generalizes the model currently in use so that additional prooftypes can be defined, (2) provides a basis for modernizing some prooftypes to reflect progress in underlying technologies such as DNS Security , and (3) describes the flow of operations for establishing a domain name association.Furthermore, the process for resolving the domain name of an XMPP service into the IP address at which an XML stream will be negotiated (defined in ) can involve delegation of a source domain (say, example.com) to a derived domain (say, hosting.example.net). If such delegation is not done in a secure manner, then the domain name association cannot be authenticated. Therefore, this document provides guidelines for defining secure delegation methods.This document inherits XMPP terminology from and , DNS terminology from , , and , and security terminology from and . The terms "source domain", "derived domain", "reference identity", and "presented identity" are used as defined in the "CertID" specification . The terms "permissive federation", "verified federation", and "encrypted federation" are derived from , although we substitute the term "authenticated federation" for the term "trusted federation" from that document.The following flow chart illustrates the protocol flow for establishing domain name associations between Server A and Server B, as described in the remaining sections of this document.To illustrate the problem, consider the simplified order of events (see for details) in establishing an XML stream between Server A (a.example) and Server B (b.example):Server A resolves the DNS domain name b.example.Server A opens a TCP connection to the resolved IP address.
Server A sends an initial stream header to Server B, asserting that it is a.example:
<stream:stream from='a.example' to='b.example'>
Server B sends a response stream header to Server A, asserting that it is b.example:
<stream:stream from='b.example' to='a.example'>
The servers attempt TLS negotiation, during which Server B (acting as a TLS server) presents a PKIX certificate proving that it is b.example and Server A (acting as a TLS client) presents a PKIX certificate proving that it is a.example.Server A checks the PKIX certificate that Server B provided and Server B checks the PKIX certificate that Server A provided; if these proofs are consistent with the XMPP profile of the matching rules from , each server accepts that there is a strong domain name association between its stream to the other party and the DNS domain name of the other party.Several simplifying assumptions underlie the happy scenario just outlined:Server A presents a PKIX certificate during TLS negotiation, which enables the parties to complete mutual authentication.There are no additional domains associated with Server A and Server B (say, a subdomain chatrooms.a.example on Server A or a second domain c.example on Server B).The server administrators are able to obtain PKIX certificates in the first place.The server administrators are running their own XMPP servers, rather than using hosting services.Let's consider each of these "wrinkles" in turn.If Server A does not present its PKIX certificate during TLS negotiation (perhaps because it wishes to verify the identity of Server B before presenting its own credentials), Server B is unable to mutually authenticate Server A. Therefore, Server B needs to negotiate and authenticate a stream to Server A, just as Server A has done:Server B resolves the DNS domain name a.example.Server B opens a TCP connection to the resolved IP address.
Server B sends an initial stream header to Server A, asserting that it is b.example:
<stream:stream from='b.example' to='a.example'>
Server A sends a response stream header to Server B, asserting that it is a.example:
<stream:stream from='a.example' to='b.example'>
The servers attempt TLS negotiation, during which Server A (acting as a TLS server) presents a PKIX certificate proving that it is a.example.Server B checks the PKIX certificate that Server A provided; if it is consistent with the XMPP profile of the matching rules from , Server B accepts that there is a strong domain name association between its stream to Server A and the DNS domain name a.example.Unfortunately, now the servers are using two TCP connections instead of one, which is somewhat wasteful. However, there are ways to tie the authentication achieved on the second TCP connection to the first TCP connection; see for further discussion.Consider the common scenario in which Server B hosts not only b.example but also a second domain c.example. If a user of Server B associated with c.example wishes to communicate with a friend at a.example, Server B needs to send XMPP stanzas from the domain c.example rather than b.example. Although Server B could open an new TCP connection and negotiate new XML streams for the domain pair of c.example and a.example, that too is wasteful. Server B already has a connection to a.example, so how can it assert that it would like to add a new domain pair to the existing connection?The traditional method for doing so is the Server Dialback protocol, first specified in and since moved to . Here, Server B can send a <db:result/> element for the new domain pair over the existing stream.This element functions as Server B's assertion that it is (also) c.example, and thus is functionally equivalent to the 'from' address of an initial stream header as previously described.In response to this assertion, Server A needs to obtain some kind of proof that Server B really is also c.example. It can do the same thing that it did before:Server A resolves the DNS domain name c.example.Server A opens a TCP connection to the resolved IP address (which might be the same IP address as for b.example).
Server A sends an initial stream header to Server B, asserting that it is a.example:
<stream:stream from='a.example' to='c.example'>
Server B sends a response stream header to Server A, asserting that it is c.example:
<stream:stream from='c.example' to='a.example'>
The servers attempt TLS negotiation, during which Server B (acting as a TLS server) presents a PKIX certificate proving that it is c.example.Server A checks the PKIX certificate that Server B provided; if it is consistent with the XMPP profile of the matching rules from , Server A accepts that there is a strong domain name association between its stream to Server B and the DNS domain name c.example.Now that Server A accepts the domain name association, it informs Server B of that fact:The parties can then terminate the second connection, since it was used only for Server A to associate a stream over the same IP:port combination with the domain name c.example (dialback key links the original stream to the new association).Piggybacking can also occur in the other direction. Consider the common scenario in which Server A provides XMPP services not only for a.example but also for a subdomain such as a groupchat service at chatrooms.a.example (see ). If a user from c.example at Server B wishes to join a room on the groupchat sevice, Server B needs to send XMPP stanzas from the domain c.example to the domain chatrooms.a.example rather than a.example. Therefore, Server B needs to negotiate and authenticate a stream to chatrooms.a.example:Server B resolves the DNS domain name chatrooms.a.example.Server B opens a TCP connection to the resolved IP address.
Server B sends an initial stream header to Server A acting as chatrooms.a.example, asserting that it is b.example:
<stream:stream from='b.example' to='chatrooms.a.example'>
Server A sends a response stream header to Server B, asserting that it is chatrooms.a.example:
<stream:stream from='chatrooms.a.example' to='b.example'>
The servers attempt TLS negotiation, during which Server A (acting as a TLS server) presents a PKIX certificate proving that it is chatrooms.a.example.Server B checks the PKIX certificate that Server A provided; if it is consistent with the XMPP profile of the matching rules from , Server B accepts that there is a strong domain name association between its stream to Server A and the DNS domain name chatrooms.a.example.As before, the parties now have two TCP connections open. So that they can close the now-redundant connection, Server B sends a dialback key to Server A over the new connection.Server A then informs Server B that it accepts the domain name association:Server B can now close the connection over which it tested the domain name association for chatrooms.a.example.The foregoing protocol flows assumed that domain name associations were proved using the standard PKI prooftype specified in : that is, the server's proof consists of a PKIX certificate that is checked according to a profile of the matching rules from , the client's verification material is obtained out of band in the form of a trusted root, and secure DNS is not necessary.However, sometimes XMPP server administrators are unable or unwilling to obtain valid PKIX certificates for their servers (e.g., the administrator of im.cs.podunk.example can't receive certification authority verification messages sent to mailto:hostmaster@podunk.example, or hosting.example.net does not want to take on the liability of holding the certificate and private key for example.com). In these circumstances, prooftypes other than PKIX are desirable. Two alternatives have been defined so far: DANE and POSH.In the DANE prooftype, the server's proof consists of a PKIX certificate that is compared as an exact match or a hash of either the SubjectPublicKeyInfo or the full certificate, and the client's verification material is obtained via secure DNS.The DANE prooftype is based on . For XMPP purposes, the following rules apply:If there is no SRV resource record, pursue the fallback methods described in .Use the 'to' address of the initial stream header to determine the domain name of the TLS client's reference identifier (since use of the TLS Server Name Indication is purely discretionary in XMPP, as mentioned in ).In the POSH (PKIX Over Secure HTTP) prooftype, the server's proof consists of a PKIX certificate that is checked according to the rules from and , the client's verification material is obtained by retrieving the PKIK certificate over HTTPS at a well-known URI , and secure DNS is not necessary since the HTTPS retrieval mechanism relies on the chain of trust from the public key infrastructure.POSH is fully defined in .One common method for deploying XMPP services is multi-tenancy or virtual hosting: e.g., the XMPP service for example.com is actually hosted at hosting.example.net. Such an arrangement is relatively convenient in XMPP given the use of DNS SRV records , such as the following pointer from example.com to hosting.example.net:Secure connections with multi-tenancy can work using the PKIX prooftype on a small scale if the provider itself wishes to host several domains (e.g., several related domains such as jabber-de.example and jabber-ch.example). However, in practice the security of multi-tenancy has been found to be unwieldy when the provider hosts large numbers of XMPP services on behalf of multiple customers. Typically there are two main reasons for this state of affairs: the service provider (say, hosting.example.net) wishes to limit its liability and therefore does not wish to hold the certificate and private key for the customer (say, example.com) and the customer wishes to improve the security of the service and therefore does not wish to share its certificate and private key with service provider. As a result, server-to-server communications to example.com go unencrypted or the communications are TLS-encrypted but the certificates are not checked (which is functionally equivalent to a connection using an anonymous key exchange). This is also true of client-to-server communications, forcing end users to override certificate warnings or configure their clients to accept certificates for hosting.example.net instead of example.com. The fundamental problem here is that if DNSSEC is not used then the act of delegation via DNS SRV records is inherently insecure. explains how to use DNSSEC for secure delegation with the DANE prooftype and explains how to use HTTPS redirects for secure delegation with the POSH prooftype.In general, a DNA prooftype conforms to the following definition:A mechanism for proving an association between a domain name and an XML stream, where the mechanism defines (1) the nature of the server's proof, (2) the matching rules for comparing the client's verification material against the server's proof, (3) how the client obtains its verification material, and (4) whether the mechanism depends on secure DNS.The PKI, DANE, and POSH prooftypes adhere to this model. In addition, other prooftypes are possible (examples might include PGP keys rather than PKIX certificates, or a token mechanism such as Kerberos or OAuth).Some prooftypes depend on (or are enhanced by) secure DNS and therefore also need to describe how secure delegation occurs for that prooftype.This document supplements but does not supersede the security considerations of and . Relevant security considerations can also be found in and .This document has no actions for the IANA.Using DNS-Based Authentication of Named Entities (DANE) TLSA records with SRV and MX records.The DANE specification [RFC6698] describes how to use TLSA resource records in the DNS to associate a server's host name with its TLS certificate. The association is secured with DNSSEC. Some application protocols can use SRV records [RFC2782] to indirectly name the server hosts for a service domain. (SMTP uses MX records for the same purpose.) This specification gives generic instructions for how these application protocols locate and use TLSA records. Separate documents give the details that are specific to particular application protocols.Using PKIX over Secure HTTP (POSH) as a Prooftype for XMPP Domain Name AssociationsThis document defines a prooftype involving PKIX over Secure HTTP (POSH) for associating a domain name with an XML stream in the Extensible Messaging and Presence Protocol (XMPP). It also defines a method involving HTTPS redirects (appropriate for use with the POSH prooftype) for securely delegating a source domain to a derived domain in XMPP.Domain names - concepts and facilitiesInformation Sciences Institute (ISI)Domain names - implementation and specificationUSC/ISI4676 Admiralty WayMarina del ReyCA90291US+1 213 822 1511A DNS RR for specifying the location of services (DNS SRV)Troll TechWaldemar Thranes gate 98BOsloN-0175NO+47 22 806390+47 22 806380arnt@troll.noInternet Software Consortium950 Charter StreetRedwood CityCA94063US+1 650 779 7001Microsoft CorporationOne Microsoft WayRedmondWA98052USlevone@microsoft.comThis document describes a DNS RR which specifies the location of the
server(s) for a specific protocol and domain.DNS Security Introduction and RequirementsTelematica Instituutroy.arends@telin.nlInternet Systems Consortiumsra@isc.orgVeriSign, Inc.mlarson@verisign.comColorado State Universitymassey@cs.colostate.eduNational Institute for Standards and Technologyscott.rose@nist.govInternet Security Glossary, Version 2This Glossary provides definitions, abbreviations, and explanations of terminology for information system security. The 334 pages of entries offer recommendations to improve the comprehensibility of written material that is generated in the Internet Standards Process (RFC 2026). The recommendations follow the principles that such writing should (a) use the same term or definition whenever the same concept is mentioned; (b) use terms in their plainest, dictionary sense; (c) use terms that are already well-established in open publications; and (d) avoid terms that either favor a particular vendor or favor a particular technology or mechanism over other, competing techniques that already exist or could be developed. This memo provides information for the Internet community.Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) ProfileThis memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet. An overview of this approach and model is provided as an introduction. The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms. Standard certificate extensions are described and two Internet-specific extensions are defined. A set of required certificate extensions is specified. The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions. An algorithm for X.509 certification path validation is described. An ASN.1 module and examples are provided in the appendices. [STANDARDS TRACK]Defining Well-Known Uniform Resource Identifiers (URIs)This memo defines a path prefix for "well-known locations", "/.well-known/", in selected Uniform Resource Identifier (URI) schemes. [STANDARDS-TRACK]Extensible Messaging and Presence Protocol (XMPP): CoreCiscopsaintan@cisco.comRepresentation 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)Ciscopsaintan@cisco.comPayPaljeff.hodges@paypal.comServer Dialbackjer@jabber.orgCiscopsaintan@cisco.comfippo@goodadvice.pages.deExtensible Messaging and Presence Protocol (XMPP): CoreJabber Software Foundationstpeter@jabber.org
Applications
XMPP Working GroupRFCRequest for CommentsI-DInternet-DraftXMPPExtensible Messaging and Presence ProtocolJabberIMInstant MessagingPresenceXMLExtensible Markup LanguageThis memo defines the core features of the Extensible Messaging and Presence Protocol (XMPP), a protocol for streaming Extensible Markup Language (XML) elements in order to exchange structured information in close to real time between any two network endpoints. While XMPP provides a generalized, extensible framework for exchanging XML data, it is used mainly for the purpose of building instant messaging and presence applications that meet the requirements of RFC 2779.Multi-User Chatstpeter@jabber.orgXMPP Protocol Flows for Inter-Domain Federationstpeter@jabber.orgBidirectional Server-to-Server Connectionsdave.cridland@isode.com