From 8fc5fedf05a4c915e7e3ece86c4d99ab723fa1c6 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Wed, 10 Jan 2007 03:39:25 +0000 Subject: [PATCH] 0.3 git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@317 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0193.xml | 189 +++++++++++++++++++++++++-------------------------- 1 file changed, 93 insertions(+), 96 deletions(-) diff --git a/xep-0193.xml b/xep-0193.xml index 3ac4c4b8..d3750b2b 100644 --- a/xep-0193.xml +++ b/xep-0193.xml @@ -20,6 +20,12 @@ None N/A &stpeter; + + 0.3 + 2007-01-09 + psa +

Per Council feedback, modified error handling when client does not include a from address; also, clarified rules regarding which full JID to include on bind and unbind requests.

+
0.2 2007-01-02 @@ -52,32 +58,27 @@

In order to properly manage the resources associated with an XML stream, a client must be able to unbind resources. This shall be completed by sending an IQ-set with a child element of <unbind/> qualified by the 'urn:ietf:params:xml:ns:xmpp-bind' namespace, which in turn has a child element of <resource/> whose XML character data specifies the resource to be unbound:

- + someresource - ]]> -

If the server does not understand the <unbind/> element, it MUST return an error of &badrequest;. Otherwise, if there is no such resource, the server MUST return an error of ¬found;. When the client unbinds the only resource associated with the stream, the server SHOULD close the stream and terminate the TCP connection.

+ ]]>
+

If the server does not understand the <unbind/> element, it MUST return an error of &badrequest;. Otherwise, if there is no such resource, the server MUST return an error of ¬found;. When the client unbinds the only resource associated with the stream, the server SHOULD close the stream and terminate the TCP connection. The 'from' address included in bind and unbind stanzas SHOULD be the full JID (&FULLJID;) associated with the resource in question; however, the server MUST NOT accept further stanzas from that full JID after successfully processing the unbind request.

A server SHOULD advertise its support for the 'urn:ietf:params:xml:ns:xmpp-bind' namespace and the unbind functionality by returning an appropriate stream feature as shown below:

- - ]]> + ]]>
-

When a client binds multiple resources to the same stream, proper management of 'from' addresses is imperative. In particular, a client MUST specify a 'from' address on every stanza it sends over a stream to which it has bound multiple resources. If a client does not specify a 'from' address on a stanza it sends over a stream to which it has bound multiple resources (or if it specifies as the 'from' address a full JID other than one of the bound resources), the server MUST do one of the following:

-
    -
  1. Stamp the stanza with the resource that the server considers to be the "default resource" for the stream. The default resource SHOULD be the oldest resource bound to the stream, which typically will be the initial resource but which might be a resource bound later if subsequently the initial resource has been unbound.
  2. -
  3. Return the stanza to the client with an <unknown-sender/> stanza error. Currently there is no <unknown-sender/> stanza defined in RFC 3920; the author will work to add such an error condition to rfc3920bis.
  4. -
-

Which of these a server does is up to the implementation or deployment.

+

When a client binds multiple resources to the same stream, proper management of 'from' addresses is imperative. In particular, a client MUST specify a 'from' address on every stanza it sends over a stream to which it has bound multiple resources, where the 'from' address is the full JID (&FULLJID;) associated with the relevant resource. If a client does not specify a 'from' address on a stanza it sends over a stream to which it has bound multiple resources (or if it specifies as the 'from' address a full JID other than one of the bound resources), the server MUST return the stanza to the client with an <unknown-sender/> stanza error. Currently there is no <unknown-sender/> stanza defined in RFC 3920. The author will work to add such an error condition (with a type of "modify") to rfc3920bis.

Naturally, the existing rules from RFC 3920 regarding validation of asserted 'from' addresses still apply.

@@ -89,127 +90,123 @@
-

The following examples show a possible flow of resource binding and unbinding.

+

The following examples show a possible flow of resource binding and unbinding (stanzas prefixed by "C:" are sent by the client, stanzas prefixed by "S:" are sent by the server).

First, the client binds an initial resource to the stream.

- - core - - +C: + + core + + - - - juliet@capulet.com/core - - +S: + + juliet@capulet.com/core + + ]]>

Now the client sends some stanzas, making sure to set its 'from' address:

- - +C: + + - - - - - +C: + + + + - +C: ]]>

Now the client binds a second resource to the stream.

- - balcony - - +C: + + balcony + + - - - juliet@capulet.com/balcony - - +S: + + juliet@capulet.com/balcony + + ]]>

If the server does not allow entities to bind multiple resources to the stream, it MUST return a ¬allowed; error as described in RFC 3920.

Now the client sends more stanzas.

- - +C: + + - - - - - +C: + + + + - +C: - - Wherefore art thou? - +C: + Wherefore art thou? + + +S: + Wherefore art thou? + + + + ]]> -

In handling the last stanza shown above, the server will either return a <unknown-sender/> error or stamped the 'from' address <juliet@capulet.com/core> (but in no case will the server stamp the 'from' address as <juliet@capulet.com/balcony>. Here we assume that the server stamps the 'from' address.

+

In handling the last stanza shown above, the server returns an <unknown-sender/> error to the sender because the sender did not include a 'from' address.

Now the client binds a third resource to the stream.

- - softphone - - +C: + + softphone + + - - - juliet@capulet.com/softphone - - +S: + + juliet@capulet.com/softphone + + ]]>

Now the client unbinds its initial resource.

- - core - - +C: + + core + + - - ]]> -

Now the client sends another stanza without a 'from' address, which we assume the server stamps as from the new default resource (note that this is no longer the initial resource):

- - Art thou not Romeo, and a Montague? - - ]]> - - Art thou not Romeo, and a Montague? - +S: ]]>

Now the client unbinds another resource.

- - softphone - - +C: + + softphone + + - +S: ]]>

Now the client unbinds its last remaining resource.

- - balcony - - +C: + + balcony + + - +S: ]]>

The server now SHOULD close the stream and terminate the underlying TCP connection.

+S: ]]>
@@ -219,7 +216,7 @@

No interaction with &IANA; is required as a result of this document.

-

No interaction with the ®ISTRAR; is required as a result of this document.

+

No interaction with the ®ISTRAR; is required as a result of this document, since the 'urn:ietf:params:xml:ns:xmpp-bind' namespace is already registered (see &NAMESPACES;).

Note: The following provisional schema is intended to replace the existing schema for the Resource Binding stream feature.