%ents;
]>
Hop CheckThis document defines an XMPP protocol extension that enables an entity to check the security of client-to-server and server-to-server hops between it and another entity. Note: This specification has been retracted by the author because the problem is not compelling and a real solution would be too complicated.
&LEGALNOTICE;
0219RetractedStandards TrackStandardsXMPP CoreTO BE ASSIGNED
&stpeter;
0.32008-06-12psa

Retracted by the author because the problem is not compelling and a real solution would be too complicated.

Added more detailed security considerations; broadened applicability to be more similar to traceroute; changed name of status attribute to secure and its type to boolean; added delay attribute; defined XML schema.

0.0.12007-05-01psa

First draft.

Note: This specification has been retracted by the author because the problem is not compelling and a real solution would be too complicated.

When two XMPP users communicate, one or both of them may want to know the status of the XMPP communications path (i.e., of all the hops) between them. While the primary motivation is to determine if all the hops are secured via Transport Layer Security (see &rfc5246;) as specified for XMPP in &xmppcore;, more general information about the communications path may also be of interest.

This document describes a protocol for discovering such information, similar in spirit to the traceroute protocol specified in &rfc1393; but specific to XMPP.

As a user, I may want to know three things:

If my connection to my server is encrypted.

If my server's connection to my contact's server is encrypted.

If my contact's connection to their server is encrypted.

If the answer to all three of these questions is "yes" and I have some level of trust in my XMPP server (see Security Considerations) then I have some assurance that communications between me and my contact will not be subject to interception by the likes of "Eve" (a passive attacker who can eavesdrop on messages) and "Mallory" (an active attacker who can maliciously modify messages in transit).

Note: By "encrypted" is meant channel encryption with Transport Layer Security (or, for client-to-server connections, legacy SSL) using something other than the null cipher. This protocol does not include more sophisticated information about the connection, such as the cipher suite used, the SASL authentication mechanism used (if any), the certificate identity (if any), the trusted roots involved in certificate authenticate, etc.

The answer to the first question is straightforward, since my client knows if its connection to my server is encrypted (as well as the certificates involved).

If I trust my server, I can ask it to report on the security of its connection to my contact's server. (Note: Because server-to-server connections are unidirectional and it is possible for the connection in one direction to be encrypted but for the connection in the opposite direction to be unencrypted, my server MUST NOT report the connection to my contact's server as encrypted unless the connection is encrypted in both directions.)

If the server-to-server connection is encrypted and my server trusts that connection, my server can ask my contact's server to report on the security of my contact's connection.

By feeling my way along the hops in this manner, I can learn if all three hops are encrypted and therefore can have some assurance that the entire communications path is encrypted.

Because XMPP has a decentralized architecture, there may be multiple hops along the communications path. Consider two users Juliet at capulet.lit and Romeo at montague.lit. This specification uses the example of two clients, but the protocol can be used to check hops between any two XMPP entities. There is one hop from Juliet's client to the capulet.lit server, one hop from the capulet.lit server to the montague.lit server, and one hop from the montague.lit server to Romeo's client. If both capulet.lit and montague.lit are virtual hosts of the same server, it is possible that there are only two hops in this situation rather than three. Moreover, in certain circumstances (e.g., if one of the clients connects to a third-party HTTP connection manager) it is possible for there to be more than three hops. However, this document assumes a standard XMPP architecture.

We assume that Juliet's connection to capulet.lit is encrypted and that she has some trust in her server. If she wants to check the security of the path between her and Romeo, she should would send the following request:

]]>

Naturally, capulet.lit knows about the security of Juliet's connection to capulet.lit and about the security of its connection to montague.lit. But it does not know about the security of Romeo's connection to montague.net; therefore on behalf of Juliet it needs to ask montague.lit about that hop before returning an answer to Juliet:

]]>

The montague.lit server would then report to capulet.lit regarding the hops from juliet@capulet.lit to romeo@montague.lit/orchard:

]]>

The capulet.lit server would then report to Juliet regarding the security of all the hops:

]]>

The foregoing shows only the "happy path"; many alternate flows and error conditions are possible, as described in the Protocol section of this document.

In order for an entity to check the communications path between itself and a target entity, the entity shall generate a hopcheck request of the following form:

]]>

The sender MUST set the respondent to be the entity that the sender believes is the entity at the other end of the next hop in the communications path. (For a connected resource, this is the server to which the client is connected; for a server, this is the server corresponding to the domain portion of the JID in the triggering request received from a connected resource or other local entity.)

If the sender is a server but it is making the request on behalf of a connected resource, it MUST include the 'for' attribute and set it to the 'from' address of the triggering request.

The following error cases are defined:

If the respondent does not support the hopcheck namespace, it MUST return a &unavailable; error.

If the <hopcheck/> element does not include a 'to' attribute, the respondent MUST return a &badrequest; error.

If the 'to' or 'for' attribute of the <hopcheck/> element contains a JID that is malformed, the respondent MUST return a &badjid; error.

If the respondent is a server and the sender is a full JID &LOCALFULL;, the server MUST verify that the JID is a connected resource of the server (per RFC 6120); if it is not, then the respondent MUST return a &forbidden; error.

If both the sender and the respondent are servers and the domain identifier of the <hopcheck/> element's 'to' attribute does not match a validated domain of the respondent, the respondent MUST return a &notfound; error.

If both the sender and the respondent are servers, the JID of the <hopcheck/> element's 'to' is a connected resource of the respondent server, and the JID of the <hopcheck/> element's 'for' is not authorized to know the presence of the target (either via presence subscription or temporary presence sharing via directed presence as defined in &xmppim;), then the respondent MUST return a &forbidden; error.

If an error does not occur, the response shall be of the following form:

]]>

The 'delay' attribute is OPTIONAL. If included, it represents the time in milliseconds that it took for the respondent to receive a reply from the target or intermediate respondent.

The 'ip' attribute is OPTIONAL. If included, it represents the IPv4 or IPv6 address of the target or intermediate respondent.

The 'encrypted' attribute is REQUIRED. It is a boolean &BOOLEANNOTE; that represents whether the hop in question is encrypted via Transport Layer Security (see &rfc5246;) or at a legacy SSL port.

The 'auth' attribute is REQUIRED. It represents whether and how the hop in question is authenticated, in particular via one of the following means:

A Simple Authentication and Security Layer mechanism (see &rfc4422; for the specification and &ianasasl; for a list of registered SASL mechanisms; the names for standardized, non-obsolete mechanisms are used as values of the 'auth' attribute).

The obsolete &xep0078; protocol using the "plaintext" or "digest" method.

The server dialback protocol ("dialback") as specified in &xep0220;.

If an entity supports the Hop Check protocol, it MUST report that by including a service discovery feature of "http://www.xmpp.org/extensions/xep-0219.html#ns" &NSNOTE; in response to a &xep0030; information request:

]]>
...
...
]]>

Trust levels vary. The administrator of a server may have complete trust in the server they run. A user of a friend's server may have significant trust in the server. A user of a server in a military environment may have no choice of server and may trust that their superiors are doing the right thing. And so on. While the trust that a user places in a server may or may not be warranted, this document uses the level of trust that exists to bootstrap greater trust in the entire communications path.

Even if all the hops are encrypted, the traffic may still be available in cleartext to a representative of an Internet Service Provider ("Isaac"), a representative of the justice system ("Justin"), or a malicious attacker ("Mallory") that has gained access to any of the servers along the communications path. The protocol described herein is decidedly NOT a substitute for end-to-end encryption technologies such as &xep0116;.

This document requires no interaction with &IANA;.

Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0219.html#ns"; upon advancement of this specification, the &REGISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.