%ents; ]>
Best Practices for Use of SASL ANONYMOUS This document specifies best practices for use of the SASL ANONYMOUS mechanism in the context of client authentication with an XMPP server. &LEGALNOTICE; 0175 Active Informational Standards Council XMPP Core N/A &stpeter; 1.2rc3 in progress, last updated 2009-08-31 psa

Provided more detailed recommendations regarding usage restrictions for anonymous users; added note about user/anonymous service discovery identity.

1.1 2007-11-07 psa

Recommended that node identifier be a UUID; recommended that trace data not be included.

1.0 2006-09-20 psa

Per a vote of the Jabber Council, advanced status to Active.

0.1 2006-02-09 psa

Initial version; modified flow to remove unecessary challenge.

0.0.1 2006-01-24 psa

First draft.

&xmppcore; allows XMPP server implementations to support any SASL mechanism (see &rfc4422;) when authenticating clients. This document provides recommendations regarding use of the SASL ANONYMOUS mechanism (see &rfc4505;) in XMPP systems.

XMPP server implementations can be deployed in a variety of settings. Although it is difficult to provide recommendations for every kind of XMPP deployment, this document attempts to strike a balance between more and less controlled settings by defining three different deployment types:

An XMPP server implementation SHOULD NOT enable the SASL ANONYMOUS mechanism by default, but instead SHOULD force the administrator of a given service to explicitly enable support in the context of that deployment.

When a client authenticates using SASL ANONYMOUS, an XMPP server SHOULD assign a temporary, unique bare JID &LOCALBARE; to the client. Although the method for ensuring the uniqueness of the localpart is a matter of implementation, it is RECOMMENDED for the localpart to be a UUID as specified in &rfc4122;.

Although RFC 4505 allows the client to provide so-called "trace data" when authenticating via SASL ANONYMOUS, it is NOT RECOMMENDED for the client to include trace data as the XML character data of the <auth/> element (instead, the <auth/> element SHOULD be empty). However, if trace data is included, the server MUST NOT use it for any purpose other than tracing (e.g., not use it as the resource identifier of the anonymous user's full JID).

Because an anonymous user is unknown to the server, the server SHOULD appropriately restrict the user's access in order to limit the possibility of malicious behavior (such as denial of service attacks as described in &xep0205;), especially on public deployments. The following restrictions are encouraged on public deployments. Administrators of private deployments and specialized deployments are advised to take these restrictions into account when configuring their services, but can reasonably relax these restrictions if they have appropriate access controls in place or their deployment requirements cannot be met using the more restrictive profile applied in public deployments.

  1. During resource binding, the server MAY ignore the resource identifier provided by the client (if any) and instead assign a resource identifier that it generates on behalf of the client.

  2. The server SHOULD NOT allow the client to initiate communication with entities hosted at remote servers.

  3. The server MAY allow the client to establish relationships with local services and users; such relationships might include presence subscriptions and roster additions (see &xmppim;), &xep0045; registrations, and &xep0060; subscriptions. (Note that allowing presence subscriptions and roster additions can create a sub-optimal user experience for the added contacts.) However, if the server permits such relationships, it MUST cancel them when the client's session ends.

  4. The server MAY allow the client to store information on the server for the purpsoe of providing an optimal user experience (e.g., storage of client preferences using &xep0049;). However, if the server allows this, it SHOULD remove such information when the client's session ends.

  5. The server SHOULD NOT allow the client to send large numbers of XMPP stanzas or otherwise use large amounts of system resources (e.g., by binding multiple resource identifiers or creating multiple &xep0065; sessions).

The RECOMMENDED protocol flow following TLS negotiation (refer to RFC 3920) is as follows:

  1. Client initiates stream to server.

    ]]>
  2. Server replies with stream header.

    ]]>
  3. Server advertises stream features.

    DIGEST-MD5 ANONYMOUS ]]>
  4. Client requests SASL ANONYMOUS mechanism.

    ]]>
  5. Server sends <success/>.

    ]]>
  6. Client opens new stream.

    ]]>
  7. Server tells client that resource binding is required.

    ]]>
  8. Client requests that server create a resource for it.

    ]]>
  9. Server replies with full JID.

    59BEC12A-9BAB-452B-88F8-D1563F09E549@example.com/2384F02A7E01 ]]>

A server MUST reply to a &xep0030; information ("disco#info") request sent to the bare JID &LOCALBARE; of the user with an identity of "account/anonymous", as shown in the following example.

]]>

The security considerations discussed in RFC 3920 and RFC 4505 apply to the use of SASL ANONYMOUS in XMPP; specific suggestions regarding usage restrictions for anonymous users are provided under the Recommendations section of this document.

This document requires no interaction with &IANA;.

This document requires no interaction with the ®ISTRAR;.

Thanks to Dave Cridland, Tuomas Koski, Jack Moffitt, Andy Skelton, and Kurt Zeilenga for their feedback.