📄 rfc3340.txt
字号:
Typically, the identity function is used, e.g., if a relay
authenticates itself as being from the same administrative domain
as the originator of the data, then the data is accepted.
In addition, some relays may also be configured as "trusted"
intermediaries, so that if a BEEP peer authenticates itself as
being from such a relay, then the data is accepted.
5. APEX Options
APEX, at its core, provides a best-effort datagram service. Options
are used to alter the semantics of the core service.
The semantics of the APEX "option" element are context-specific.
Accordingly, the specification of an APEX option must define:
o the identity of the option;
Rose, et. al. Standards Track [Page 20]
RFC 3340 The Application Exchange Core July 2002
o the context in which the option may appear;
o what content, if any, is contained within the option; and,
o the processing rules for the option.
An option registration template (Section 7.1) organizes this
information.
An "option" element is contained within either a "data",
"originator", "recipient", or an "attach" element, all of which are
termed the "containing" element. The "option" element has several
attributes and contains arbitrary content:
o the "internal" and the "external" attributes, exactly one of which
is present, uniquely identify the option;
o the "targetHop" attribute specifies which relays should process
the option;
o the "mustUnderstand" attribute specifies whether the option, if
unrecognized, must cause an error in processing to occur;
o the "transID" attribute specifies a transaction-identifier for the
option; and,
o the "localize" attribute, if present, specifies one or more
language tokens, each identifying a desirable language tag to be
used if textual diagnostics are returned to the originator.
Note that if the containing element is an "attach", then the values
of the "targetHop" and "transID" attributes are ignored.
The value of the "internal" attribute is the IANA-registered name for
the option. If the "internal" attribute is not present, then the
value of the "external" attribute is a URI or URI with a fragment-
identifier. Note that a relative-URI value is not allowed.
The "targetHop" attribute specifies which relay(s) should process the
option:
this: the option applies to this relay, and must be removed prior
to transmitting the containing element.
final: the option applies to this relay, only if the relay will
transmit the containing element directly to the recipient.
Rose, et. al. Standards Track [Page 21]
RFC 3340 The Application Exchange Core July 2002
all: the option applies to this relay and is retained for the
next.
Note that a final relay does not remove any options as it transmits
the containing element directly to the recipient.
The "mustUnderstand" attribute specifies whether the relay may ignore
the option if it is unrecognized, and is consulted only if the
"targetHop" attribute indicates that the option applies to that
relay. If the option applies, and if the value of the
"mustUnderstand" attribute is "true", and if the relay does not
"understand" the option, then an error in processing has occurred.
5.1 The statusRequest Option
Section 8.4 contains the APEX option registration for the
"statusRequest" option.
If this option is present, then each applicable relay sends a
"statusResponse" message to the originator. This is done by issuing
a data operation whose originator is the report service associated
with the issuing relay, whose recipient is the endpoint address of
the "statusRequest" originator, and whose content is a
"statusResponse" element.
A "statusRequest" option MUST NOT be present in any data operation
containing a "statusResponse" element. In general, applications
should be careful to avoid potential looping behaviors if an option
is received in error.
Consider these examples:
+-------+ +-------+
| | -- data -------> | |
| appl. | | relay |
| #1 | <--------- ok -- | |
+-------+ +-------+
C: <data content='cid:1@example.com'>
<originator identity='fred@example.com' />
<recipient identity='barney@example.com' />
<option internal='statusRequest' targetHop='final'
mustUnderstand='true' transID='86' />
</data>
S: <ok />
Rose, et. al. Standards Track [Page 22]
RFC 3340 The Application Exchange Core July 2002
+-------+ +-------+
| | -- data -------> | |
| relay | | appl. |
| | <--------- ok -- | #2 |
+-------+ +-------+
C: <data content='cid:1@example.com'>
<originator identity='fred@example.com' />
<recipient identity='barney@example.com' />
<option internal='statusRequest' targetHop='final'
mustUnderstand='true' transID='86' />
</data>
S: <ok />
+-------+ +-------+
| | <------- data -- | |
| appl. | | relay |
| #1 | -- ok ---------> | |
+-------+ +-------+
C: <data content='#Content'>
<originator identity='apex=report@example.com' />
<recipient identity='fred@example.com' />
<data-content Name='Content'>
<statusResponse transID='86'>
<destination identity='barney@example.com'>
<reply code='250' />
</destination>
</statusResponse>
</data-content>
</data>
S: <ok />
or
+-------+ +-------+
| | -- data -------> | |
| appl. | | relay |
| #1 | <--------- ok -- | |
+-------+ +-------+
C: <data content='cid:1@example.com'>
<originator identity='fred@example.com' />
<recipient identity='barney@example.com' />
<option internal='statusRequest' targetHop='final'
mustUnderstand='true' transID='86' />
</data>
S: <ok />
Rose, et. al. Standards Track [Page 23]
RFC 3340 The Application Exchange Core July 2002
+-------+ +-------+
| | <------- data -- | |
| appl. | | relay |
| #1 | -- ok ---------> | |
+-------+ +-------+
C: <data content='#Content'>
<originator identity='apex=report@example.com' />
<recipient identity='fred@example.com' />
<data-content Name='Content'>
<statusResponse transID='86'>
<destination identity='barney@example.com'>
<reply code='550'>unknown endpoint
identity</reply>
</destination>
</statusResponse>
</data-content>
</data>
S: <ok />
or
+-------+ +-------+
| | -- data -------> | |
| appl. | | relay |
| #1 | <--------- ok -- | #1 |
+-------+ +-------+
C: <data content='cid:1@example.com'>
<originator identity='fred@example.com' />
<recipient identity='barney@rubble.com' />
<option internal='statusRequest' targetHop='final'
mustUnderstand='true' transID='86' />
</data>
S: <ok />
+-------+ +-------+
| | -- data -------> | |
| relay | | relay |
| #1 | <--------- ok -- | #2 |
+-------+ +-------+
C: <data content='cid:1@example.com'>
<originator identity='fred@example.com' />
<recipient identity='barney@rubble.com' />
<option internal='statusRequest' targetHop='final'
mustUnderstand='true' transID='86' />
</data>
S: <ok />
Rose, et. al. Standards Track [Page 24]
RFC 3340 The Application Exchange Core July 2002
+-------+ +-------+
| | -- data -------> | |
| relay | | appl. |
| #2 | <--------- ok -- | #2 |
+-------+ +-------+
C: <data content='cid:1@example.com'>
<originator identity='fred@example.com' />
<recipient identity='barney@example.com' />
<option internal='statusRequest' targetHop='final'
mustUnderstand='true' transID='86' />
</data>
S: <ok />
+-------+ +-------+
| | <------- data -- | |
| relay | | relay |
| #1 | -- ok ---------> | #2 |
+-------+ +-------+
C: <data content='#Content'>
<originator identity='apex=report@rubble.com' />
<recipient identity='fred@example.com' />
<data-content Name='Content'>
<statusResponse transID='86'>
<destination identity='barney@rubble.com'>
<reply code='250' />
</destination>
</statusResponse>
</data-content>
</data>
S: <ok />
+-------+ +-------+
| | <------- data -- | |
| appl. | | relay |
| #1 | -- ok ---------> | #1 |
+-------+ +-------+
C: <data content='#Content'>
<originator identity='apex=report@rubble.com' />
<recipient identity='fred@example.com' />
<data-content Name='Content'>
<statusResponse transID='86'>
<destination identity='barney@rubble.com'>
<reply code='250' />
</destination>
</statusResponse>
Rose, et. al. Standards Track [Page 25]
RFC 3340 The Application Exchange Core July 2002
</data-content>
</data>
S: <ok />
Note that a trace of a data's passage through the relaying mesh can
be achieved by setting the "targetHop" attribute to "all".
6. APEX Services
APEX, at its core, provides a best-effort datagram service. Within
an administrative domain, all relays must be able to handle messages
for any endpoint within that administrative domain. APEX services
are logically defined as endpoints but, given their ubiquitous
semantics, they do not necessarily need to be associated with a
single physical endpoint. As such, they may be provisioned co-
resident with each relay within an administrative domain, even though
they are logically provided on top of the relaying mesh, i.e.,
+----------+ +----------+ +----------+ +---------+
| APEX | | APEX | | APEX | | |
| access | | presence | | report | | ... |
| service | | service | | service | | |
+----------+ +----------+ +----------+ +---------+
| | | |
| | | |
+----------------------------------------------------------------+
| |
| APEX core |
| |
+----------------------------------------------------------------+
That is, applications communicate with an APEX service by exchanging
data with a "well-known endpoint" (WKE).
For example, APEX applications communicate with the report service by
exchanging data with the well-known endpoint "apex=report" in the
corresponding administrative domain, e.g., "apex=report@example.com"
is the endpoint associated with the report service in the
"example.com" administrative domain.
The specification of an APEX service must define:
o the WKE of the service;
o the syntax and sequence of messages exchanged with the service;
o what access control tokens are consulted by the service.
Rose, et. al. Standards Track [Page 26]
RFC 3340 The Application Exchange Core July 2002
A service registration template (Section 7.2) organizes this
information.
Finally, note that within a single administrative domain, the
relaying mesh makes use of the APEX access service in order to
determine if an originator is allowed to transmit data to a recipient
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -