XEP-XXXX: S2S Components

Abstract
This document describes a modernized method of connecting 'components' to a server, expressed as a profile of the existing standard server-to-server protocol.
Author
Dave Cridland
Copyright
© 1999 – 2020 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

ProtoXEP

WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.
Type
Standards Track
Version
0.0.1 (2015-01-20)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Draft
  4. Final

1. Introduction

Many server implementations of XMPP provide support for hosting external components, which service specific domains.

There are currently two protocols defined for components. Firstly, there is the well-deployed, but limited, XEP-0114. This models components as a special entity, using a special content namespace on the stream. Use of stream features has never been well-documented, and using them can cause interoperability problems. Furthermore, the authentication model both requires high entropy stream identifiers, providing a potential entropy attack, and moreover uses a single mechanism and hash algorithm. Other issues are documented in XEP-0225.

XEP-0225 also defines another component protocol, though not widely implemented. It models components in effect as specialist clients, and uses a component binding protocol to bind multiple domains to a single connection, being otherwise a standard C2S connection. This has problems, since the allowable stanza addressing on a real C2S stream is very different to that allowed by a XEP-0225 stream.

This specification describes a third approach; modelling components as remote servers. This eliminates the special handling at the stream level, and can reuse much of the protocol infrastructure that already exists for S2S.

2. Overview

A Component provides services for one or more service domains. In order to connect to other service domains, hosted both on a local server and remote servers via federation, a component connects to a single host server. This host server in turn accepts traffic over both S2S and C2S for the component's service domains, and routes (forwards) stanzas to the component for handling.

In this protocol, a component connects to a host server according to its configuration, and opens an S2S stream to the special domain "__xmpp-component". It then negotiates TLS and BIDI, authenticates via SASL, and then optionally requests further domains via Dialback requests,

From this point, the communications between the component and host server are in every respect the same as between any two federated servers.

3. Differences to S2S

3.1 Discovery and DNS

Components do not perform SRV lookups to locate the server, as they do not connect to any particular domain. Therefore components SHOULD be configured to connect to a specific host and port by the administrator. No default host or port is provided by this specification.

3.2 Stream Addressing

Components do connect to any particular domain; indeed the host server may not have any domain name. In order to avoid the use of an unusual pattern - for example, "to" and "from" being the same - connecting components SHALL use a placeholder label of "__xmpp-component".

The "from" attribute of the stream MUST be one of the service domains the component intends to host.

3.3 Mandatory Extension Support

3.3.1 TLS

Host servers MUST offer, and components SHOULD negotiate, TLS support. Components are sometimes operated on the same physical machine as the host server, in which case TLS might be considered superfulous.

Note the comments about use of PKIX under the SASL Authentication section.

3.3.2 BiDi

Host servers MUST offer, and components SHALL negotiate, the Bidirectional Stream protocol described in XEP-0288; host servers cannot connect to the component for outbound stanza transmission.

3.3.3 Dialback

Host servers MAY offer, and in such cases components MAY use, the XEP-0220 <db:result> framework for requesting hosting for additional service domains. Host servers offering Server Dialback in this way MUST include error support, and MUST NOT attempt the dialback portion of the protocol (ie, MUST NOT attempt to connect and send <db:verify> elements).

Note that the contents of the <db:result/> elements exchanged between Components and host servers are ignored by both parties.

3.4 SASL Authentication

Host servers MUST offer, and components SHALL negotiate, SASL authentication. If the EXTERNAL mechanism is implemented, careful consideration may be requierd on what certificates to accept; use of PKIX authorization would imply that the certificate used by the component could also be used by the server. This could be undesirable, and use of configured key identifiers might be preferable.

For support of deployments where a simple pre-shared secret is preferable, host servers MUST implement SCRAM-SHA1 and SCRAM-SHA1-PLUS.

4. Security Considerations

The entirety of this document is concerned with security.

5. IANA Considerations

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

6. XMPP Registrar Considerations

None.

7. Acknowledgements

This document was inspired by discussions with various members of the community.


Appendices

Appendix A: Document Information

Series
XEP
Number
XXXX
Publisher
XMPP Standards Foundation
Status
ProtoXEP
Type
Standards Track
Version
0.0.1
Last Updated
2015-01-20
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0220, XEP-0288
Supersedes
XEP-0114, XEP-0225
Superseded By
None
Short Name
comp-s2s

This document in other formats: XML  PDF

Appendix B: Author Information

Dave Cridland
Email
dave@hellopando.com
JabberID
dwd@dave.cridland.net

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2020 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 <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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.

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

Appendix H: Revision History

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

  1. Version 0.0.1 (2015-01-20)
    dwd

END