📄 rfc3340.txt
字号:
Network Working Group M. Rose
Request for Comments: 3340 Dover Beach Consulting, Inc.
Category: Standards Track G. Klyne
Clearswift Corporation
D. Crocker
Brandenburg InternetWorking
July 2002
The Application Exchange Core
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2002). All Rights Reserved.
Abstract
This memo describes Application Exchange (APEX) Core, an extensible,
asynchronous message relaying service for application layer programs.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 2
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Architecture at a Glance . . . . . . . . . . . . . . . . . 4
2. Service Principles . . . . . . . . . . . . . . . . . . . . 5
2.1 Modes of Operation . . . . . . . . . . . . . . . . . . . . 5
2.2 Naming of Entities . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Comparing Endpoints . . . . . . . . . . . . . . . . . . . 7
3. Service Provisioning . . . . . . . . . . . . . . . . . . . 7
3.1 Connection Establishment . . . . . . . . . . . . . . . . . 7
3.2 Authentication . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Authorization . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Confidentiality . . . . . . . . . . . . . . . . . . . . . 8
3.5 Relaying Integrity . . . . . . . . . . . . . . . . . . . . 8
3.6 Traffic Analysis . . . . . . . . . . . . . . . . . . . . . 9
4. The APEX . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1 Use of XML and MIME . . . . . . . . . . . . . . . . . . . 9
4.2 Profile Identification and Initialization . . . . . . . . 10
4.3 Message Syntax . . . . . . . . . . . . . . . . . . . . . . 11
Rose, et. al. Standards Track [Page 1]
RFC 3340 The Application Exchange Core July 2002
4.4 Message Semantics . . . . . . . . . . . . . . . . . . . . 11
4.4.1 The Attach Operation . . . . . . . . . . . . . . . . . . . 11
4.4.2 The Bind Operation . . . . . . . . . . . . . . . . . . . . 13
4.4.3 The Terminate Operation . . . . . . . . . . . . . . . . . 14
4.4.4 The Data Operation . . . . . . . . . . . . . . . . . . . . 15
4.4.4.1 Relay Processing of Data . . . . . . . . . . . . . . . . . 17
4.4.4.2 Application Processing of Data . . . . . . . . . . . . . . 18
4.5 APEX Access Policies . . . . . . . . . . . . . . . . . . . 19
4.5.1 Access Policies in the Endpoint-Relay Mode . . . . . . . . 19
4.5.2 Access Policies in the Relay-Relay Mode . . . . . . . . . 20
5. APEX Options . . . . . . . . . . . . . . . . . . . . . . . 20
5.1 The statusRequest Option . . . . . . . . . . . . . . . . . 22
6. APEX Services . . . . . . . . . . . . . . . . . . . . . . 26
6.1 Use of the APEX Core DTD . . . . . . . . . . . . . . . . . 27
6.1.1 Transaction-Identifiers . . . . . . . . . . . . . . . . . 27
6.1.2 The Reply Element . . . . . . . . . . . . . . . . . . . . 28
6.2 The Report Service . . . . . . . . . . . . . . . . . . . . 28
7. Registration Templates . . . . . . . . . . . . . . . . . . 29
7.1 APEX Option Registration Template . . . . . . . . . . . . 29
7.2 APEX Service Registration Template . . . . . . . . . . . . 29
7.3 APEX Endpoint Application Registration Template . . . . . 30
8. Initial Registrations . . . . . . . . . . . . . . . . . . 30
8.1 Registration: The APEX Profile . . . . . . . . . . . . . . 30
8.2 Registration: The System (Well-Known) TCP port number for
apex-mesh . . . . . . . . . . . . . . . . . . . . . . . . 31
8.3 Registration: The System (Well-Known) TCP port number for
apex-edge . . . . . . . . . . . . . . . . . . . . . . . . 31
8.4 Registration: The statusRequest Option . . . . . . . . . . 31
8.5 Registration: The Report Service . . . . . . . . . . . . . 32
9. DTDs . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
9.1 The APEX Core DTD . . . . . . . . . . . . . . . . . . . . 32
9.2 The Report Service DTD . . . . . . . . . . . . . . . . . . 34
10. Reply Codes . . . . . . . . . . . . . . . . . . . . . . . 35
11. Security Considerations . . . . . . . . . . . . . . . . . 36
References . . . . . . . . . . . . . . . . . . . . . . . . 36
Authors' Addresses . . . . . . . . . . . . . . . . . . . . 38
A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 39
B. IANA Considerations . . . . . . . . . . . . . . . . . . . 39
Full Copyright Statement . . . . . . . . . . . . . . . . . 40
1. Introduction
Network applications can be broadly distinguished by five operational
characteristics:
o server push or client pull;
o synchronous (interactive) or asynchronous (batch);
Rose, et. al. Standards Track [Page 2]
RFC 3340 The Application Exchange Core July 2002
o time-assured or time-insensitive;
o best-effort or reliable; and,
o stateful or stateless.
For example:
o the world-wide web is a pull, synchronous, time-insensitive,
reliable, stateless service; whilst
o Internet mail is a push, asynchronous, time-insensitive, best-
effort (without DSN), stateless service.
Messaging applications vary considerably in their operational
requirements. For example, some messaging applications require
assurance of timeliness and reliability, whilst others do not.
These features come at a cost, in terms of both infrastructural and
configuration complexity. Accordingly, the underlying service must
be extensible to support different requirements in a consistent
manner.
This memo defines a core messaging service that supports a range of
operational characteristics. The core service supports a variety of
tailored services for both user-based and programmatic exchanges.
1.1 Overview
APEX provides an extensible, asynchronous message relaying service
for application layer programs.
APEX, at its core, provides a best-effort datagram service. Each
datagram, simply termed "data", is originated and received by APEX
"endpoints" -- applications that dynamically attach to the APEX
"relaying mesh".
The data transmitted specifies:
o an originating endpoint;
o an opaque content (via a URI-reference);
o one or more recipient endpoints; and,
o zero or more options.
Rose, et. al. Standards Track [Page 3]
RFC 3340 The Application Exchange Core July 2002
Options are used to alter the semantics of the service, which may
occur on a per-recipient or per-data basis, and may be processed by
either a single or multiple relays.
Additional APEX services are provided on top of the relaying mesh;
e.g., access control and presence information.
APEX is specified, in part, as a BEEP [1] "profile". Accordingly,
many aspects of APEX (e.g., authentication) are provided within the
BEEP core. Throughout this memo, the terms "peer", "initiator",
"listener", "client", and "server" are used in the context of BEEP.
In particular, Section 2.1 of the BEEP core memo discusses the roles
that a BEEP peer may perform.
When reading this memo, note that the terms "endpoint" and "relay"
are specific to APEX, they do not exist in the context of BEEP.
1.2 Architecture at a Glance
The APEX stack:
+-------------+
| APEX | an APEX process is either:
| process |
+-------------+ - an application attached as an APEX
| | endpoint; or,
| APEX |
| | - an APEX relay
+-------------+
| | APEX services are realized as applications
| BEEP | having a special relationship with the APEX
| | relays in their administrative domain
+-------------+
| TCP |
+-------------+
| ... |
+-------------+
Rose, et. al. Standards Track [Page 4]
RFC 3340 The Application Exchange Core July 2002
The APEX entities:
administrative domain #1 administrative domain #2
+----------------------------+ +----------------------------+
| +------+ | | +------+ |
| | | | | | | |
| | appl | | | | appl | |
| | | | | | | |
| +......+ +------+ | | +------+ +......+ |
| | | | | | | | | | | |
| |end- | |relay | | | |relay | |end- | |
| | point| | | | | | | | point| |
| +------+ +------+ | | +------+ +------+ |
| | | | | | | | | | | |
| | APEX | | APEX | | | | APEX | | APEX | |
| | | | | | | | | | | |
| +------+ +------+ | | +------+ +------+ |
| || || || | | || || || |
| ============= ================ ============= |
+----------------------------+ +----------------------------+
| <---- APEX relaying mesh ----> |
Note: relaying between administrative domains is configured
using SRV RRs. Accordingly, the actual number of
relays between two endpoints is not fixed.
2. Service Principles
2.1 Modes of Operation
APEX is used in two modes:
endpoint-relay: in which the endpoint is always the BEEP initiator of
the service, whilst relays are always the BEEP listeners. In this
context, applications attach as endpoints, and then the
transmission of data occurs.
relay-relay: in which relays typically, though not necessarily,
reside in different administrative domains. In this context,
applications bind as relays, and then the transmission of data
occurs.
In the endpoint-relay mode, an endpoint (BEEP initiator) may:
o attach as one or more endpoints;
o send data to other endpoints;
Rose, et. al. Standards Track [Page 5]
RFC 3340 The Application Exchange Core July 2002
o receive data from other endpoints; and,
o terminate any of its attachments.
A relay (BEEP listener), in addition to servicing requests from a
BEEP initiator, may:
o terminate any of the endpoint's attachments;
o deliver data from other endpoints; and,
o indicate the delivery status of data sent earlier by the endpoint.
In the relay-relay mode, a relay (BEEP listener or initiator) may:
o bind as one or more administrative domains;
o send data;
o receive data; and,
o terminate any bindings.
2.2 Naming of Entities
Endpoints are named using the following ABNF [2] syntax:
;; Domain is defined in [3], either a FQDN or a literal
entity = local "@" Domain
local = address [ "/" subaddress ]
address = token
subaddress = token
;; all non-control characters, excluding "/" and "@" delimiters
token = 1*(%x20-2E / %x30-3F / %x41-7E / UTF-8) ;; [4]
Two further conventions are applied when using this syntax:
the "apex=" convention: All endpoint identities having a local-part
starting with "apex=" are reserved for use by APEX services
registered with the IANA; and,
Rose, et. al. Standards Track [Page 6]
RFC 3340 The Application Exchange Core July 2002
the "subaddress" convention: If the solidus character ("/", decimal
code 47) occurs in the local-part, this identifies a subaddress of
an endpoint identity (e.g., "fred/appl=wb@example.com" is a
subaddress of the APEX endpoint "fred@example.com").
All subaddresses starting with "appl=" are reserved for use by
APEX endpoint applications registered with the IANA.
Relays, although not named, serve of behalf of administrative
domains, as identified by a FQDN or a domain-literal, e.g.,
"example.com" or "[10.0.0.1]".
In APEX, "endpoints" and "relays" are the fundamental entities. APEX
is carried over BEEP, which has the "peer" as its fundamental entity.
The relationship between BEEP peer entities and APEX endpoint and
relay entities are defined by APEX's Access Policies (Section 4.5).
2.2.1 Comparing Endpoints
Note that since the "local" part of an entity is a string of UTF-8
[4] octets, comparison operations on the "local" part use exact
matching (i.e., are case-sensitive).
Accordingly, "fred@example.com" and "Fred@example.com" refer to
different endpoints. Of course, relays serving the "example.com"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -