From 7496cffcb1c271b5c259674e77090e06e13b1d44 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Wed, 29 Aug 2007 02:25:49 +0000 Subject: [PATCH] 0.2 git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1193 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0215.xml | 221 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 168 insertions(+), 53 deletions(-) diff --git a/xep-0215.xml b/xep-0215.xml index 44a919b9..01359a53 100644 --- a/xep-0215.xml +++ b/xep-0215.xml @@ -6,8 +6,8 @@
- STUN Server Discovery for Jingle - This document specifies methods for discovering STUN servers for use in negotiation of certain Jingle transport methods. + External Service Discovery + This document specifies an XMPP protocol extension for discovering services external to the XMPP network. &LEGALNOTICE; 0215 Experimental @@ -22,10 +22,16 @@ NOT YET ASSIGNED &stpeter; &seanegan; + + 0.2 + 2007-08-28 + psa +

Broadened scope from discovery of STUN servers to discovery of any external (non-XMPP) service.

+
0.1 2007-05-16 - psa + psa/se

Initial published version.

@@ -61,81 +67,180 @@
-

The administrator of an XMPP server may wish to deploy one or more STUN servers (see &rfc3489; and &rfc3489bis;) in order to ease the process of negotiating media exchanges via &xep0176;. A client can become aware of a STUN server in the following ways:

+

An XMPP client may need to discover services external to the XMPP network in order to complete certain XMPP-related use cases. One example is the discovery of STUN servers (see &rfc3489; and &rfc3489bis;) and STUN relays (see &turn;) for the sake of negotiating media exchanges via &xep0176;. The protocol specified herein is functionally equivalent to the protocol currently used in the Google Talk service for discovery of STUN servers, as documented at <http://code.google.com/apis/talk/jep_extensions/jingleinfo.html>, but has been broadened in scope to address additional use cases if desired. An XMPP client can already discover such external services in several ways, including:

    -
  1. The server is specified in the client's default settings.
  2. -
  3. The server is manually added into the client's configuration by a human user.
  4. -
  5. The server is discovered via DNS SRV records (see &rfc2782;) as specified in Section 9.1 of RFC 3489.
  6. +
  7. The service is specified in the client's default settings.
  8. +
  9. The service is manually added into the client's configuration by a human user.
  10. +
  11. The service is discovered via non-XMPP service discovery protocols, such as: +
      +
    • DNS SRV records (&rfc2782;)
    • +
    • Service Location Protocol (SLP; &rfc2608;)
    • +
    • The Dynamic Delegation Discovery System (DDDS; &rfc3401;)
    • +
    • The NAPTR profile of DDDS (&rfc3403;)
    • +
    • The S-NAPTR profile of DDDS (&rfc3958;)
    • +
    • The U-NAPTR profile of DDDS (&rfc4848;)
    • +
    +
-

Unfortunately, the foregoing methods are subject to human error or cannot be deployed in wide range of scenarios. Therefore, this document defines a way for an XMPP server to advertise a list of STUN servers and provide credentials for use by an XMPP client at a STUN server. This method should be used only as a fallback when DNS SRV lookups are not possible for the client or server.

-

Note: The protocol specified herein is functionally equivalent to the protocol currently used in the Google Talk service and documented at <http://code.google.com/apis/talk/jep_extensions/jingleinfo.html>.

+

Unfortunately, some of the foregoing methods are subject to human error and others are either not widely available or cannot be deployed in wide range of scenarios (e.g., when the administrators of an XMPP service do not have access to DNS SRV records). Therefore, this document defines a way for an XMPP server to provide information about external services, which may include extended information such as temporary credentials for authentication at such services. This method should be used only as a fallback when the relevant service discovery technologies (DNS SRV, DDDS, SLP, S-NAPTR, U-NAPTR, etc.) are not available to the client or server. This method does not use &xep0030; since that technology is designed for discovery of XMPP entities, not entities outside an XMPP network.

-

In order to learn about available STUN servers associated with or known by an XMPP server, a client sends an IQ-get containing a <stun/> element qualified by the "http://www.xmpp.org/extensions/xep-0215.html#ns" namespace &NSNOTE;.

- In order to learn about external services known to an XMPP server, a client sends an IQ-get containing an empty <services/> element qualified by the 'http://www.xmpp.org/extensions/xep-0215.html#ns' namespace &NSNOTE;, typically to its own server (but perhaps to a dedicated discovery service).

+

The XMPP server (or service) SHOULD return the list of external services it is aware of, but MAY instead return an appropriate error, such as &unavailable; if the server does not support this protocol or &forbidden; if the requesting entity does not have permission to receive the list of external services. Each service is encapsulated via a <service/> element.

