<?xml version="1.0" encoding="UTF-8"?><?rfc linefile="1:xml/complete/rfc3080.xml"?>
<!-- automatically generated by xml2rfc v1.32 on 2007-03-17T18:32:04Z -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc toc="yes"?>

<rfc number="3080" category="std">


<front>
<title abbrev="The BEEP Core">The Blocks Extensible Exchange Protocol Core</title>


<author initials="M.T." surname="Rose" fullname="Marshall T. Rose">
<organization>Invisible Worlds, Inc.</organization>

<address>
<postal>
<street>131 Stony Circle</street>
<street>Suite 500</street>
<city>Santa Rosa</city> <region>CA</region> <code>95401</code>
<country>US</country>
</postal>

<phone>+1 707 578 2350</phone>
<email>mrose@invisible.net</email>
<uri>http://invisible.net/</uri>
</address>
</author>


<date month="March" year="2001"/>

<area>Applications</area>
<keyword>application protocols</keyword>
<keyword>BEEP</keyword>
<keyword>BXXP</keyword>
<keyword>application framework</keyword>

<abstract><t>This memo describes a generic application protocol
kernel for connection-oriented,
asynchronous interactions called the BEEP
(Blocks Extensible Exchange Protocol)
core.
BEEP permits simultaneous and independent exchanges
within the context of a single application user-identity,
supporting both textual and binary messages.</t></abstract>
</front>


<middle>

<section title="Introduction">
<t>This memo describes a generic application protocol
kernel for connection-oriented, asynchronous interactions called BEEP.</t>

<t>At BEEP's core is a framing mechanism that
permits simultaneous and independent exchanges of messages between peers.
Messages are arbitrary <xref target="RFC2045">MIME</xref> content,
but are usually textual
(structured using <xref target="W3C.XML">XML</xref>).</t>

<t>All exchanges occur in the context of a channel &mdash;
a binding to a well-defined aspect of the application,
such as transport security, user authentication, or data exchange.</t>

<t>Each channel has an associated "profile" that defines the syntax and
semantics of the messages exchanged.
Implicit in the operation of BEEP is the notion of channel management.
In addition to defining BEEP's channel management profile,
this document defines:
<list style="symbols">
<t>the <xref target="RFC2246">TLS</xref> transport security profile; and,</t>

<t>the <xref target="RFC2222">SASL</xref> family of profiles.</t>
</list>
Other profiles,
such as those used for data exchange,
are defined by an application protocol designer.</t>
</section>

<section title="The BEEP Core">
<t>A BEEP session is mapped onto an underlying transport service.
A separate series of documents describe how a particular transport
service realizes a BEEP session.
For example,
<xref target="BEEP-TCPMAPPING" /> describes how a BEEP session is
mapped onto a single <xref target="RFC0793">TCP</xref> connection.</t>

<t>When a session is established,
each BEEP peer advertises the profiles it supports.
Later on,
during the creation of a channel,
the client supplies one or more proposed profiles for that channel.
If the server creates the channel,
it selects one of the profiles and sends it in a reply;
otherwise,
it may indicate that none of the profiles are acceptable,
and decline creation of the channel.</t>

<t>Channel usage falls into one of two categories:
<list style="hanging">
<t hangText="initial tuning:">
these are used by profiles that perform initialization once the
BEEP session is established
(e.g., negotiating the use of transport security);
although several exchanges may be required to perform the initialization,
these channels become inactive early in the BEEP session and remain so
for the duration.</t>

<t hangText="continuous:">
these are used by profiles that support data exchange;
typically,
these channels are created after the initial tuning channels have gone
quiet.</t>
</list>
Note that because of their special nature,
only one tuning channel may be established at any given time;
in contrast,
BEEP allows multiple data exchange channels to be simultaneously in
use.</t>



<section title="Roles">
<t>Although BEEP is peer-to-peer,
it is convenient to label each peer in the context of the role it is
performing at a given time:
<list style="symbols">
<t>When a BEEP session is established,
the peer that awaits new connections is acting in the
listening role,
and the other peer,
which establishes a connection to the listener,
is acting in the initiating role.
In the examples which follow,
these are referred to as "L:" and "I:",
respectively.</t>

<t>A BEEP peer starting an exchange is termed the client;
similarly,
the other BEEP peer is termed the server.
In the examples which follow,
these are referred to as "C:" and "S:",
respectively.</t>
</list>
Typically,
a BEEP peer acting in the server role is also acting in a listening role.
However,
because BEEP is peer-to-peer in nature,
no such requirement exists.</t>

<section anchor="exchange.styles" title="Exchange Styles">
<t>BEEP allows three styles of exchange:
<list style="hanging">
<t hangText="MSG/RPY:">the client sends a "MSG" message asking the
server to perform some task,
the server performs the task and replies with a "RPY" message
(termed a positive reply).</t>

<t hangText="MSG/ERR:">the client sends a "MSG" message,
the server does not perform any task and replies with an "ERR" message
(termed a negative reply).</t>

<t hangText="MSG/ANS:">the client sends a "MSG" message,
the server,
during the course of performing some task,
replies with zero or more "ANS" messages,
and,
upon completion of the task,
sends a "NUL" message,
which signifies the end of the reply.</t>
</list>
The first two styles are termed one-to-one exchanges,
whilst the third style is termed a one-to-many exchange.</t>
</section>
</section>



