[Standards-JIG] discoing a bare JID

Peter Saint-Andre stpeter at jabber.org
Wed Jan 19 17:40:36 UTC 2005


What happens when I disco a bare JID (e.g., juliet at example.com)?

We know that the server should reply on behalf of a bare JID. JEP-0030 
says that every disco#info response must contain at least one identity. 
But we don't have an identity for a bare JID, only the client category, 
so it's currently unclear how a server should respond on behalf of a 
bare JID. Also, the question arises: how should a server respond to 
disco#items queries? Should it return one <item/> for each resource that 
has made itself available with a non-negative presence priority (of 
course subject to privacy checks)?

I suggest the following:

(1) We create a new disco identity for bare JIDs. What shall we call it? 
In essence when you disco a bare JID, the response comes from a server 
on behalf of a registered account. It's not really a user, since that 
tends to imply a human, and a registered account could represent a bot 
or some application interface. We already have an existing "server" 
category, so "server/account" might make sense (though that might lead 
people to think this entity is an "account server" as opposed to an "IM 
server"). Another option would be a new disco category of "account", 
with several potential types (I can think of "registered" and 
"anonymous", but there may be others). I lean towards a new category and 
an identity of "account/registered" for most bare JIDs.

(2) If I am subscribed to your presence, in response to a disco#items 
query I should receive a list of your available resources (actually, 
only those with non-negative presence priority). If I am not subscribed 
to your presence, I should receive no items for your available resources.

So:

<iq type='get' 
    from='stpeter at jabber.org/roundabout' 
    to='juliet at example.com'
    id='info1'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

<iq type='result' 
    from='juliet at example.com' 
    to='stpeter at jabber.org/roundabout'
    id='info1'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity category='account' type='registered'/>
    <feature var='vcard-temp'/>
    ...
  </query>
</iq>

<iq type='get' 
    from='stpeter at jabber.org/roundabout' 
    to='juliet at example.com'
    id='items1'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

<iq type='result' 
    from='juliet at example.com' 
    to='stpeter at jabber.org/roundabout'
    id='items1'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item jid='juliet at example.com/balcony'/>
    <item jid='juliet at example.com/chamber'/>
  </query>
</iq>

Thoughts?

BTW, the impetus for this discussion is a feature request that Ralph 
Meijer submitted for the Gossip project:

http://bugzilla.gnome.org/show_bug.cgi?id=163012

Ralph and I discussed it a bit, and realized that we don't have a good 
way to disco bare JIDs (which might help an application determine what 
kind of interface to show when invoked via an XMPP URI that shows only 
the bare JID).

/psa




More information about the Standards mailing list