JEP-0175: 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.


NOTICE: This JEP is currently within Last Call or under consideration by the Jabber Council for advancement to the next stage in the JSF standards process. For further details, visit <http://www.jabber.org/council/queue.shtml>.


JEP Information

Status: Proposed
Type: Informational
Number: 0175
Version: 0.1
Last Updated: 2006-02-09
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: N/A
Wiki Page: <http://wiki.jabber.org/index.php/Best Practices for Use of SASL ANONYMOUS (JEP-0175)>

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2006 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

Discussion Venue

The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this JEP has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Conformance Terms

The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".


Table of Contents

1. Introduction
2. Recommendation
3. Security Considerations
4. IANA Considerations
5. Jabber Registrar Considerations
Notes
Revision History


1. Introduction

Note: This document describes a protocol or best practice that is intended for addition to the specification that will supersede either RFC 3920 [1] or RFC 3921 [2] within the Internet Standards Process. This document is provided only for the purpose of open community discussion of the potential modification and will be obsoleted as soon as the relevant RFC is published.

RFC 3920 allows the use of any SASL mechanism (see RFC 4422 [3]) in XMPP authentication, including the SASL ANONYMOUS mechanism (see RFC 4505 [4]). This document specifies a recommended protocol flow for such use.

Note: This document is provided for discussion purposes in order to clarify the usage of SASL ANONYMOUS in XMPP systems. It is not meant to supersede the text in RFC 3920, RFC 4422, or RFC 4505. However, the recommendations in this document may be folded into rfc3920bis when that document is written.

2. Recommendation

RFC 3920 specifies that after an XMPP client authenticates with an XMPP server, it must bind a resource to the XML stream so that XML stanzas can be routed to the client. In essence there are three resource binding scenarios:

  1. The client specifies a desired resource identifier and the server accepts it.
  2. The client specifies a desired resource identifier but the server does not accept it, instead overruling the client and assigning a resource identifier.
  3. The client asks the server to assign a resource identifier and the server does so.

No matter which scenario is enacted, at the end of the process the server informs the client of its full JID (<node@domain.tld/resource>). In particular, it might be helpful for an XMPP server to assign a full JID to the client (i.e., not just the resource identifier) if it authenticates with SASL ANONYMOUS, and to ensure that the "bare JID" portion (<node@domain.tld>) is unique in the context of the domain served by the server.

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

  1. Client initiates stream to server.

    Example 1. Stream initiation

    <stream:stream 
            xmlns:stream='http://etherx.jabber.org/streams' 
            xmlns='jabber:client' 
            to='example.com' 
            version='1.0'>
          
  2. Server replies with stream header.

    Example 2. Stream header reply

    <stream:stream 
            xmlns:stream='http://etherx.jabber.org/streams' 
            xmlns='jabber:client' 
            id='c2s_234' 
            from='example.com' 
            version='1.0'>
          
  3. Server advertises stream features.

    Example 3. Stream features advertisement

    <stream:features>
      <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
        <mechanism>DIGEST-MD5<mechanism>
        <mechanism>ANONYMOUS<mechanism>
      </mechanisms>
    </stream:features>
          
  4. Client requests SASL ANONYMOUS mechanism.

    Example 4. Requesting SASL ANONYMOUS

    <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS'/>
          
  5. Server sends <success/>.

    Example 5. Sending success

    <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
          
  6. Client opens new stream.

    Example 6. Initiating a new stream

    <stream:stream
            xmlns:stream='http://etherx.jabber.org/streams'
            xmlns='jabber:client'
            to='example.com'
            version='1.0'>
          
  7. Server tells client that resource binding is required.

    Example 7. Stream header reply with features

    <stream:stream
            xmlns:stream='http://etherx.jabber.org/streams'
            xmlns='jabber:client'
            id='c2s_345'
            from='example.com'
            version='1.0'>
    <stream:features>
      <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
    </stream:features>
          
  8. Client requests that server create a resource for it.

    Example 8. Requesting resource creation

    <iq type='set' id='bind_1'>
      <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
    </iq>
          
  9. Server replies with full JID.

    Example 9. Server informs client of full JID

    <iq type='result' id='bind_1'>
      <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
        <jid>somenode@example.com/someresource</jid>
      </bind>
    </iq>
          

3. Security Considerations

This JEP introduces no security considerations or concerns above and beyond those discussed in RFC 3920.

4. IANA Considerations

This JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].

5. Jabber Registrar Considerations

This JEP requires no interaction with the Jabber Registrar [6].


Notes

1. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://www.ietf.org/rfc/rfc3920.txt>.

2. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://www.ietf.org/rfc/rfc3921.txt>.

3. RFC 4422: Simple Authentication and Security Layer (SASL) <http://www.ietf.org/rfc/rfc4422.txt>.

4. RFC 4505: The SASL ANONYMOUS Mechanism <http://www.ietf.org/rfc/rfc4505.txt>.

5. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

6. The Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.


Revision History

Version 0.1 (2006-02-09)

Initial JEP version; modified flow to remove unecessary challenge.

(psa)

Version 0.0.1 (2006-01-24)

First draft.

(psa)


END