<section anchor="messages" title="Messages and Frames">
<t>A message is structured according to the rules of MIME.
Accordingly,
each message may begin with "entity-headers"
(c.f., <xref target="RFC2045">MIME</xref>'s Section 3).
If none,
or only some,
of the "entity-headers" are present:
<list style="symbols">
<t>the default "Content-Type" is "application/octet-stream"; and,</t>

<t>the default "Content-Transfer-Encoding" is "binary".</t>
</list></t>

<t>Normally,
a message is sent in a single frame.
However,
it may be convenient or necessary to segment a message into multiple frames
(e.g., if only part of a message is ready to be sent).</t>

<t>Each frame consists of a header, the payload, and a trailer.
The header and trailer are each represented using printable ASCII
characters and are terminated with a CRLF pair.
Between the header and the trailer is the payload,
consisting of zero or more octets.</t>

<figure>
<preamble>For example,
here is a message contained in a single frame that contains a payload
of 120 octets spread over 5 lines
(each line is terminated with a CRLF pair):</preamble>
<artwork>
    C: MSG 0 1 . 52 120
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    C: &lt;/start>
    C: END
</artwork>
<postamble>In this example,
note that the entire message is represented in a single frame.</postamble>
</figure>



<section anchor="frame.syntax" title="Frame Syntax">
<figure>
<preamble>The <xref target="RFC2234">ABNF</xref> for a frame is:</preamble>
<artwork>
frame      = data / mapping

data       = header payload trailer

header     = msg / rpy / err / ans / nul

msg        = "MSG" SP common          CR LF
rpy        = "RPY" SP common          CR LF
ans        = "ANS" SP common SP ansno CR LF
err        = "ERR" SP common          CR LF
nul        = "NUL" SP common          CR LF

common     = channel SP msgno SP more SP seqno SP size
channel    = 0..2147483647
msgno      = 0..2147483647
more       = "." / "*"
seqno      = 0..4294967295
size       = 0..2147483647
ansno      = 0..2147483647

payload    = *OCTET

trailer    = "END" CR LF

mapping    = ;; each transport mapping may define additional frames
</artwork>
</figure>



<section anchor="frame.header" title="Frame Header">
<t>The frame header consists of a three-character keyword
(one of: "MSG", "RPY", "ERR", "ANS", or "NUL"),
followed by zero or more parameters.
A single space character (decimal code 32, " ") separates each component.
The header is terminated with a CRLF pair.</t>

<t>The channel number ("channel") must be a non-negative integer
(in the range 0..2147483647).</t>

<t>The message number ("msgno") must be a non-negative integer
(in the range 0..2147483647)
and have a different value than all other "MSG" messages on the same
channel for which a reply has not been completely received.</t>

<t>The continuation indicator
("more", one of: decimal code 42, "*",
or decimal code 46, ".")
specifies whether this is the final frame of the message:
<list style="hanging">
<t hangText='   intermediate ("*"):'>
at least one other frame follows for the message; or,</t>

<t hangText='   complete ("."):'>
this frame completes the message.</t>
</list></t>

<t>The sequence number ("seqno") must be a non-negative integer
(in the range 0..4294967295) and specifies the sequence number of the
first octet in the payload,
for the associated channel
(c.f., <xref target="frame.payload" />).</t>

<t>The payload size ("size") must be a non-negative integer
(in the range 0..2147483647) and specifies the exact number of octets
in the payload.
(This does not include either the header or trailer.)</t>

<figure>
<preamble>Note that a frame may have an empty payload,
e.g.,</preamble> 
<artwork>
    S: RPY 0 1 * 287 20
    S:     ...
    S:     ...
    S: END
    S: RPY 0 1 . 307 0
    S: END
</artwork>
</figure>

<t>The answer number ("ansno") must be a non-negative integer
(in the range 0..4294967295) and must have a different value than all
other answers in progress for the message being replied to.</t>



<t>There are two kinds of frames: data and mapping.
Each transport mapping (c.f., <xref target="transport.mapping" />) may
define its own frames.
For example,
<xref target="BEEP-TCPMAPPING" /> defines the SEQ frame.
The remainder of this section discusses data frames.</t>

<figure>
<preamble>When a message is segmented and sent as several frames,
those frames must be sent sequentially,
without any intervening frames from other messages on the same channel.
However,
there are two exceptions:
first,
no restriction is made with respect to the interleaving of frames for
other channels;
and,
second,
in a one-to-many exchange,
multiple answers may be simultaneously in progress.
Accordingly,
frames for "ANS" messages may be interleaved on the same channel &mdash;
the answer number is used for collation,
e.g.,</preamble> 
<artwork>
    S: ANS 1 0 * 0 20 0
    S:     ...
    S:     ...
    S: END
    S: ANS 1 0 * 20 20 1
    S:     ...
    S:     ...
    S: END
    S: ANS 1 0 . 40 10 0
    S:     ...
    S: END
</artwork>
<postamble>which shows two "ANS" messages interleaved on channel 1 as
part of a reply to message number 0.
Note that the sequence number is advanced for each frame sent on the
channel,
and is independent of the messages sent in those frames.</postamble>
</figure>



<t>There are several rules for identifying poorly-formed frames:
<list style="symbols">
<t>if the header doesn't start with "MSG", "RPY", "ERR", "ANS", or "NUL"; </t>

<t>if any of the parameters in the header cannot be determined or are
invalid (i.e., syntactically incorrect);</t>

<t>if the value of the channel number doesn't refer to an existing
channel;</t>

<t>if the header starts with "MSG",
and the message number refers to a "MSG" message that has been completely
received but for which a reply has not been completely sent;</t>

<t>if the header doesn't start with "MSG",
and refers to a message number for which a reply has already been
completely received;</t>

<t>if the header doesn't start with "MSG",
and refers to a message number that has never been sent
(except during session establishment,
c.f., <xref target="greeting.message" />);</t>

<t>if the header starts with "MSG", "RPY", "ERR", or "ANS",
and refers to a message number for which at least one other frame has
been received,
and the three-character keyword starting this frame and the
immediately-previous received frame for this message number are not
identical;</t>

<t>if the header starts with "NUL",
and refers to a message number for which at least one other frame has
been received,
and the keyword of of the immediately-previous received frame for this
reply isn't "ANS";</t>

<t>if the continuation indicator of the previous frame received on
the same channel was intermediate ("*"),
and its message number isn't identical to this frame's message number;</t>

<t>if the value of the sequence number doesn't correspond to the
expected value for the associated channel
(c.f., <xref target="frame.payload" />); or,</t>

<t>if the header starts with "NUL",
and the continuation indicator is intermediate ("*") or the payload
size is non-zero.</t>
</list>
If a frame is poorly-formed,
then the session is terminated without generating a response,
and it is recommended that a diagnostic entry be logged.</t>
</section>



<section anchor="frame.payload" title="Frame Payload">
<t>The frame payload consists of zero or more octets.</t>

<t>Every payload octet sent in each direction on a channel has an
associated sequence number.
Numbering of payload octets within a frame is such that the first payload
octet is the lowest numbered,
and the following payload octets are numbered consecutively.
(When a channel is created,
the sequence number associated with the first payload octet of the
first frame is 0.)</t>

<t>The actual sequence number space is finite,
though very large,
ranging from 0..4294967295 (2**32 - 1).
Since the space is finite,
all arithmetic dealing with sequence numbers is performed modulo 2**32.
This unsigned arithmetic preserves the relationship of sequence
numbers as they cycle from 2**32 - 1 to 0 again.
Consult Sections 2 through 5 of <xref target="RFC1982" /> for a
discussion of the arithmetic properties of sequence numbers.</t>

<t>When receiving a frame,
the sum of its sequence number and payload size,
modulo 4294967296 (2**32),
gives the expected sequence number associated with the first payload octet of
the next frame received.
Accordingly,
when receiving a frame if the sequence number isn't the expected
value for this channel,
then the BEEP peers have lost synchronization,
then the session is terminated without generating a response,
and it is recommended that a diagnostic entry be logged.</t>
</section>



<section anchor="frame.trailer" title="Frame Trailer">
<t>The frame trailer consists of "END" followed by a CRLF pair.</t>

<t>When receiving a frame,
if the characters immediately following the payload don't correspond
to a trailer,
then the session is terminated without generating a response,
and it is recommended that a diagnostic entry be logged.</t>
</section>
</section>



<section anchor="frame.semantics" title="Frame Semantics">
<t>The semantics of each message is channel-specific.
Accordingly,
the profile associated with a channel must define:
<list style="symbols">
<t>the initialization messages,
if any,
exchanged during channel creation;</t>

<t>the messages that may be exchanged in the payload of the channel; and,</t>

<t>the semantics of these messages.</t>
</list>
A <xref target="profile.registration">profile registration template</xref>
organizes this information.</t>

<section title="Poorly-formed Messages">
<t>When defining the behavior of the profile,
the template must specify how poorly-formed "MSG" messages are replied
to.
For example,
the channel management profile sends a negative reply containing an
error message (c.f., <xref target="error.message" />).</t>

<t>If a poorly-formed reply is received on channel zero,
the session is terminated without generating a response,
and it is recommended that a diagnostic entry be logged.</t>

<t>If a poorly-formed reply is received on another channel,
then the channel must be closed using the procedure in
<xref target="close.message" />.</t>
</section>
</section>
</section>



<section anchor="channel.mgmt" title="Channel Management">
<t>When a BEEP session starts,
only channel number zero is defined,
which is used for channel management.
<xref target="channelZ.definition" /> contains the profile registration for
BEEP channel management.</t>

<t>Channel management allows each BEEP peer to advertise the profiles
that it supports
(c.f., <xref target="greeting.message" />),
bind an instance of one of those profiles to a channel
(c.f., <xref target="start.message" />),
and then later close any channels or release the BEEP session
(c.f., <xref target="close.message" />).</t>

<t>A BEEP peer should support at least 257 concurrent channels.</t>



<section anchor="beep.messages" title="Message Semantics">

<section anchor="greeting.message" title="The Greeting Message">
<figure>
<preamble>When a BEEP session is established,
each BEEP peer signifies its availability by immediately sending a
positive reply with a message number of zero that contains a
"greeting" element, e.g.,</preamble>
<artwork>
    L: &lt;wait for incoming connection>
    I: &lt;open connection>
    L: RPY 0 0 . 0 110
    L: Content-Type: application/beep+xml
    L:
    L: &lt;greeting>
    L:    &lt;profile uri='http://iana.org/beep/TLS' />
    L: &lt;/greeting>
    L: END
    I: RPY 0 0 . 0 52
    I: Content-Type: application/beep+xml
    I:
    I: &lt;greeting />
    I: END
</artwork>
<postamble>Note that this example implies that the BEEP peer in the
initiating role waits until the BEEP peer in the listening role sends its
greeting &mdash; this is an artifact of the presentation;
in fact,
both BEEP peers send their replies independently.</postamble>
</figure>

<t>The "greeting" element has two optional attributes
("features" and "localize")
and zero or more "profile" elements,
one for each profile supported by the BEEP peer acting in a server role:
<list style="symbols">
<t>the "features" attribute,
if present,
contains one or more feature tokens,
each indicating an optional feature of the channel management profile
supported by the BEEP peer;</t>

<t>the "localize" attribute,
if present,
contains one or more language tokens (defined in <xref target="RFC3066" />),
each identifying a desirable language tag to be used by the remote
BEEP peer when generating textual diagnostics for the "close" and
"error" elements
(the tokens are ordered from most to least desirable); and,</t>

<t>each "profile" element contained within the "greeting" element identifies
a profile,
and unlike the "profile" elements that occur within the "start" element,
the content of each "profile" element may not contain an optional
initialization message.</t>
</list></t>

<t><xref target="feature.registration" /> defines a registration
template for optional features.</t>
</section>



<section anchor="start.message" title="The Start Message">
<figure>
<preamble>When a BEEP peer wants to create a channel,
it sends a "start" element on channel zero,
e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 120
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    C: &lt;/start>
    C: END
</artwork>
</figure>

<t>The "start" element has a "number" attribute,
an optional "serverName" attribute,
and one or more "profile" elements:
<list style="symbols">
<t>the "number" attribute indicates the channel number 
(in the range 1..2147483647)
used to identify the channel in future messages;</t>

<t>the "serverName" attribute,
an arbitrary string,
indicates the desired server name for this BEEP session; and,</t>


<t>each "profile" element contained with the "start" element has a
"uri" attribute,
an optional "encoding" attribute,
and arbitrary character data as content:
<list style="symbols">
<t>the "uri" attribute authoritatively identifies the profile;</t>

<t>the "encoding" attribute,
if present,
specifies whether the content of the "profile" element is represented
as a base64-encoded string; and,</t>

<t>the content of the "profile" element,
if present,
must be no longer than 4K octets in length and specifies an
initialization message given to the channel as soon as it is created.</t>
</list></t>
</list></t>

<t>To avoid conflict in assigning channel numbers when requesting the
creation of a channel,
BEEP peers acting in the initiating role use only positive integers that are
odd-numbered;
similarly,
BEEP peers acting in the listening role use only positive integers that are
even-numbered.</t>

<t>The "serverName" attribute for the first successful "start" element
received by a BEEP peer is meaningful for the duration of the BEEP
session.
If present,
the BEEP peer decides whether to operate as the indicated "serverName";
if not,
an "error" element is sent in a negative reply.</t>

<t>When a BEEP peer receives a "start" element on channel zero,
it examines each of the proposed profiles,
and decides whether to use one of them to create the channel.
If so,
the appropriate "profile" element is sent in a positive reply;
otherwise,
an "error" element is sent in a negative reply.</t>

<t>When creating the channel,
the value of the "serverName" attribute from the first successful
"start" element is consulted to provide configuration information,
e.g., the desired server-side certificate when starting the
<xref target="tls.profile">TLS transport security profile</xref>.</t>

<figure>
<preamble>For example,
a successful channel creation might look like this:</preamble>
<artwork>
    C: MSG 0 1 . 52 178
    C: Content-Type: application/beep+xml
    C: 
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    C:    &lt;profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 221 87
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    S: END
</artwork>
</figure>

<figure>
<preamble>Similarly,
an unsuccessful channel creation might look like this:</preamble>
<artwork>
    C: MSG 0 1 . 52 120
    C: Content-Type: application/beep+xml
    C: 
    C: &lt;start number='2'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/OTP' /> 
    C: &lt;/start>
    C: END
    S: ERR 0 1 . 221 127
    S: Content-Type: application/beep+xml
    S:
    S: &lt;error code='501'>number attribute
    S: in &amp;lt;start&amp;gt; element must be odd-valued&lt;/error>
    S: END
</artwork>
</figure>

<figure>
<preamble>Finally,
here's an example in which an initialization element is exchanged
during channel creation:</preamble>
<artwork>
    C: MSG 0 1 . 52 158
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/TLS'>
    C:        &lt;![CDATA[&lt;ready />]]&gt;
    C:    &lt;/profile>
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 110 121
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/TLS'>
    S:     &lt;![CDATA[&lt;proceed />]]&gt;
    S: &lt;/profile>
    S: END
</artwork>
</figure>
</section>



<section anchor="close.message" title="The Close Message">
<figure>
<preamble>When a BEEP peer wants to close a channel,
it sends a "close" element on channel zero,
e.g.,</preamble>
<artwork>
    C: MSG 0 2 . 235 71
    C: Content-Type: application/beep+xml
    C:
    C: &lt;close number='1' code='200' />
    C: END
</artwork>
</figure>

<t>The "close" element has a "number" attribute,
a "code" attribute,
an optional "xml:lang" attribute,
and an optional textual diagnostic as its content:
<list style="symbols">
<t>the "number" attribute indicates the channel number;</t>

<t>the "code" attribute is a three-digit reply code meaningful to programs
(c.f., <xref target="reply-codes" />);</t>

<t>the "xml:lang" attribute identifies the language that the element's
content is written in
(the value is suggested,
but not mandated,
by the "localize" attribute of the "greeting" element sent by the
remote BEEP peer); and,</t>

<t>the textual diagnostic (which may be multiline) is
meaningful to implementers,
perhaps administrators,
and possibly even users,
but never programs.</t>
</list>
Note that if the textual diagnostic is present,
then the "xml:lang" attribute is absent only if the language
indicated as the remote BEEP peer's first choice is used.</t>

<t>If the value of the "number" attribute is zero,
then the BEEP peer wants to release the BEEP session
(c.f., <xref target="session.estab" />) &mdash; otherwise the value of
the "number" attribute refers to an existing channel,
and the remainder of this section applies.</t>

<t>A BEEP peer may send a "close" message for a channel whenever
all "MSG" messages it has sent on that channel have been acknowledged.
(Acknowledgement consists of the first frame of a reply being received
by the BEEP peer that sent the MSG "message".)</t>

<t>After sending the "close" message,
that BEEP peer must not send any more "MSG" messages on that channel
being closed until the reply to the "close" message has been received
(either by an "error" message rejecting the request to close the channel,
or by an "ok" message subsequently followed by the channel being
successfully started).</t>

<t>NOTE WELL: until a positive reply to the request to close the
channel is received,
the BEEP peer must be prepared to process any "MSG" messages that it
receives on that channel.</t>

<t> When a BEEP peer receives a "close" message for a channel,
it may,
at any time,
reject the request to close the channel by sending an "error" message in a
negative reply.</t>

<t>Otherwise,
before accepting the request to close the channel,
and sending an "ok" message in a positive reply,
it must:
<list style="symbols">
<t>finish sending any queued "MSG" messages on that channel of its own;</t>

<t>await complete replies to any outstanding "MSG" messages it has
sent on that channel; and,</t>

<t>finish sending complete replies to any outstanding "MSG"
messages it has received on that channel, and ensure that the final
frames of those replies have been successfully delivered, i.e.,
<list style="symbols">
<t>for transport mappings that guarantee inter-channel ordering of
messages,
the replies must be sent prior to sending the "ok" message in a
positive reply; otherwise,</t>

<t>the replies must be sent and subsequently acknowledged by the
underlying transport service prior to sending the "ok" message in a
positive reply.</t>
</list></t></list></t>



<figure>
<preamble>Briefly,
a successful channel close might look like this:</preamble>
<artwork>
    C: MSG 0 2 . 235 71
    C: Content-Type: application/beep+xml
    C:
    C: &lt;close number='1' code='200' />
    C: END
    S: RPY 0 2 . 392 46
    S: Content-Type: application/beep+xml
    S:
    S: &lt;ok />
    S: END
</artwork>
</figure>

<figure>
<preamble>Similarly,
an unsuccessful channel close might look like this:</preamble>
<artwork>
    C: MSG 0 2 . 235 71
    C: Content-Type: application/beep+xml
    C:
    C: &lt;close number='1' code='200' />
    C: END
    S: ERR 0 2 . 392 79
    S: Content-Type: application/beep+xml
    S:
    S: &lt;error code='550'>still working&lt;/error>
    S: END
</artwork>
</figure>
</section>



<section anchor="ok.message" title="The OK Message">
<t>When a BEEP peer agrees to close a channel
(or release the BEEP session),
it sends an "ok" element in a positive reply.</t>

<t>The "ok" element has no attributes and no content.</t>
</section>

<section anchor="error.message" title="The Error Message">
<figure>
<preamble>When a BEEP peer declines the creation of a channel,
it sends an "error" element in a negative reply,
e.g.,</preamble>
<artwork>
    I: MSG 0 1 . 52 115
    I: Content-Type: application/beep+xml
    I: 
    I: &lt;start number='2'>
    I:    &lt;profile uri='http://iana.org/beep/FOO' />
    I: &lt;/start>
    I: END
    L: ERR 0 1 . 221 105
    L: Content-Type: application/beep+xml
    L:
    L: &lt;error code='550'>all requested profiles are
    L: unsupported&lt;/error>
    L: END
</artwork>
</figure>

<t>The "error" element has a "code" attribute,
an optional "xml:lang" attribute,
and an optional textual diagnostic as its content:
<list style="symbols">
<t>the "code" attribute is a three-digit reply code meaningful to programs
(c.f., <xref target="reply-codes" />);</t>

<t>the "xml:lang" attribute identifies the language that the element's
content is written in
(the value is suggested,
but not mandated,
by the "localize" attribute of the "greeting" element sent by the
remote BEEP peer); and,</t>

<t>the textual diagnostic (which may be multiline) is
meaningful to implementers,
perhaps administrators,
and possibly even users,
but never programs.</t>
</list>
Note that if the textual diagnostic is present,
then the "xml:lang" attribute is absent only if the language
indicated as the remote BEEP peer's first choice is used.</t>



<t>In addition,
a BEEP peer sends an "error" element whenever:
<list style="symbols">
<t>it receives a "MSG" message containing a poorly-formed or
unexpected element;</t>

<t>it receives a "MSG" message asking to close a channel 
(or release the BEEP session)
and it declines to do so; or</t>

<t>a BEEP session is established,
the BEEP peer is acting in the listening role,
and that BEEP peer is unavailable
(in this case,
the BEEP acting in the listening role does not send a "greeting" element).</t>
</list>

In the final case,
both BEEP peers terminate the session,
and it is recommended that a diagnostic entry be logged by both BEEP
peers.</t>
</section>
</section>
</section>



<section anchor="session.estab" title="Session Establishment and Release">
<figure>
<preamble>When a BEEP session is established,
each BEEP peer signifies its availability by immediately sending a
positive reply with a message number of zero on channel zero that contains a
"greeting" element, e.g.,</preamble>
<artwork>
    L: &lt;wait for incoming connection>
    I: &lt;open connection>
    L: RPY 0 0 . 0 110
    L: Content-Type: application/beep+xml
    L:
    L: &lt;greeting>
    L:    &lt;profile uri='http://iana.org/beep/TLS' />
    L: &lt;/greeting>
    L: END
    I: RPY 0 0 . 0 52
    I: Content-Type: application/beep+xml
    I:
    I: &lt;greeting />
    I: END
</artwork>
</figure>

<figure>
<preamble>Alternatively,
if the BEEP peer acting in the listening role is unavailable,
it sends a negative reply,
e.g.,</preamble>
<artwork>
    L: &lt;wait for incoming connection>
    I: &lt;open connection>
    L: ERR 0 0 . 0 60
    L: Content-Type: application/beep+xml
    L:
    L: &lt;error code='421' />
    L: END
    I: RPY 0 0 . 0 52
    I: Content-Type: application/beep+xml
    I:
    I: &lt;greeting />
    I: END
    I: &lt;close connection>
    L: &lt;close connection>
    L: &lt;wait for next connection>
</artwork>
<postamble>and the "greeting" element sent by the BEEP peer acting in
the initiating role is ignored.
It is recommended that a diagnostic entry be logged by both BEEP
peers.</postamble>
</figure>

<t>Note that both of these examples imply that the BEEP peer in the
initiating role waits until the BEEP peer in the listening role sends its
greeting &mdash; this is an artifact of the presentation;
in fact,
both BEEP peers send their replies independently.</t>

<figure>
<preamble>When a BEEP peer wants to release the BEEP session,
it sends a "close" element with a zero-valued "number" attribute on
channel zero.
The other BEEP peer indicates its willingness by sending an "ok"
element in a positive reply,
e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 60
    C: Content-Type: application/beep+xml
    C:
    C: &lt;close code='200' />
    C: END
    S: RPY 0 1 . 264 46
    S: Content-Type: application/beep+xml
    S:
    S: &lt;ok />
    S: END
    I: &lt;close connection>
    L: &lt;close connection>
    L: &lt;wait for next connection>
</artwork>
</figure>

<figure>
<preamble>Alternatively,
if the other BEEP doesn't want to release the BEEP session,
the exchange might look like this:</preamble>
<artwork>
    C: MSG 0 1 . 52 60
    C: Content-Type: application/beep+xml
    C:
    C: &lt;close code='200' />
    C: END
    S: ERR 0 1 . 264 79
    S: Content-Type: application/beep+xml
    S:
    S: &lt;error code='550'>still working&lt;/error>
    S: END
</artwork>
<postamble>If session release is declined,
the BEEP session should not be terminated,
if possible.</postamble>
</figure>
</section>



<section anchor="transport.mapping" title="Transport Mappings">
<t>All transport interactions occur in the context of a session &mdash;
a mapping onto a particular transport service.
Accordingly,
this memo defines the requirements that must be satisfied by any
document describing how a particular transport service realizes a BEEP
session.</t>

<section title="Session Management">
<t>A BEEP session is connection-oriented.
A mapping document must define:
<list style="symbols">
<t>how a BEEP session is established;</t>

<t>how a BEEP peer is identified as acting in the listening role;</t>

<t>how a BEEP peer is identified as acting in the initiating role;</t>

<t>how a BEEP session is released; and,</t>

<t>how a BEEP session is terminated.</t>
</list></t>
</section>

<section title="Message Exchange">
<t>A BEEP session is message-oriented.
A mapping document must define:
<list style="symbols">
<t>how messages are reliably sent and received;</t>

<t>how messages on the same channel are received in the same order as
they were sent; and,</t>

<t>how messages on different channels are sent without ordering constraint.</t>
</list></t>
</section>
</section>



<section title="Asynchrony">
<t>BEEP accommodates asynchronous interactions,
both within a single channel and between separate channels.
This feature allows pipelining (intra-channel) and parallelism
(inter-channel).</t>

<section title="Within a Single Channel">
<t>A BEEP peer acting in the client role may send multiple "MSG" messages
on the same channel without waiting to receive the corresponding
replies.
This provides pipelining within a single channel.</t>

<t>A BEEP peer acting in the server role must process all "MSG"
messages for a given channel in the same order as they are received.
As a consequence,
the BEEP peer must generate replies
in the same order as the corresponding "MSG" messages are received on
a given channel.</t>

<t>Note that in one-to-many exchanges
(c.f., <xref target="exchange.styles" />),
the reply to the "MSG" message consists of zero or more "ANS"
messages followed by a "NUL" message.
In this style of exchange,
the "ANS" messages comprising the reply may be interleaved.
When the BEEP peer acting in the server role signifies the end of the
reply by generating the "NUL" message,
it may then process the next "MSG" message received for that channel.</t>
</section>

<section title="Between Different Channels">
<t>A BEEP peer acting in the client role may send multiple "MSG" messages
on different channels without waiting to receive the corresponding
replies.
The channels operate independently, in parallel.</t>

<t>A BEEP peer acting in the server role may process "MSG" messages
received on different channels in any order it chooses.
As a consequence,
although the replies for a given channel appear to be generated in the
same order in which the corresponding "MSG" messages are received,
there is no ordering constraint for replies on different channels.</t> 
</section>



<section title="Pre-emptive Replies">
<t>A BEEP peer acting in the server role may send a negative reply
before it receives the final "MSG" frame of a message.
If it does so,
that BEEP peer is obliged to ignore any subsequent "MSG" frames for
that message,
up to and including the final "MSG" frame.</t>

<t>If a BEEP peer acting in the client role receives a negative reply
before it sends the final "MSG" frame for a message,
then it is required to send a "MSG" frame with a continuation status
of complete (".") and having a zero-length payload.</t>
</section>

<section title="Interference">
<t>If the processing of a particular message has sequencing impacts on
other messages (either intra-channel or inter-channel),
then the corresponding profile should define this behavior, e.g.,
a profile whose messages alter the underlying transport mapping.</t>
</section>
</section>



<section title="Peer-to-Peer Behavior">
<t>BEEP is peer-to-peer &mdash; as such both peers must be
prepared to receive all messages defined in this memo.
Accordingly,
an initiating BEEP peer capable of acting only in the client role must
behave gracefully if it receives a "MSG" message.
Accordingly,
all profiles must provide an appropriate error message for replying
to unexpected "MSG" messages.</t>

<t>As a consequence of the peer-to-peer nature of BEEP,
message numbers are unidirectionally-significant.
That is,
the message numbers in "MSG" messages sent by a BEEP peer acting in the
initiating role are unrelated to the message numbers in "MSG" messages
sent by a BEEP peer acting in the listening role.</t> 

<figure>
<preamble>For example, these two messages</preamble>
<artwork>
    I: MSG 0 1 . 52 120
    I: Content-Type: application/beep+xml
    I: 
    I: &lt;start number='1'>
    I:    &lt;profile uri='http://iana.org/beep/SASL/OTP' /> 
    I: &lt;/start>
    I: END
    L: MSG 0 1 . 221 116
    L: Content-Type: application/beep+xml
    L: 
    L: &lt;start number='2'>
    L:    &lt;profile uri='http://iana.org/beep/APEX' />
    L: &lt;/start>
    L: END
</artwork>
<postamble>refer to different messages sent on channel zero.</postamble>
</figure>
</section>
</section>

<section title="Transport Security">
<t>When a BEEP session is established,
plaintext transfer,
without privacy,
is provided.
Accordingly,
transport security in BEEP is achieved using an initial tuning profile.</t>

<t>This document defines one profile:
<list style="symbols">
<t>the TLS transport security profile,
based on <xref target="RFC2246">TLS version one</xref>.</t>
</list>
Other profiles may be defined and deployed on a bilateral basis.
Note that because of their intimate relationship with the transport service,
a given transport security profile tends to be relevant to a single
transport mapping (c.f., <xref target="transport.mapping" />).</t>

<t>When a channel associated with transport security begins the
underlying negotiation process,
all channels (including channel zero) are closed on the BEEP session.
Accordingly,
upon completion of the negotiation process,
regardless of its outcome,
a new greeting is issued by both BEEP peers.
(If the negotiation process fails,
then either BEEP peer may instead terminate the session,
and it is recommended that a diagnostic entry be logged.)</t>

<figure>
<preamble>A BEEP peer may choose to issue different greetings
based on whether privacy is in use, e.g.,</preamble>
<artwork>
    L: &lt;wait for incoming connection>
    I: &lt;open connection>
    L: RPY 0 0 . 0 110
    L: Content-Type: application/beep+xml
    L:
    L: &lt;greeting>
    L:    &lt;profile uri='http://iana.org/beep/TLS' />
    L: &lt;/greeting>
    L: END
    I: RPY 0 0 . 0 52
    I: Content-Type: application/beep+xml
    I:
    I: &lt;greeting />
    I: END
    I: MSG 0 1 . 52 158
    I: Content-Type: application/beep+xml
    I: 
    I: &lt;start number='1'>
    I:    &lt;profile uri='http://iana.org/beep/TLS'>
    I:        &lt;![CDATA[&lt;ready />]]&gt;
    I:    &lt;/profile>
    I: &lt;/start>
    I: END
    L: RPY 0 1 . 110 121
    L: Content-Type: application/beep+xml
    L:
    L: &lt;profile uri='http://iana.org/beep/TLS'>
    L:     &lt;![CDATA[&lt;proceed />]]&gt;
    L: &lt;/profile>
    L: END

        ... successful transport security negotiation ...

    L: RPY 0 0 . 0 221
    L: Content-Type: application/beep+xml
    L:
    L: &lt;greeting>
    L:    &lt;profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
    L:    &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    L:    &lt;profile uri='http://iana.org/beep/APEX' />
    L: &lt;/greeting>
    L: END
    I: RPY 0 0 . 0 52
    I: Content-Type: application/beep+xml
    I:
    I: &lt;greeting />
    I: END
</artwork>
</figure>

<figure>
<preamble>Of course,
not all BEEP peers need be as single-minded:</preamble>
<artwork>
    L: &lt;wait for incoming connection>
    I: &lt;open connection>
    L: RPY 0 0 . 0 268
    L: Content-Type: application/beep+xml
    L:
    L: &lt;greeting>
    L:    &lt;profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
    L:    &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    L:    &lt;profile uri='http://iana.org/beep/APEX' />
    L:    &lt;profile uri='http://iana.org/beep/TLS' />
    L: &lt;/greeting>
    L: END
    I: RPY 0 0 . 0 52
    I: Content-Type: application/beep+xml
    I:
    I: &lt;greeting />
    I: END
    I: MSG 0 1 . 52 158
    I: Content-Type: application/beep+xml
    I: 
    I: &lt;start number='1'>
    I:    &lt;profile uri='http://iana.org/beep/TLS'>
    I:        &lt;![CDATA[&lt;ready />]]&gt;
    I:    &lt;/profile>
    I: &lt;/start>
    I: END
    L: RPY 0 1 . 268 121
    L: Content-Type: application/beep+xml
    L:
    L: &lt;profile uri='http://iana.org/beep/TLS'>
    L:     &lt;![CDATA[&lt;proceed />]]&gt;
    L: &lt;/profile>
    L: END

        ... failed transport security negotiation ...

    L: RPY 0 0 . 0 268
    L: Content-Type: application/beep+xml
    L:
    L: &lt;greeting>
    L:    &lt;profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
    L:    &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    L:    &lt;profile uri='http://iana.org/beep/APEX' />
    L:    &lt;profile uri='http://iana.org/beep/TLS' />
    L: &lt;/greeting>
    L: END
    I: RPY 0 0 . 0 52
    I: Content-Type: application/beep+xml
    I:
    I: &lt;greeting />
    I: END
</artwork>
</figure>



<section anchor="tls.profile" title="The TLS Transport Security Profile">
<t><xref target="tls.definition" /> contains the registration for this
profile.</t>

<section title="Profile Identification and Initialization">
<figure>
<preamble>The TLS transport security profile is identified as:</preamble>
<artwork>
    http://iana.org/beep/TLS
</artwork>
<postamble>in the BEEP "profile" element during channel creation.</postamble>
</figure>

<figure>
<preamble>During channel creation,
the corresponding "profile" element in the BEEP "start" element may
contain a "ready" element.
If channel creation is successful,
then before sending the corresponding reply,
the BEEP peer processes the "ready" element and includes the resulting
response in the reply,
e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 158
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/TLS'>
    C:        &lt;![CDATA[&lt;ready />]]&gt;
    C:    &lt;/profile>
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 110 121
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/TLS'>
    S:     &lt;![CDATA[&lt;proceed />]]&gt;
    S: &lt;/profile>
    S: END
</artwork>
</figure>

<figure>
<preamble>Note that it is possible for the channel to be created,
but for the encapsulated operation to fail, e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 173
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/TLS'>
    C:        &lt;![CDATA[&lt;ready version="oops" />]]&gt;
    C:    &lt;/profile>
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 110 193
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/TLS'>
    S:     &lt;![CDATA[&lt;error code='501'>version attribute
    S: poorly formed in &amp;lt;ready&amp;gt; element&lt;/error>]]&gt;
    S: &lt;/profile>
    S: END
</artwork>
<postamble>In this case,
a positive reply is sent (as channel creation succeeded),
but the encapsulated response contains an indication as to why the
operation failed.</postamble>
</figure>
</section>

<section title="Message Syntax">
<t><xref target="tls.dtd" /> defines the messages that are used in the
TLS transport security profile.</t>
</section>



<section anchor="tls.messages" title="Message Semantics">
<section title="The Ready Message">
<t>The "ready" element has an optional "version" attribute and no content:
<list style="symbols">
<t>the "version" element defines the earliest version of TLS
acceptable for use.</t>
</list></t>

<t>When a BEEP peer sends the "ready" element,
it must not send any further traffic on the underlying transport service
until a corresponding reply ("proceed" or "error") is received;
similarly,
the receiving BEEP peer must wait until any pending replies have been
generated and sent before it processes a "ready" element.</t>
</section>

<section title="The Proceed Message">
<t>The "proceed" element has no attributes and no content.
It is sent as a reply to the "ready" element.</t>

<t>When a BEEP peer receives the "ready" element,
it must not send any further traffic on the underlying transport
service until it generates a corresponding reply.
If the BEEP peer decides to allow transport security negotiation,
it implicitly closes all channels (including channel zero),
and sends the "proceed" element,
and awaits the underlying negotiation process for transport security.</t>

<t>When a BEEP peer receives a "proceed" element in reply to its
"ready" message,
it implicitly closes all channels (including channel zero),
and immediately begins the underlying negotiation process for
transport security.</t>
</section>
</section>
</section>
</section>

<section title="User Authentication">
<t>When a BEEP session is established,
anonymous access,
without trace information,
is provided.
Accordingly,
user authentication in BEEP is achieved using an initial tuning profile.</t>

<t>This document defines a family of profiles based on SASL mechanisms:
<list style="symbols">
<t>each mechanism in the
<eref target='http://www.isi.edu/in-notes/iana/assignments/sasl-mechanisms'>IANA SASL registry</eref>
has an associated profile.</t>
</list>
Other profiles may be defined and deployed on a bilateral basis.</t>

<t>Whenever a successful authentication occurs,
on any channel,
the authenticated identity is updated for all existing and future
channels on the BEEP session;
further,
no additional attempts at authentication are allowed.</t>

<t>Note that regardless of transport security and user authentication,
authorization is an internal matter for each BEEP peer.
As such,
each peer may choose to restrict the operations it allows based on the
authentication credentials provided
(i.e., unauthorized operations might be rejected with error code 530).</t>



<section anchor="sasl.profiles" title="The SASL Family of Profiles">
<t><xref target="sasl.definition" /> contains the registration for this
profile.</t>

<t>Note that SASL may provide both user authentication and transport security.
Once transport security is successfully negotiated for a BEEP session,
then a SASL security layer must not be negotiated;
similarly,
once any SASL negotiation is successful,
a transport security profile must not begin its underlying negotiation
process.</t>

<t>Section 4 of the SASL <xref target="RFC2222">specification</xref>
requires the following information be supplied by a protocol
definition:
<list style="hanging">
<t hangText="service name:">"beep"</t>

<t hangText="initiation sequence:">Creating a channel using a BEEP profile
corresponding to a SASL mechanism starts the exchange.
An optional parameter corresponding to the "initial response" sent by
the client is carried within a "blob" element during channel
creation.</t>

<t hangText="exchange sequence:">"Challenges" and "responses" are
carried in exchanges of the "blob" element.
The "status" attribute of the "blob" element is used both by a server
indicating a successful completion of the exchange, 
and a client aborting the exchange,
The server indicates failure of the exchange by sending an "error" element.</t>

<t hangText="security layer negotiation:">When a security layer starts
negotiation,
all channels (including channel zero) are closed on the BEEP session.
Accordingly,
upon completion of the negotiation process,
regardless of its outcome,
a new greeting is issued by both BEEP peers.
<vspace blankLines="1" />
If a security layer is successfully negotiated,
it takes effect immediately following the message that concludes the
server's successful completion reply.</t>

<t hangText="use of the authorization identity:">This is made
available to all channels for the duration of the BEEP session.</t>
</list></t>



<section title="Profile Identification and Initialization">
<figure>
<preamble>Each SASL mechanism registered with the IANA is identified as:</preamble>
<artwork>
    http://iana.org/beep/SASL/mechanism
</artwork>
<postamble>where "MECHANISM" is the token assigned to that mechanism
by the IANA.</postamble>
</figure>

<figure>
<preamble>Note that during channel creation,
a BEEP peer may provide multiple profiles to the remote peer, e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 178
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
    C:    &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 221 87
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/SASL/OTP' />
    S: END
</artwork>
</figure>

<figure>
<preamble>During channel creation,
the corresponding "profile" element in the BEEP "start" element may
contain a "blob" element.
Note that it is possible for the channel to be created,
but for the encapsulated operation to fail, e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 183
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/OTP'>
    C:        &lt;![CDATA[&lt;blob>AGJsb2NrbWFzdGVy&lt;/blob>]]&gt;
    C:    &lt;/profile>
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 221 178
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/SASL/OTP'>
    S:     &lt;![CDATA[&lt;error code='534'>authentication mechanism is
    S: too weak&lt;/error>]]&gt;
    S: &lt;/profile>
    S: END
</artwork>
<postamble>In this case,
a positive reply is sent (as channel creation succeeded),
but the encapsulated response contains an indication as to why the
operation failed.</postamble>
</figure>

<figure>
<preamble>Otherwise,
the server sends a challenge (or signifies success), e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 183
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/OTP'>
    C:        &lt;![CDATA[&lt;blob>AGJsb2NrbWFzdGVy&lt;/blob>]]&gt;
    C:    &lt;/profile>
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 221 171
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/SASL/OTP'>
    S:    &lt;![CDATA[&lt;blob>b3RwLXNoYTEgOTk5NyBwaXh5bWlzYXM4NTgwNSBleHQ=
                                                           &lt;/blob>]]&gt;
    S: &lt;/profile>
    S: END
</artwork>
<postamble>Note that this example implies that the "blob" element in
the server's reply appears on two lines &mdash; this is an artifact of
the presentation;
in fact,
only one line is used.</postamble>
</figure>

<figure>
<preamble>If a challenge is received,
then the client responds and awaits another reply,
e.g.,</preamble>
<artwork>
    C: MSG 1 0 . 0 97
    C: Content-Type: application/beep+xml
    C:
    C: &lt;blob>d29yZDpmZXJuIGhhbmcgYnJvdyBib25nIGhlcmQgdG9n&lt;/blob>
    C: END
    S: RPY 1 0 . 0 66
    S: Content-Type: application/beep+xml
    S:
    S: &lt;blob status='complete' />
    S: END
</artwork>
<postamble>Of course,
the client could abort the authentication process by sending
"&lt;blob status='abort' />" instead.</postamble>
</figure>

<figure>
<preamble>Alternatively,
the server might reject the response with an error:
e.g.,</preamble>
<artwork>
    C: MSG 1 0 . 0 97
    C: Content-Type: application/beep+xml
    C:
    C: &lt;blob>d29yZDpmZXJuIGhhbmcgYnJvdyBib25nIGhlcmQgdG9n&lt;/blob>
    C: END
    S: ERR 1 0 . 0 60
    S: Content-Type: application/beep+xml
    S:
    S: &lt;error code='535' />
    S: END
</artwork>
</figure>

<figure>
<preamble>Finally,
depending on the SASL mechanism,
an initialization element may be exchanged unidirectionally during
channel creation, e.g.,</preamble>
<artwork>
    C: MSG 0 1 . 52 125
    C: Content-Type: application/beep+xml
    C:
    C: &lt;start number='1'>
    C:    &lt;profile uri='http://iana.org/beep/SASL/CRAM-MD5' />
    C: &lt;/start>
    C: END
    S: RPY 0 1 . 221 185
    S: Content-Type: application/beep+xml
    S:
    S: &lt;profile uri='http://iana.org/beep/SASL/CRAM-MD5'>
    S: &lt;![CDATA[&lt;blob>PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1
                                                  jaS5uZXQ+&lt;/blob>]]&gt;
    S: &lt;/profile>
    S: END
</artwork>
<postamble>Note that this example implies that the "blob" element in
the server's reply appears on two lines &mdash; this is an artifact of
the presentation;
in fact,
only one line is used.</postamble>
</figure>
</section>

<section title="Message Syntax">
<t><xref target="sasl.dtd" /> defines the messages that are used for
each profile in the SASL family.</t>

<t>Note that because many SASL mechanisms exchange binary data,
the content of the "blob" element is always a base64-encoded string.</t>
</section>



<section anchor="sasl.messages" title="Message Semantics">
<t>The "blob" element has an optional "status" attribute,
and arbitrary octets as its content:
<list style="symbols">
<t>the "status" attribute, if present, takes one of three values:
<list style="hanging">
<t hangText="abort:">used by a client to indicate that it is aborting
the authentication process;</t>

<t hangText="complete:">used by a server to indicate that the exchange is
complete and successful; or,</t>

<t hangText="continue:">used by either a client or server, otherwise.</t>
</list></t>
</list></t>

<t>Finally,
note that SASL's EXTERNAL mechanism works with an "external
authentication" service,
which is provided by one of:
<list style="symbols">
<t>a transport security profile,
capable of providing authentication information
(e.g., <xref target="tls.profile" />),
being active on the connection;</t>

<t>a network service,
capable of providing strong authentication
(e.g., <xref target="RFC2401">IPSec</xref>),
underlying the connection;
or,</t>

<t>a locally-defined security service.</t>
</list>For authentication to succeed,
two conditions must hold:
<list style="symbols">
<t>an external authentication service must be active; and,</t>

<t>if present,
the authentication identity must be consistent with
the credentials provided by the external authentication service
(if the authentication identity is empty,
then an authorization identity is automatically derived from the
credentials provided by the external authentication service).</t>
</list></t>
</section>
</section>
</section>

<section title="Registration Templates">
<section anchor="profile.registration" title="Profile Registration Template">
<t>When a profile is registered,
the following information is supplied:
<list style="hanging">
<t hangText="Profile Identification:">specify a
<xref target="RFC2396">URI</xref> that authoritatively identifies this
profile.</t>

<t hangText="Message Exchanged during Channel Creation:">specify the
datatypes that may be exchanged during channel creation.</t>

<t hangText='Messages starting one-to-one exchanges:'>specify the
datatypes that may be present when an exchange starts.</t>

<t hangText='Messages in positive replies:'>specify the
datatypes that may be present in a positive reply.</t>

<t hangText='Messages in negative replies:'>specify the
datatypes that may be present in a negative reply.</t>

<t hangText='Messages in one-to-many exchanges:'>specify the
datatypes that may be present in a one-to-many exchange.</t>

<t hangText="Message Syntax:">specify the syntax of the datatypes
exchanged by the profile.</t>

<t hangText="Message Semantics:">specify the semantics of the
datatypes exchanged by the profile.</t>

<t hangText="Contact Information:">specify the postal and electronic
contact information for the author of the profile.</t>
</list></t>
</section>

<section anchor="feature.registration"
         title="Feature Registration Template">
<t>When a feature for the channel management profile is registered,
the following information is supplied:
<list style="hanging">
<t hangText="Feature Identification:">specify a string that
identifies this feature.
Unless the feature is registered with the IANA,
the feature's identification must start with "x-".</t>

<t hangText="Feature Semantics:">specify the semantics of the feature.</t>

<t hangText="Contact Information:">specify the postal and electronic
contact information for the author of the feature.</t>
</list></t>
</section>
</section>

<section anchor="initial.definitions" title="Initial Registrations">
<section anchor="channelZ.definition"
         title="Registration: BEEP Channel Management">
<t><list style="hanging">
<t hangText="Profile Identification:">not applicable</t>

<t hangText="Messages exchanged during Channel Creation:">not applicable</t>

<t hangText='Messages starting one-to-one exchanges:'>"start" or "close"</t>

<t hangText='Messages in positive replies:'>"greeting",
"profile", or "ok"</t>

<t hangText='Messages in negative replies:'>"error"</t>

<t hangText='Messages in one-to-many exchanges:'>none</t>

<t hangText="Message Syntax:">c.f., <xref target="beep.dtd" /></t>

<t hangText="Message Semantics:">c.f., <xref target="beep.messages" /></t>

<t hangText="Contact Information:">c.f., the "Author's Address"
section of this memo</t>
</list></t>
</section>

<section anchor="tls.definition"
         title="Registration: TLS Transport Security Profile">
<t><list style="hanging">
<t hangText="Profile Identification:">http://iana.org/beep/TLS</t>

<t hangText="Messages exchanged during Channel Creation:">"ready"</t>

<t hangText='Messages starting one-to-one exchanges:'>"ready"</t>

<t hangText='Messages in positive replies:'>"proceed"</t>

<t hangText='Messages in negative replies:'>"error"</t>

<t hangText='Messages in one-to-many exchanges:'>none</t>

<t hangText="Message Syntax:">c.f., <xref target="tls.dtd" /></t>

<t hangText="Message Semantics:">c.f., <xref target="tls.messages" /></t>

<t hangText="Contact Information:">c.f., the "Author's Address"
section of this memo</t>
</list></t>
</section>



<section anchor="sasl.definition"
         title="Registration: SASL Family of Profiles">
<t><list style="hanging">
<t hangText="Profile Identification:">http://iana.org/beep/SASL/mechanism,
where "mechanism" is a token registered with the IANA</t>

<t hangText="Messages exchanged during Channel Creation:">"blob"</t>

<t hangText='Messages starting one-to-one exchanges:'>"blob"</t>

<t hangText='Messages in positive replies:'>"blob"</t>

<t hangText='Messages in negative replies:'>"error"</t>

<t hangText='Messages in one-to-many exchanges:'>none</t>

<t hangText="Message Syntax:">c.f., <xref target="sasl.dtd" /></t>

<t hangText="Message Semantics:">c.f., <xref target="sasl.messages" /></t>

<t hangText="Contact Information:">c.f., the "Author's Address"
section of this memo</t>
</list></t>
</section>



<section anchor="beep.xml.definition"
         title="Registration: application/beep+xml">
<t><list style="hanging">
<t hangText="MIME media type name:">application</t>

<t hangText="MIME subtype name:">beep+xml</t>

<t hangText="Required parameters:">none</t>

<t hangText="Optional parameters:">charset
(defaults to <xref target="RFC2279">"UTF-8"</xref>)</t>

<t hangText="Encoding considerations:">This media type may contain
binary content;
accordingly,
when used over a transport that does not permit binary transfer,
an appropriate encoding must be applied</t>

<t hangText="Security considerations:">none, per se; however,
any BEEP profile which uses this media type must describe its relevant
security considerations</t>

<t hangText="Interoperability considerations:">n/a</t>

<t hangText="Published specification:">
This media type is a proper subset of the
<xref target="W3C.XML">the XML 1.0 specification</xref>.
Two restrictions are made.
<vspace blankLines='1' />
First,
no entity references other than the five predefined general entities
references
("&amp;amp;",
"&amp;lt;",
"&amp;gt;",
"&amp;apos;", and
"&amp;quot;")
and numeric entity references may be present.
<vspace blankLines='1' />
Second,
nor the "DOCTYPE" declaration (e.g., &lt;!DOCTYPE ...>) may
be present.
(Accordingly,
if another character set other than UTF-8 is desired,
then the "charset" parameter must be present.)
<vspace blankLines='1' />
All other XML 1.0 instructions
(e.g., CDATA blocks, processing instructions, and so on) are allowed.</t>

<t hangText="Applications which use this media type:">any BEEP profile
wishing to make use of this XML 1.0 subset</t>

<t hangText="Additional Information:">none</t>

<t hangText="Contact for further information:">c.f.,
the "Author's Address" section of this memo</t>

<t hangText="Intended usage:">limited use</t>

<t hangText="Author/Change controller:">the IESG</t>
</list></t>
</section>
</section>

<section title="DTDs">
<section anchor="beep.dtd" title="BEEP Channel Management DTD">
<figure>
<artwork>


&lt;!--
  DTD for BEEP Channel Management, as of 2000-10-29


  Refer to this DTD as:

    &lt;!ENTITY % BEEP PUBLIC "-//IETF//DTD BEEP//EN"
               "http://xml.resource.org/profiles/BEEP/beep.dtd">
    %BEEP;
  -->


&lt;!--
  DTD data types:

        entity        syntax/reference     example
        ======        ================     =======
    a channel number
        CHAN          1..2147483647        1

    authoritative profile identification
        URI          c.f., [RFC-2396]      http://invisible.net/

    one or more feature tokens, separated by space
        FTRS         NMTOKENS              "magic"

    a language tag
        LANG         c.f., [RFC-1766]      "en", "en-US", etc.

    zero or more language tags
        LOCS         NMTOKENS              "en-US"

    a 3-digit reply code
        XYZ           [1-5][0-9][0-9]      500
-->


&lt;!ENTITY % CHAN       "CDATA">
&lt;!ENTITY % URI        "CDATA">
&lt;!ENTITY % FTRS       "NMTOKENS">
&lt;!ENTITY % LANG       "NMTOKEN">
&lt;!ENTITY % LOCS       "NMTOKEN">
&lt;!ENTITY % XYZ        "CDATA">




&lt;!--
  BEEP messages, exchanged as application/beep+xml

     role       MSG         RPY         ERR
    =======     ===         ===         ===
    I and L                 greeting    error

    I or L      start       profile     error 

    I or L      close       ok          error
  -->


&lt;!ELEMENT greeting    (profile)*>
&lt;!ATTLIST greeting
          features    %FTRS;            #IMPLIED
          localize    %LOCS;            "i-default">

&lt;!ELEMENT start       (profile)+>
&lt;!ATTLIST start
          number      %CHAN;             #REQUIRED
          serverName  CDATA              #IMPLIED>

&lt;!-- profile element is empty if contained in a greeting -->
&lt;!ELEMENT profile     (#PCDATA)>
&lt;!ATTLIST profile
          uri         %URI;              #REQUIRED
          encoding    (none|base64)      "none">

&lt;!ELEMENT close       (#PCDATA)>
&lt;!ATTLIST close
          number      %CHAN;             "0"
          code        %XYZ;              #REQUIRED
          xml:lang    %LANG;             #IMPLIED>

&lt;!ELEMENT ok          EMPTY>

&lt;!ELEMENT error       (#PCDATA)>
&lt;!ATTLIST error
          code        %XYZ;              #REQUIRED
          xml:lang    %LANG;             #IMPLIED>

</artwork>
</figure>
</section>



<section anchor="tls.dtd" title="TLS Transport Security Profile DTD">
<figure>
<artwork>


&lt;!--
  DTD for the TLS Transport Security Profile, as of 2000-09-04


  Refer to this DTD as:

    &lt;!ENTITY % TLS PUBLIC "-//IETF//DTD TLS//EN"
               "http://xml.resource.org/profiles/TLS/tls.dtd">
    %TLS;
  -->


&lt;!--
  TLS messages, exchanged as application/beep+xml

     role       MSG         RPY         ERR
    ======      ===         ===         ===
    I or L      ready       proceed     error         
  -->


&lt;!ELEMENT ready       EMPTY>
&lt;!ATTLIST ready
          version     CDATA              "1">

&lt;!ELEMENT proceed     EMPTY>

</artwork>
</figure>
</section>



<section anchor="sasl.dtd" title="SASL Family of Profiles DTD">
<figure>
<artwork>


&lt;!--
  DTD for the SASL Family of Profiles, as of 2000-09-04


  Refer to this DTD as:

    &lt;!ENTITY % SASL PUBLIC "-//IETF//DTD SASL//EN" 
               "http://xml.resource.org/profiles/sasl/sasl.dtd">
    %SASL;
  -->


&lt;!--
  SASL messages, exchanged as application/beep+xml

     role       MSG         RPY         ERR
    ======      ===         ===         ===
    I or L      blob        blob        error
  -->


&lt;!ELEMENT blob        (#PCDATA)>
&lt;!ATTLIST blob
          xml:space   (default|preserve)
                                        "preserve"
          status      (abort|complete|continue)
                                         "continue">

</artwork>
</figure>
</section>
</section>

<section anchor="reply-codes" title="Reply Codes">
<figure>
<artwork>
code    meaning
====    =======
200     success

421     service not available

450     requested action not taken
        (e.g., lock already in use)

451     requested action aborted
        (e.g., local error in processing)

454     temporary authentication failure

500     general syntax error
        (e.g., poorly-formed XML)

501     syntax error in parameters
        (e.g., non-valid XML) 

504     parameter not implemented

530     authentication required

534     authentication mechanism insufficient
        (e.g., too weak, sequence exhausted, etc.)

535     authentication failure

537     action not authorized for user

538     authentication mechanism requires encryption

550     requested action not taken
        (e.g., no requested profiles are acceptable)

553     parameter invalid

554     transaction failed
        (e.g., policy violation)
</artwork>
</figure>
</section>

<section title="Security Considerations">
<t>The BEEP framing mechanism,
per se,
provides no protection against attack;
however,
judicious use of initial tuning profiles provides varying degrees of
assurance:
<list style="numbers">
<t>If one of the profiles from the SASL family is used,
refer to <xref target="RFC2222" />'s Section 9 for a discussion of
security considerations.</t>

<t>If the TLS transport security profile is used
(or if a SASL security layer is negotiated),
then:
<list>
<t>A man-in-the-middle may remove the security-related profiles
from the BEEP greeting or generate a negative reply to the
"ready" element of the TLS transport security profile.
A BEEP peer may be configurable to refuse to proceed without an
acceptable level of privacy.</t>

<t>A man-in-the-middle may cause a down-negotiation to the weakest
cipher suite available.
A BEEP peer should be configurable to refuse weak cipher suites.</t>

<t>A man-in-the-middle may modify any protocol exchanges prior to
a successful negotiation.
Upon completing the negotiation,
a BEEP peer must discard previously cached information about the BEEP
session.</t>
</list>
As different TLS ciphersuites provide varying levels of security,
administrators should carefully choose which ciphersuites are provisioned.</t>
</list></t>

<t>As BEEP is peer-to-peer in nature,
before performing any task associated with a message,
each channel should apply the appropriate access control based on the
authenticated identity and privacy level associated with the BEEP session.</t>
</section>

</middle>

<back>

<references>

<reference anchor='RFC2045'>

<front>
<title abbrev='Internet Message Bodies'>Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
<author initials='N.' surname='Freed' fullname='Ned Freed'>
<organization>Innosoft International, Inc.</organization>
<address>
<postal>
<street>1050 East Garvey Avenue South</street>
<city>West Covina</city>
<region>CA</region>
<code>91790</code>
<country>US</country></postal>
<phone>+1 818 919 3600</phone>
<facsimile>+1 818 919 3614</facsimile>
<email>ned@innosoft.com</email></address></author>
<author initials='N.' surname='Borenstein' fullname='Nathaniel S. Borenstein'>
<organization>First Virtual Holdings</organization>
<address>
<postal>
<street>25 Washington Avenue</street>
<city>Morristown</city>
<region>NJ</region>
<code>07960</code>
<country>US</country></postal>
<phone>+1 201 540 8967</phone>
<facsimile>+1 201 993 3032</facsimile>
<email>nsb@nsb.fv.com</email></address></author>
<date month='November' year='1996'/>
<abstract>
<t>STD 11, RFC 822, defines a message representation protocol specifying considerable detail about US-ASCII message headers, and leaves the message content, or message body, as flat US-ASCII text.  This set of documents, collectively called the Multipurpose Internet Mail Extensions, or MIME, redefines the format of messages to allow for</t>
<t>(1)   textual message bodies in character sets other than US-ASCII,</t>
<t>(2)   an extensible set of different formats for non-textual message bodies,</t>
<t>(3)   multi-part message bodies, and</t>
<t>(4)   textual header information in character sets other than US-ASCII.</t>
<t>These documents are based on earlier work documented in RFC 934, STD 11, and RFC 1049, but extends and revises them.  Because RFC 822 said so little about message bodies, these documents are largely orthogonal to (rather than a revision of) RFC 822.</t>
<t>This initial document specifies the various headers used to describe the structure of MIME messages. The second document, RFC 2046, defines the general structure of the MIME media typing system and defines an initial set of media types. The third document, RFC 2047, describes extensions to RFC 822 to allow non-US-ASCII text data in Internet mail header fields. The fourth document, RFC 2048, specifies various IANA registration procedures for MIME-related facilities. The fifth and final document, RFC 2049, describes MIME conformance
  criteria as well as providing some illustrative examples of MIME message formats, acknowledgements, and the bibliography.</t>
<t>These documents are revisions of RFCs 1521, 1522, and 1590, which themselves were revisions of RFCs 1341 and 1342.  An appendix in RFC 2049 describes differences and changes from previous versions.</t></abstract></front>

<seriesInfo name='RFC' value='2045' />
</reference>


<reference anchor="W3C.XML"
           target="http://www.w3.org/TR/1998/REC-xml-19980210">
<front>
<title>Extensible Markup Language (XML) 1.0</title>


<author>
<organization abbrev="W3C">World Wide Web Consortium</organization>

<address>
<postal>
<street>MIT Laboratory for Computer Science</street>
<street>545 Technology Square</street>
<city>Cambridge</city> <region>MA</region> <code>02139</code>
<country>US</country>
</postal>

<phone>+ 1 617 253 2613</phone>
<facsimile>+ 1 617 258 5999</facsimile>
<email>timbl@w3.org</email>
<uri>http://www.w3c.org</uri>
</address>
</author>


<date month="February" year="1998"/>
</front>

<seriesInfo name="W3C" value="XML" />
</reference>


<reference anchor='RFC2246'>

<front>
<title>The TLS Protocol Version 1.0</title>
<author initials='T.' surname='Dierks' fullname='Tim Dierks'>
<organization>Certicom</organization>
<address>
<email>tdierks@certicom.com</email></address></author>
<author initials='C.' surname='Allen' fullname='Christopher Allen'>
<organization>Certicom</organization>
<address>
<email>callen@certicom.com</email></address></author>
<author initials='W.' surname='Treese' fullname='Win Treese'>
<organization>Open Market</organization>
<address>
<email>treese@openmarket.com</email></address></author>
<author initials='P.L.' surname='Karlton' fullname='Philip L. Karlton'>
<organization>Netscape Communications</organization>
<address>
<email></email></address></author>
<author initials='A.O.' surname='Freier' fullname='Alan O. Freier'>
<organization>Netscape Communications</organization>
<address>
<email>freier@netscape.com</email></address></author>
<author initials='P.C.' surname='Kocher' fullname='Paul C. Kocher'>
<organization>Independent Consultant</organization>
<address>
<email>pck@netcom.com</email></address></author>
<date month='January' year='1999'/>
<abstract>
<t>This document specifies Version 1.0 of the Transport Layer Security (TLS) protocol. The TLS protocol provides communications privacy over the Internet. The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.</t></abstract></front>

<seriesInfo name='RFC' value='2246' />
</reference>


<reference anchor='RFC2222'>

<front>
<title abbrev='SASL'>Simple Authentication and Security Layer (SASL)</title>
<author initials='J.G.' surname='Myers' fullname='John G. Myers'>
<organization>Netscape Communications</organization>
<address>
<postal>
<street>501 E. Middlefield Road</street>
<street>Mail Stop MV-029</street>
<street>Mountain View</street>
<street>CA 94043-4042</street></postal>
<email>jgmyers@netscape.com</email></address></author>
<date month='October' year='1997'/>
<area>Security</area>
<keyword>authentication</keyword>
<keyword>security</keyword></front>

<seriesInfo name='RFC' value='2222' />
</reference>


<reference anchor="BEEP-TCPMAPPING">

<front>
<title>Mapping the BEEP Core onto TCP</title>


<author initials="M.T." surname="Rose" fullname="Marshall T. Rose">
<organization>Invisible Worlds, Inc.</organization>

<address>
<postal>
<street>131 Stony Circle</street>
<street>Suite 500</street>
<city>Santa Rosa</city> <region>CA</region> <code>95401</code>
<country>US</country>
</postal>

<phone>+1 707 578 2350</phone>
<email>mrose@invisible.net</email>
<uri>http://invisible.net/</uri>
</address>
</author>


<date month="March" year="2001"/>

<area>Applications</area>
<keyword>application protocols</keyword>
<keyword>BEEP</keyword>
<keyword>BXXP</keyword>
<keyword>transport mapping</keyword>

<abstract><t>This memo describes how a BEEP
(Blocks Extensible Exchange Protocol)
session is mapped onto a single TCP
(Transmission Control Protocol)
connection.</t></abstract>
</front>


<seriesInfo name="RFC" value="3081" />
</reference>


<reference anchor='RFC0793'>

<front>
<title abbrev='Transmission Control Protocol'>Transmission Control Protocol</title>
<author>
<organization>Defense Advanced Research Projects Agency (DARPA), Information Processing Techniques Office</organization>
<address>
<postal>
<street>1400 Wilson Boulevard</street>
<city>Arlington</city>
<region>VA</region>
<code>22209</code>
<country>US</country></postal></address></author>
<author>
<organization>University of Southern California (USC)/Information Sciences Institute</organization>
<address>
<postal>
<street>4676 Admiralty Way</street>
<city>Marina del Rey</city>
<region>CA</region>
<code>90291</code>
<country>US</country></postal></address></author>
<date month='September' year='1981'></date></front>

<seriesInfo name='STD' value='7' />
<seriesInfo name='RFC' value='793' />
</reference>


<reference anchor='RFC2234'>

<front>
<title abbrev='ABNF for Syntax Specifications'>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials='D.H.' surname='Crocker' fullname='David H. Crocker'>
<organization>Internet Mail Consortium</organization>
<address>
<postal>
<street>675 Spruce Dr.</street>
<city>Sunnyvale</city>
<region>CA</region>
<code>94086</code>
<country>US</country></postal>
<phone>+1 408 246 8253</phone>
<facsimile>+1 408 249 6205</facsimile>
<email>dcrocker@imc.org</email></address></author>
<author initials='P.' surname='Overell' fullname='Paul Overell'>
<organization>Demon Internet Ltd</organization>
<address>
<postal>
<street>Dorking Business Park</street>
<street>Dorking</street>
<city>Surrey</city>
<region>England</region>
<code>RH4 1HN</code>
<country>UK</country></postal>
<email>paulo@turnpike.com</email></address></author>
<date month='November' year='1997'></date></front>

<seriesInfo name='RFC' value='2234' />
</reference>


<reference anchor='RFC1982'>

<front>
<title>Serial Number Arithmetic</title>
<author initials='R.' surname='Elz' fullname='Robert Elz'>
<organization>University of Melbourne, Computer Science</organization>
<address>
<postal>
<street/>
<city>Parkville</city>
<region>Victoria</region>
<code>3052</code>
<country>AU</country></postal>
<email>kre@munnari.OZ.AU</email></address></author>
<author initials='R.' surname='Bush' fullname='Randy Bush'>
<organization>RGnet, Inc.</organization>
<address>
<postal>
<street>10361 NE Sasquatch Lane</street>
<city>Bainbridge Island</city>
<region>WA</region>
<code>98110</code>
<country>US</country></postal>
<email>randy@psg.com</email></address></author>
<date month='August' year='1996'/>
<abstract>
<t>This memo defines serial number arithmetic, as used in the Domain Name System.  The DNS has long relied upon serial number arithmetic, a concept which has never really been defined, certainly not in an IETF document, though which has been widely understood.  This memo supplies the missing definition.  It is intended to update RFC1034 and RFC1035.</t></abstract></front>

<seriesInfo name='RFC' value='1982' />
</reference>


<reference anchor='RFC3066'>

<front>
<title>Tags for the Identification of Languages</title>
<author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
<organization></organization></author>
<date month='January' year='2001'></date></front>

<seriesInfo name='BCP' value='47' />
<seriesInfo name='RFC' value='3066' />
</reference>


<reference anchor='RFC2396'>

<front>
<title abbrev='URI Generic Syntax'>Uniform Resource Identifiers (URI): Generic Syntax</title>
<author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
<organization>World Wide Web Consortium</organization>
<address>
<postal>
<street>MIT Laboratory for Computer Science, NE43-356</street>
<street>545 Technology Square</street>
<city>Cambridge</city>
<region>MA</region>
<code>02139</code></postal>
<facsimile>+1(617)258-8682</facsimile>
<email>timbl@w3.org</email></address></author>
<author initials='R.T.' surname='Fielding' fullname='Roy T. Fielding'>
<organization>Department of Information and Computer Science</organization>
<address>
<postal>
<street>University of California, Irvine</street>
<city>Irvine</city>
<region>CA</region>
<code>92697-3425</code></postal>
<facsimile>+1(949)824-1715</facsimile>
<email>fielding@ics.uci.edu</email></address></author>
<author initials='L.' surname='Masinter' fullname='Larry Masinter'>
<organization>Xerox PARC</organization>
<address>
<postal>
<street>3333 Coyote Hill Road</street>
<city>Palo Alto</city>
<region>CA</region>
<code>94034</code></postal>
<facsimile>+1(415)812-4333</facsimile>
<email>masinter@parc.xerox.com</email></address></author>
<date month='August' year='1998'/>
<area>Applications</area>
<keyword>uniform resource</keyword>
<keyword>URI</keyword>
<abstract>
<t>

   A Uniform Resource Identifier (URI) is a compact string of characters

   for identifying an abstract or physical resource.  This document

   defines the generic syntax of URI, including both absolute and

   relative forms, and guidelines for their use; it revises and replaces

   the generic definitions in RFC 1738 and RFC 1808.
</t>
<t>



   This document defines a grammar that is a superset of all valid URI,

   such that an implementation can parse the common components of a URI

   reference without knowing the scheme-specific requirements of every

   possible identifier type.  This document does not define a generative

   grammar for URI; that task will be performed by the individual

   specifications of each URI scheme.
</t></abstract>
<note title='IESG Note'>
<t>

   This paper describes a "superset" of operations that can be applied

   to URI.  It consists of both a grammar and a description of basic

   functionality for URI.  To understand what is a valid URI, both the

   grammar and the associated description have to be studied.  Some of

   the functionality described is not applicable to all URI schemes, and

   some operations are only possible when certain media types are

   retrieved using the URI, regardless of the scheme used.
</t></note></front>

<seriesInfo name='RFC' value='2396' />
</reference>


<reference anchor='RFC2444'>

<front>
<title abbrev='OTP SASL Mechanism'>The One-Time-Password SASL Mechanism</title>
<author initials='C.' surname='Newman' fullname='Chris Newman'>
<organization>Innosoft International, Inc.</organization>
<address>
<postal>
<street>1050 Lakes Drive</street>
<street>West Covina</street>
<street>CA 91790</street>
<country>USA</country></postal>
<email>chris.newman@innosoft.com</email></address></author>
<date month='October' year='1998'/>
<area>Security</area>
<keyword>OTP</keyword>
<keyword>authentication</keyword>
<keyword>one-time password</keyword>
<keyword>password</keyword>
<abstract>
<t>
   OTP  provides a useful authentication mechanism for situations
   where there is limited client or server trust.  Currently, OTP is
   added to protocols in an ad-hoc fashion with heuristic parsing.  This
   specification defines an OTP SASL  mechanism so it can be
   easily and formally integrated into many application protocols.
</t></abstract></front>

<seriesInfo name='RFC' value='2444' />
</reference>


<reference anchor='RFC2401'>

<front>
<title abbrev='Security Architecture'>Security Architecture for the Internet Protocol</title>
<author initials='S.' surname='Kent' fullname='Stephen Kent'>
<organization>BBN Corporation</organization>
<address>
<postal>
<street>70 Fawcett Street</street>
<street>Cambridge</street>
<street>MA  02140</street>
<country>USA</country></postal>
<phone>+1 (617) 873-3988</phone>
<email>kent@bbn.com</email></address></author>
<author initials='R.' surname='Atkinson' fullname='Randall Atkinson'>
<organization>@Home Network</organization>
<address>
<postal>
<street>425 Broadway</street>
<street>Redwood City</street>
<street>CA 94063</street>
<country>USA</country></postal>
<phone>+1 (415) 569-5000</phone>
<email>rja@corp.home.net</email></address></author>
<date month='November' year='1998'/>
<area>Security</area>
<keyword>IP security protocol</keyword>
<keyword>IPSEC</keyword>
<keyword>internet protocol version 6</keyword>
<keyword>security</keyword></front>

<seriesInfo name='RFC' value='2401' />
</reference>


<reference anchor='RFC2279'>

<front>
<title abbrev='UTF-8'>UTF-8, a transformation format of ISO 10646</title>
<author initials='F.' surname='Yergeau' fullname='Francois Yergeau'>
<organization>Alis Technologies</organization>
<address>
<postal>
<street>100, boul. Alexis-Nihon</street>
<street>Suite 600</street>
<city>Montreal</city>
<region>Quebec</region>
<code>H4M 2P2</code>
<country>CA</country></postal>
<phone>+1 514 747 2547</phone>
<facsimile>+1 514 747 2561</facsimile>
<email>fyergeau@alis.com</email></address></author>
<date month='January' year='1998'/>
<abstract>
<t>ISO/IEC 10646-1 defines a multi-octet character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems. Multi-octet characters, however, are not compatible with many current applications and protocols, and this has led to the development of a few so-called UCS transformation formats (UTF), each with different characteristics.  UTF-8, the object of this memo, has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values. This memo updates and replaces RFC 2044, in particular addressing the question of versions of the relevant standards.</t></abstract></front>

<seriesInfo name='RFC' value='2279' />
</reference>


<reference anchor='RFC2078'>

<front>
<title abbrev='GSS-API'>Generic Security Service Application Program Interface, Version 2</title>
<author initials='J.' surname='Linn' fullname='John Linn'>
<organization>OpenVision Technologies</organization>
<address>
<postal>
<street>One Main St.</street>
<city>Cambridge</city>
<region>MA</region>
<code>02142</code>
<country>US</country></postal>
<phone>+1 617 374 2245</phone>
<email>John.Linn@ov.com</email></address></author>
<date month='January' year='1997'/>
<abstract>
<t>The Generic Security Service Application Program Interface (GSS-API), as defined in RFC-1508, provides security services to callers in a generic fashion, supportable with a range of underlying mechanisms and technologies and hence allowing source-level portability of applications to different environments. This specification defines GSS-API services and primitives at a level independent of underlying mechanism and programming language environment, and is to be complemented by other, related specifications:</t>
<t>documents defining specific parameter bindings for particular language environments</t>
<t>documents defining token formats, protocols, and procedures to be implemented in order to realize GSS-API services atop particular security mechanisms</t>
<t>This memo revises RFC-1508, making specific, incremental changes in response to implementation experience and liaison requests. It is intended, therefore, that this memo or a successor version thereto will become the basis for subsequent progression of the GSS-API specification on the standards track.</t></abstract></front>

<seriesInfo name='RFC' value='2078' />
</reference>

</references>

<section title="Acknowledgements">
<t>The author gratefully acknowledges the contributions of:
David Clark,
Dave Crocker,
Steve Deering,
Wesley Michael Eddy,
Huston Franklin,
Marco Gazzetta,
Danny Goodman,
Steve Harris,
Robert Herriot,
Ken Hirsch,
Greg Hudson,
Ben Laurie,
Carl Malamud,
Michael Mealling,
Keith McCloghrie,
Paul Mockapetris,
RL 'Bob' Morgan,
Frank Morton,
Darren New,
Chris Newman,
Joe Touch,
Paul Vixie,
Gabe Wachob,
Daniel Woods,
and,
James Woodyatt.
In particular,
Dave Crocker provided helpful suggestions on the nature of 
segmentation in the framing mechanism.</t>
</section>

<section title="IANA Considerations">
<t>The IANA registers "beep" as a <xref target="RFC2078">GSSAPI</xref>
service name,
as specified in <xref target="sasl.profiles" />.</t>

<t>The IANA maintains a list of:
<list style="symbols">
<t>standards-track BEEP profiles,
c.f., <xref target="profile.registration" />; and,</t>

<t>standards-track features for the channel management profile,
c.f., <xref target="feature.registration" />.</t>
</list>
For each list,
the IESG is responsible for assigning a designated expert to review
the specification prior to the IANA making the assignment.
As a courtesy to developers of non-standards track BEEP profiles and
channel management features,
the mailing list bxxpwg@invisible.net may be used to solicit commentary.</t>

<t>The IANA makes the registrations specified in
<xref target="tls.definition" /> and <xref target="sasl.definition" />.
It is recommended that the IANA register these profiles using the IANA
as a URI-prefix,
and populate those URIs with the respective profile registrations.</t>
</section>

</back>
</rfc>
