%ents; ]>
JID Prep This specification defines a way for an XMPP client to request an XMPP server to prep and normalize a given JID. &LEGALNOTICE; 0328 Deferred Standards Track Standards XMPP Core XMPP IM XEP-0030 NOT_YET_ASSIGNED Lance Stout lance@lance.im lance@lance.im 0.1 2013-05-28 psa

Initial published version approved by the XMPP Council.

0.0.2 2013-05-21 lance

Incorporated feedback.

0.0.1 2013-05-08 lance

Initial version.

In order to properly compare and match JIDs, a normalization and prepping step is required by &rfc6122;. The responsibility for such normalization is split between the server and client, where the server is expected to prep any JID slots that it recognizes, particulary those related to stanza routing and roster items. However, the server can not prep JID slots that it does not understand, and so those are left for the client to process.

In some environments (in particular, browser based environments), a client does not have access to the various Unicode and internationalization libraries necessary to properly prep and normalize a JID. For those situations, this protocol defines a way for a client to ask a server to normalize a JID on its behalf.

If a server supports JID prep queries, it MUST specify the 'urn:xmpp:jidprep:0' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.

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

The JID prep service MAY be supported through the use of an external component (&xep0114;); in which case, the component MUST return an identity of "component/jidprep" in addition to the "urn:xmpp:jidprep:0" feature.

... ]]>

In order to request prepping for a JID, the client sends an &IQ; stanza of type "get" to the server, containing a <jid/> element qualified by the 'urn:xmpp:jidprep:0' namespace and whose XML character data is the JID in question:

ROMeo@montague.lit/orchard ]]>

The server MUST return either an IQ-result or an IQ-error. When returning an IQ-result, the server sends an &IQ; staza of type='result' containing a <jid/> element qualifed by the 'urn:xmpp:jidprep:0' namespace and whose XML character data MUST be the prepped and normalized version of the requested JID:

romeo@montague.lit/orchard ]]>

If an IQ-error is returned, then it SHOULD specify an error condition of <jid-malformed/> if the given JID could not be processed to a normalized form:

romeo@@montague.lit/orchard ]]>

If a client has the ability to perform the prepping and normalization process itself, it SHOULD NOT make a JID prep request to the server.

Upon a successful response, the client SHOULD cache the result, mapping the original JID to the normalized version.

In order to reduce the number of queries made by clients, the server MUST enforce normalization rules for any JID slots understood by the server (e.g. the to and from attributes, roster item JIDs, etc).This requirement is intended to be subsumed by the requirements introduced in &rfc6122bis;

As the process for normalizing a JID can be resource intensive, there is a possibility for denial of service attacks. A server MAY rate limit the number of requests to prevent such attacks. Likewise, the server MAY only respond to requests from users that are local to the server.

This document requires no interaction with &IANA;.

The ®ISTRAR; includes 'urn:xmpp:jidprep:0' in its registry of protocol namespaces (see &NAMESPACES;).

  • urn:xmpp:jidprep:0
&NSVER;

The ®ISTRAR; includes a category of "component" in its registry of Service Discovery identities (see &DISCOCATEGORIES;); as a result of this document, the Registrar includes a type of "jidprep" to that category.

The registry submission is as follows:

component jidprep A server component that offers a JID prepping and normalization service to constrained clients. XEP-0328 ]]>
The protocol documented by this schema is defined in XEP-xxxx: http://www.xmpp.org/extensions/xep-xxxx.html ]]>