XEP-0233: Domain-Based Service Names in XMPP SASL Negotiation

Abstract:This specification defines a method by which a connection manager associated with an XMPP server can inform a connecting client about its domain-based service name.
Authors:Matthew Miller, Peter Saint-Andre, Joe Hildebrand
Copyright:© 1999 - 2011 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:Experimental
Type:Standards Track
Version:0.3
Last Updated:2011-06-22

WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.


Table of Contents


1. Introduction
2. Use with Kerberos
3. Non-Kerberos Use Cases
4. Security Considerations
5. IANA Considerations
6. XMPP Registrar Considerations
    6.1. Protocol Namespaces
    6.2. Protocol Versioning
7. XML Schema
8. Acknowledgements

Appendices
    A: Document Information
    B: Author Information
    C: Legal Notices
    D: Relation to XMPP
    E: Discussion Venue
    F: Requirements Conformance
    G: Notes
    H: Revision History


1. Introduction

In certain kinds of XMPP deployments, multiple connection managers associated with the XMPP server can be used to handle requests from connecting clients. In such an architecture, the connection manager might need to communicate the hostname to which the client has connected, or information about alternative connection managers.

This is especially true in environments that make use of Kerberos V5 (RFC 4120 [1]) and negotiation of Simple Authentication and Security Layer or SASL (RFC 4422 [2]) over XMPP, because the client might need additional information about the Kerberos principal so that it can obtain a proper ticket for authentication.

This scenario was not addressed in RFC 3920 [3] or RFC 6120 [4]. However, the problem can be solved using the concept of domain-based service names as described in RFC 5178 [5]. In particular, because XMPP servers typically use the Kerberos V5 ("GSSAPI") SASL mechanism as described in RFC 4752 [6], they can communicate domain-based names as Kerberos V5 service principal names as described in RFC 5179 [7].

Therefore this document defines a method for communication of authentication hostnames (especially Kerberos V5 domain-based service names) in the context of SASL negotiation by XMPP entities.

2. Use with Kerberos

When a connection manager associated with an XMPP server needs to communicate additional information about its service principal name to a connecting client, it can do so by including a child element of the <mechanisms/> element during SASL negotation, as allowed by RFC 6120 (see Section 6.3.5 and the schema for the 'urn:ietf:params:xml:ns:xmpp-sasl' namespace in Appendix A.4). In the case of the Kerberos V5 SASL mechanism, the child element is a <hostname/> element qualified by the 'urn:xmpp:domain-based-name:0' namespace (see Protocol Namespaces regarding issuance of one or more permanent namespaces). In the context of Kerberos, the <hostname/> element MUST include a 'mechanism' attribute, where the value MUST be "GSSAPI". The XML character data of the <hostname/> element shall specify the fully-qualified name of the connection manager (known as the hostname). The client then generates a domain-based service name from the provided hostname, following the format specified in RFC 5179 (i.e., "protocol/hostname/domainname@REALM") and setting the values as follows:

Consider the example of an XMPP service whose canonical name is "example.com". A user might in fact connect to the physical machine "cm7.us.example.com". The hostname would be communicated as follows.

Example 1. Communicating the hostname

<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  <mechanism>GSSAPI</mechanism>
  <mechanism>DIGEST-MD5</mechanism>
  <required/>
  <hostname xmlns='urn:xmpp:domain-based-name:0'
            mechanism='GSSAPI'>cm7.us.example.com</hostname>
</mechanisms> 
  

The client would then attempt to obtain a ticket for the domain-based principal "xmpp/cm7.us.example.com/example.com@EXAMPLE.COM".

3. Non-Kerberos Use Cases

This protocol can also be used to communicate connection manager hostnames outside the context of Kerberos. In this case, the <hostname/> element MUST NOT include the 'mechanism' attribute, and multiple instances of the <hostname/> element MAY be included. An example follows.

Example 2. Communicating hostnames

<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
  <mechanism>GSSAPI</mechanism>
  <mechanism>DIGEST-MD5</mechanism>
  <required/>
  <hostname xmlns='urn:xmpp:domain-based-name:0'>cm3.us.example.com</hostname>
  <hostname xmlns='urn:xmpp:domain-based-name:0'>cm5.us.example.com</hostname>
  <hostname xmlns='urn:xmpp:domain-based-name:0'>cm9.us.example.com</hostname>
</mechanisms> 
  

4. Security Considerations

The communication of hostnames during SASL negotiation is not known to introduce new security vulnerabilities, as long as it is done after the underlying channel has been secured using Transport Layer Security (TLS; RFC 5246 [8]) as described for XMPP in RFC 6120. For additional security considerations, refer to RFC5178 and RFC 5179.

5. IANA Considerations

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

6. XMPP Registrar Considerations

6.1 Protocol Namespaces

This specification defines the following XML namespace:

Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar [10] shall add the foregoing namespace to the registry located at <http://xmpp.org/registrar/namespaces.html>, as described in Section 4 of XMPP Registrar Function [11].

6.2 Protocol Versioning

If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.

7. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:domain-based-name:0'
    xmlns='urn:xmpp:domain-based-name:0'
    elementFormDefault='qualified'>

  <xs:element name='hostname'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute name='mechanism' type='xs:NMTOKEN' use='optional'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

</xs:schema>
  

8. Acknowledgements

Thanks to Owen Friel, Shane Hannon, Seamus Kerrigan, and Alexey Melnikov for their comments.


Appendices


Appendix A: Document Information

Series: XEP
Number: 0233
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.3
Last Updated: 2011-06-22
Approving Body: XMPP Council
Dependencies: XMPP Core, RFC 5178, RFC 5179
Supersedes: None
Superseded By: None
Short Name: NOT YET ASSIGNED
Source Control: HTML
This document in other formats: XML  PDF


Appendix B: Author Information

Matthew Miller

Email: linuxwolf@outer-planes.net
JabberID: linuxwolf@outer-planes.net

Peter Saint-Andre

Email: stpeter@jabber.org
JabberID: stpeter@jabber.org
URI: https://stpeter.im/

Joe Hildebrand

Email: jhildebr@cisco.com
JabberID: hildjj@jabber.org


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 - 2011 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <http://xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XMPP Standards Foundation, 1899 Wynkoop Street, Suite 600, Denver, CO 80202 USA).

Appendix D: 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 XMPP Standards 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 document 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.


Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

Given that this XMPP Extension Protocol normatively references IETF technologies, discussion on the <xsf-ietf@xmpp.org> list might also be appropriate.

Errata can be sent to <editor@xmpp.org>.


Appendix F: Requirements Conformance

The following requirements 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".


Appendix G: Notes

1. RFC 4120: The Kerberos Network Authentication Service (V5) <http://tools.ietf.org/html/rfc4120>.

2. RFC 4422: Simple Authentication and Security Layer (SASL) <http://tools.ietf.org/html/rfc4422>.

3. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc3920>.

4. RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc6120>.

5. RFC 5178: Generic Security Service Application Program Interface (GSS-API) Internationalization and Domain-Based Service Names and Name Type <http://tools.ietf.org/html/rfc5178>.

6. RFC 4752: The Kerberos V5 ("GSSAPI") Simple Authentication and Security Layer (SASL) Mechanism <http://tools.ietf.org/html/rfc4752>.

7. RFC 5179: Generic Security Service Application Program Interface (GSS-API) Domain-Based Service Names Mapping for the Kerberos V GSS Mechanism <http://tools.ietf.org/html/rfc5179>.

8. RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 <http://tools.ietf.org/html/rfc5246>.

9. 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/>.

10. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.

11. XEP-0053: XMPP Registrar Function <http://xmpp.org/extensions/xep-0053.html>.


Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

Version 0.3 (2011-06-22)

Tightened the conformance terminology in several places; updated references.

(psa)

Version 0.2 (2010-06-10)

Expanded use beyond Kerberos; updated namespace; corrected schema; updated references.

(psa)

Version 0.1 (2008-01-30)

Initial published version.

(psa)

Version 0.0.2 (2007-12-11)

Corrected syntax.

(mm/psa)

Version 0.0.1 (2007-12-05)

First draft.

(mm/psa)

END