+

Note: The processes by which an XMPP server discovers external services for "proxying" to XMPP entities are out of scope for this specification.

+

The <service/> element MAY be empty or MAY include extended information about the service as described in the Extended Information section of this document.

+

The attributes of the <service/> element are summarized in the following table.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefinitionInclusion
hostEither a fully qualified domain name (FQDN) or an IP address (IPv4 or IPv6).REQUIRED
passwordA service- or server-generated password for use at the service. *OPTIONAL
portThe communications port to be used at the host.RECOMMENDED
transportThe underlying transport protocol to be used when communicating with the service (typically either TCP or UDP).RECOMMENDED
typeThe service type as registered with the ®ISTRAR;.REQUIRED
usernameA service- or server-generated username for use at the service. *OPTIONAL
+

* Note: The processes by which an external service might generate or an XMPP server might negotiate the username and password are outside the scope of this specification. One possible approach is for the XMPP server to generate a short-term authentication credential based on a private key shared with the external service.

+
+ + + +

A client requests all services by sending a <services/> element to its server.

+ - + id='all1'> + - ]]> -

The XMPP server SHOULD return the list of STUN servers, but MAY instead return an appropriate error, such as &unavailable; if the server does not support the STUN Server Discovery protocol or &forbidden; if the requesting entity does not have permission to receive the list of STUN servers.

- + - - - - + id='all1'> + + + + + + + - ]]> -

The syntax of the <server/> element is as follows:

-
    -
  • The <server/> element SHOULD be empty.
  • -
  • The 'host' attribute is REQUIRED and specifies either a fully qualified domain name (FQDN) or an IP address (IPv4 or IPv6).
  • -
  • The 'port' attribute is REQUIRED and specifies the communications port to be used at the host. The port is necessary since this specification assumes that DNS SRV lookups are not possible.
  • -
  • The 'username' and 'password' attributes are OPTIONAL and are used as described below.
  • -
-

A STUN server may require a username and password in order to accept STUN binding requests and/or STUN allocate requests. In this case, the XMPP server would typically generate a short-term authentication credential based on a private key shared with the STUN server. Other implementations are possible, and long-term credentials could be used instead; see RFC 3489 and rfc3489bis for details).

- +
+ +

A client requests selected services by sending a <services/> element to its server including a 'type' attribute specifying the service type of interest.

+ + + + ]]> + - - - - + id='selected1'> + + + + - ]]> -

An XMPP server MAY send an updated list of STUN servers by "pushing" the list to a client that has previously requested the list:

- +

If a client requests selected services, an XMPP server MAY as needed send an updated list of the relevant services by "pushing" the list to a client that has previously requested the list:

+ - + - + - ]]> + ]]> +
+
+ + +

If a server or service needs to include extended information, it SHOULD do so by including each bit of information as the XML character data of the <value/> child of a distinct <field/> element, with the entire set of fields contained within an <x/> element of type "result" qualified by the 'jabber:x:data' namespace (see &xep0004;); this <x/> element SHOULD be a child of the <service/> element qualified by the 'http://www.xmpp.org/extensions/xep-0215.html#ns' namespace &NSNOTE;. Thus the IQ result SHOULD be of the following form:

+ + + + + + [var-value] + + [ ... ] + + + +]]> +

Note: A <field/> element MAY contain more than one <value/> child if appropriate.

+

If the data fields are to be used in the context of a protocol approved by the XMPP Standards Foundation, they SHOULD be registered in accordance with the rules defined in XEP-0068, resulting in the inclusion of a <field/> element whose 'var' attribute has a value of "FORM_TYPE" and whose 'type' attribute has a value of "hidden".

+

Note: Although &xep0128; specifies that an XMPP entity MUST NOT supply extended information about associated children communicated via the 'http://www.xmpp.org/extensions/xep-0215.html#ns' namespace, that rule does not apply to External Service Discovery since services external to the XMPP network cannot communicate via XMPP.

@@ -164,7 +269,10 @@ -

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

+

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

+
+ +

The XMPP Registrar shall maintain a registry of external service types and their associated transport protocol(s). Such service types will probably be derived from the &ianaports;, defined DNS SRV record types, defined DDDS records for NAPTR, S-NAPTR, and U-NAPTR, and &ianaslp;. A future version of this specification shall define the relevant actions requested of the XMPP Registrar.

@@ -178,21 +286,28 @@ xmlns='http://www.xmpp.org/extensions/xep-0215.html#ns' elementFormDefault='qualified'> - + + + - + + - + + +