[Standards-JIG] Re: Proposal for a solution to transport rosters

Magnus Henoch mange at freemail.hu
Sun Sep 5 11:09:02 UTC 2004


Justin Karneges <justin-keyword-jabber.093179 at affinix.com> writes:

> While this would certainly work, I think a server-side extension would be 
> better.  What we'd need is a way to allow a remote domain to modify the 
> user's roster directly, but only with the user's permission.  The transports 
> could then sync, import, etc, with nicknames, use proper groups...  anything.
>
> There are probably many ways to do what I'm asking for, and I'm not sure what 
> the best way would be.

Neither am I, but I really want the server side thing to work.  Thus
I'm throwing out an attempt at a server-side protocol.

There are two cases: the server trusts the transport (e.g. running on
the same computer), or it doesn't.  As I see it, the second case needs
modified clients to approve the transport to change the roster, but
the first case will probably cover most uses.

1. User registers with transport with JEP-0077.
2. Transport asks to subscribe to user's presence, with an extra
element:

<presence from="msn.capulet.com" to="juliet at capulet.com"
  type="subscribe">
  <import xmlns="http://jabber.org/protocol/import"/>
</presence>

3. User's server takes note of the import element, and forwards
subscription request to user's client.

4a. User's client doesn't support this protocol.  User approves
subscription and

<presence from="juliet at capulet.com/balcony" to="msn.capulet.com"
  type="subscribed"/>

is sent as usual.

4b. User's client supports this protocol.  User's client includes
either <import/> or <no-import/> element in response.

<presence from="juliet at capulet.com/balcony" to="msn.capulet.com"
  type="subscribed">
  <no-import xmlns="http://jabber.org/protocol/import"/>
</presence>

5a. Server trusts transport.  Unless <no-import/> is included in the
response, server grants roster modification privileges to the
transport and adds <import/> tag to the response before sending it
further to the transport if it's not already there.

5b. Server doesn't trust transport.  Server grants privileges if and
only if the client added an <import/> element in the response.

6. Transport receives response.  If it contains an <import/> element,
the transport will try to modify the user's roster.

7. Transport auto-imports contacts and modifies user's roster with
   jabber:iq:roster:

<iq from="msn.capulet.com" to="juliet at capulet.com" id="foo">
  <query xmlns='jabber:iq:roster'>
    <item jid="romeo%hotmail.com at msn.capulet.com" name="Romeo"
      subscription="both">
      <group>Friends</group>
    </item>
  </query>
</iq>

8. Server modifies roster and does a roster push, paying attention to
   changing the 'from' attribute of the stanza.  (client might apply
   safety rules from section 7.2 of XMPP-IM)

What do you think about this?

Magnus




More information about the Standards mailing list