white J. Miller
The Jabber.org Project
Dec 2000
White Protocols
Abstract
This is a collection of new protocol extensions (and updates) for
Jabber. These have been discussed and agreed to (at least in
concept) by much of the Jabber Team.
Table of Contents
1. Background . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1 Intro . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 JID-Types . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.3 jabber:iq:browse . . . . . . . . . . . . . . . . . . . . . . 3
2.4 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5 Replacing jabber:iq:agents . . . . . . . . . . . . . . . . . 4
2.6 Items . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.7 Live Browsing . . . . . . . . . . . . . . . . . . . . . . . 5
2.8 Bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.9 Editing . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.10 Impl Notes . . . . . . . . . . . . . . . . . . . . . . . . . 6
3. Conferencing . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1 jabber:iq:conference . . . . . . . . . . . . . . . . . . . . 6
3.2 participants . . . . . . . . . . . . . . . . . . . . . . . . 7
4. jabber:iq:last . . . . . . . . . . . . . . . . . . . . . . . 8
4.1 Server Uptime . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 User Last-Logout . . . . . . . . . . . . . . . . . . . . . . 8
5. PKI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1 signed presence . . . . . . . . . . . . . . . . . . . . . . 8
5.2 signed/encrypted messages . . . . . . . . . . . . . . . . . 9
6. Generic XML Namespace Storage . . . . . . . . . . . . . . . 9
7. Message Events . . . . . . . . . . . . . . . . . . . . . . . 10
8. jabber:iq:gateway . . . . . . . . . . . . . . . . . . . . . 10
9. XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
10. Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
10.1 URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
10.2 Headlines . . . . . . . . . . . . . . . . . . . . . . . . . 12
10.3 Envelope . . . . . . . . . . . . . . . . . . . . . . . . . . 13
10.4 Zero-Knowledge Auth . . . . . . . . . . . . . . . . . . . . 13
10.5 Dialback . . . . . . . . . . . . . . . . . . . . . . . . . . 13
10.6 vCard Extensions . . . . . . . . . . . . . . . . . . . . . . 13
10.7 ACLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Miller [Page 1]
WHITE White Protocols Dec 2000
1. Background
These materials are in first-draft format, don't take it as the
final protocol, although the final shouldn't vary significantly from
what you see here.
If you notice anything that strikes you as odd and isn't explained,
please tell someone.
2. Browsing
2.1 Intro
The basic idea is this: the jabber world is a diverse place, with
lots of services, transports, software agents, users, groupchat
rooms, translators, headline tickers and just about anything that
might interact on a real-time basis with conversational messages or
presence. Every jid is a node that can be interacted with for
messages, presence, and special purpose iq namespaces. Some jids are
parents (transports), and often many jids have relationships with
other jids (a user to their resources, server to it's services,
etc). We need a far better way to structure and manage this culture
of jid stew. The answer: BROWSING
2.2 JID-Types
People are comfortable identifying file types with "mime-types", in
the format category/subtype. The first concept in browsing is a
"jid-type", or simple similiar heirarchy for identifying the role of
any Jabber ID. A jid-type, after discovered, is to be used in the
same way that a mime-type would be for a file, to alter the UI
representing that jid or provide alternative functionality for
interacting with it (either automatically or UI-driven). The
following is a first-pass at a list of the possible categories and
subtypes. Additional type extensions can always be specified as
category/x-subtype.
service/ To identify which "world" they map into, often another IM network or messaging gateway
service/jabber Jabber Server
service/icq ICQ Transport
service/aim AIM Transport
service/msn MSN Transport
service/yahoo Yahoo! Transport
service/irc IRC Gateway (user)
service/smtp SMTP Gateway
service/pager Pager Gateway
service/jud Jabber User Directory
conference/ To identify the type of conference server or characteristics of a specific conference.
conference/private Private dynamically-generated conference rooms
Miller [Page 2]
WHITE White Protocols Dec 2000
conference/irc IRC Rooms
conference/topic Topic-based conferences
conference/url URL/Web-based conferences
conference/list Mailing list style conference
user/ Users
user/client Client Connection
user/forward Forwarding alias
user/device Portable or other device
user/inbox Alternate inbox
user/voice Phone or voice access
application/ Specific applications running on a user@host/resource id
application/calendar Calendaring/Scheduling Service
application/whiteboard Whiteboard Tool
application/editor Collaborative Editor
application/game Multiplayer Game
application/fileserver Files Available
application/bot Automated Conversations
headline/ Recognize different sources of headlines, gui hints
headline/rss Rich Site Summary (cumulative/replaceable)
headline/stock Stock symbol (ticker)
headline/logger Log Messages (scrolling)
headline/notice Alerts/Warnings (popups)
render/ Automated translation services (YTBD)
render/en2fr English to French
render/*2* Other standard *lang to *lang
render/jive Jive Style
render/tts Text To Speech
render/grammer Grammer Checker
render/spell Spell Tool
keyword/ Keyword Lookup Services
keyword/dictionary Dictionary Lookups
keyword/thesaurus Thesaurus Lookups
keyword/faq FAQ Bot
keyword/web Web search
keyword/software Software search
keyword/dns DNS resolver
keyword/whois Whois Query
2.3 jabber:iq:browse
There is a new namespace containing the browsing data:
jabber:iq:browse. The elements within this namespace are identified
by the categories listed above, with a few generic attributes. For
example:
The required jid attribute is the full Jabber ID of the entity
Miller [Page 3]
WHITE White Protocols Dec 2000
described. Type is the subtype for the category as defined above,
and is required. Name is a friendly name that may be used in a GUI,
and is optional. (uri="" for web links?) Any element may contain any
other element as a child, describing the relationship between the
two. This relationship my be represented as a "link" in a wizard or
page-based GUI, or as a branch in a tree as it's expanded. When a
jid is browsed to, the result may contain children or be empty. An
empty result means there is no further relationships or links for
that jid, a dead-end, which may be represented as a page that
contains a list of functions available for it (vcard, message,
register, etc). When the result contains children, they may also be
empty (as in the example above). An empty child does not mean
anything, and to determine if there are more children of it it must
be browsed to directly.
2.4 Namespaces
Ontop of the browsing framework, a simple form of "feature
advertisement" can be built. This allows any entity to advertise
which features they support, based on namespaces. An additional
allowed element within a browse result is . This element
contains a single namespace that the entity supports, and multiple
ns elements can be included in any result. For a connected client
this might be jabber:iq:oob, or for a service
jabber:iq:search. This list of namespaces should be used to
present available options for a user, or for an application to
automatically locate functionality.
The children of a browse result may pro-actively contain a few ns
elements (such as the result of the service request to the home
server), which advertises the features that particular service
supports. This list may not be complete, and the jid should be
browsed to for a complete list, it is only for first-pass filtering
by simpler clients.
Clients should answer incoming browsing requests to advertise which
namespaces they support, such as file transfers (jabber:iq:oob),
crypto/signatures, xhtml, etc.
2.5 Replacing jabber:iq:agents
The first important use of jabber:iq:browse is to replace the
iq:agents namespace. When a client connects, it may optionally
browse to the server it connected to to retrieve a list of available
services. The resulting iq might look like:
jabber:iq:register jabber:iq:search
jabber:iq:gateway
To determine any further details from this list, each
individual child would have to be browsed to. The elements within
the icq service are only hints for a client when building GUI menu
items or in wizzards, icq.jabber.org would still need to be browsed
to to determine any relationships or additional namespaces. This
top-level list is the master "services" list available from the
server, and should be used for any default functionality when
available. This list may also serve as the "home page" for a
page-based browsing GUI.
2.6 Items
It is also useful to arrange entities hierarchially, which implies
nodes or parents that don't really exist except to be browsed to and
contain a list of children or relationships. These generic nodes are
simply items, and represented by a . It has no sub-type, and is a special purpose
entity that is only for arranging browsing in a heirarchy. They can
be used whenever the type of jid isn't pre-set (and needs to be
browsed to directly), or serve as a placeholder for a node in a
heirarchy of other jids. This is most useful for representing
unknown jids, arranging a company directory, list of chat rooms, or
browsing any heirarchially-arranged jabber entities.
2.7 Live Browsing
This is Jabber, it's a real-time platform, and browsing is a
relatively static activity. So to take full advantage of browsing
within Jabber, browse data can be live and pushed similiar to
presence. This is useful for any browseable data that might change
regularly (participants in a conference, bluetooth devices, or
custom application uses) which can be tracked in real time and have
updates pushed out to all those interested in receiving them. To
enable this, send presence to the jid before doing an iq get for the
browse data. Subsequent iq:browse sets from that jid will contain
additional children or updates to existing children (type="remove"
removes a child like in editing below).
2.8 Bookmarks
Any jid may be stored in the roster. The roster's role for storing
jid's a user is interested in, can expand into a bookmark role not
only storing them for presence information but also for browsing.
This would expand the namespace of the roster to include the
standard jid-types. Additionally to an "item" element, any of the
above categories could be stored as an element in the roster with an
optional type attribute. The name and all other roster/presence
Miller [Page 5]
WHITE White Protocols Dec 2000
related attributes apply equally as if it were an item, but
intelligent clients can use the jid-type to make additional
user-stored bookmarks available. The client could store favorite
chat rooms, always-enabled renders, headlines, or special remote
transports that you want made available in addition to the default
server ones. In a GUI, clients could optionally merge this list from
the roster with the list from the server, or make it available as
part of the roster directly.
2.9 Editing
When an iq set is used, and when there are sufficient priveleges
(such as a user to thier jid), the included browse namespace data
should be stored (or replace) for that jid. When setting, a single
child will not replace the entire contents of the parent, but simply
be inserted. To remove any child, set it's jid with a type="remove".
2.10 Impl Notes
A client shouldn't just blindly follow browse-to-jids and keep
requesting, but instead it should maintain an internal list of all
the returned browse results for a jid for efficiency. Any display or
use of the browse data should then be returned from the internal
list. This is a similiar model to presence. All jids should always
have the following options: message/chat, browse Hostname jids
should also always have the options: time, vcard, last, version
Users should also have: vcard, last User resources should have:
time, version, oob
3. Conferencing
The new conferencing protocol replaces the old "groupchat" protocol.
It is a framework in which messages are broadcast to multiple
recipients via a third party, and that third party manages the list
of recipients, traffic, and identities of all the participants.
There may be numerous different types of conferencing services,
private ones created on the fly by any user with their friends, IRC
rooms, shared-location (URL), topic, or content based, and so on.
The design of the new protocol makes use of the new browsing
functionality.
3.1 jabber:iq:conference
The conference namespace is a simple mechanism for obtaining the
characteristics of a conference and negotiating participation.
The iq get will allow anyone to view a list of required fields and
the current topic.
Miller [Page 6]
WHITE White Protocols Dec 2000
Getting List:
The Room's Topic!
"nick" indicates that the user should select a nickname. "secret"
indicates that a password is required to participate. "presence"
indicates that available presence must be sent prior to
participation. The topic is a general description, or the most
recent set topic of the conference.
The iq set is used to enter or join a conference, and contains the
required fields and some additional flags.
foodudedude_
grp@gserv/a32d...dude
The secret and nick are required as indicated by the get request.
Multiple nicks may be included in case the first is taken. "privacy"
will indicate the server should hide your real jid. "messages" will
turn message traffic on and off. The result will contain the
selected or assigned nick, and the id assigned to you. Any further
iq get requests should return the same result as this set, and any
further iq set requests will modify the flags or attempt to change
the nick.
3.2 participants
The participants in a room are available by browsing to that room. A
room will create temporary identities for all participants such as
"grp@gserv/1c38...", and use that as the sending jid for that
participant. The current nickname is the name attribute on the
browse result. The participant list may be available before entering
the room (if it's not protected) and the real jid of the participant
may be accessible by browsing to their temporary room jid (if not
protected when they joined). If available presence was sent, any
changes in the browsed participant list will be pushed to the
participants.
Messages and Presence sent to a
conference will be broadcast out to all participants, and the
from="" will be rewritten as the local jid assigned to that
participant. Recipients should translate that sender to the
appropriate node in the browse data, and use that name="" for
display purposes.
Miller [Page 7]
WHITE White Protocols Dec 2000
4. jabber:iq:last
4.1 Server Uptime
Anyone can query the uptime of a server or any service.
Request:
Result:
4.2 User Last-Logout
The same query, when sent to a user@host account, if supported by
the server will return the last time the user logged out. It also
includes the last-known unavailable status message. Clients should
support the ability to send a "logout" or signoff message, which is
the status of an unavailable presence sent before disconnecting. Not
only is this broadcast to the subscriptions as a more descriptive
action, but it is stored for future reference in the last namespace.
This can be used for extended disconnects such as "Going on
vacation, back on the 14th", or simple messages like "going home
early today".
Request:
Result:
I'm gone for the weekend skiing!
5. PKI
These namespaces are used to sign and encrypt messages and presence
for end-to-end security. They are most secure when performed at the
client level, but could optionally be supported and used by a
trusted server. The crypto information is contained in the
jabber:x:signed or jabber:x:encrypted namespaces. The contents are
the armor'd output from GPG or PGP, and have all of the header and
wrapper text removed (it serves no purpose within this context). Any
future additional encryption schemes other than PGP/GPG should
utilize their own namespace(s) to exchange data.
5.1 signed presence
The status element of presence is the CDATA that is signed:
online
Online
iQA/AwUBOjU5dnol3d88qZ77EQI2JACfRngLJ045brNnaCX78ykKNUZaTIoAoPHI
2uJxPMGR73EBIvEpcv0LRSy+
Miller [Page 8]
WHITE White Protocols Dec 2000
=45f8
5.2 signed/encrypted messages
A signed message would look/work the same as presence above, but the CDATA would be the contents of the body element.
An example encrypted message, containing the word "Hi":
This message is encrypted.
qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
w7R61cCPt8KSd8Vcl8K+StqOMZ5wkhosVjUqvEu8uJ9RupdpB/4m9E3gOQZCBsmq
OsX4/jJhn2wIsfYYWdqkbNKnuYoKCnwrlmn6I+wX72p0R8tTv8peNCwK9bEtL/XS
mhn4bCxoUkCITv3k8a+Jdvbov9ucduKSFuCBq4/l0fpHmPhHQjkFofxmaWJveFfF
619NXyYyCfoLTmWk2AaTHVCjtKdf1WmwcTa0vFfk8BuFHkdah6kJJiJ7w/yNwa/E
O6CMymuZTr/LpcKKWrWCt+SErxqmq8ekPI8h7oNwMxZBYAa7OJ1rXWKNgL9pDtNI
824Mf0mXj7q5N1eMHvX1QEoKLAda/Ae3TTEevOyeUK1DEgvxfM2KRZ11RzU+XtIE
My/bJk7EycAw8P/QKyeNlO1fxP58VEd6Gb8NCPqKOYn/LKh1O+c20ZNVEPFM4bNV
XA4hB4UtFF7Ao8kpdlrUqdKyw4lEtnmdemYQ6+iIIVPEarWl9PxOMY90KAnZrSAq
bt9uRY/1rPgelRaWblMKvxgpRO8++Y8VjdEyGgMOXxOiE851Ve72ftGzkSxDH8mW
TgY3pf2aATmBp3lagQ1COkGS/xupovT5AQPA3RzbCxDvc6s6eGYKmVVQVj5vmSj1
WULad5MB9KT1DzCm6FOSy063nWGBYYMWiejRvGLpo1j4eAnj0qOt7rTWmgv3RkYF
Oin0vDOhW7aC
=CvnG
6. Generic XML Namespace Storage
The jabber:iq:private namespace is the old way of storing any XML in
another namespace on the server, such as client preferences. It is
still supported and used to store any "private" XML, but the server
now supports similiar public XML storage. If the client does an iq
set in any XML namespace to the server, it is stored on that users
account. That XML is then accessible to anyone doing an iq get with
the same namespace to that user account. The server will also
include a respective ns element in that users browse data.
Generic XML may also be stored public or private on a specific
resource. When the recipient of the iq set is a resource of that
user, the namespace is stored only on that resource and that
resource then referenced in the main users browse data.
...
Miller [Page 9]
WHITE White Protocols Dec 2000
7. Message Events
Message Events are for notifications of "message delivered" or "user
is composing a reply" sorts of things. These are not required and
only enabled on demand, only when the originating client requests
this feature and the recipient client supports it.
There are currently four event types: offline (stored), delivered
(to client), composing (the reply), and displayed (made visible to
the recipient). The recipient server determines the offline event,
and the recipient client determines the delivered, composing, and
displayed events. If the sending client supports any of these events
in it's GUI and wants to receive them for a particular message, it
should include the extension in that message. If the recipient
server/client supports the extension, it should respond
appropriately as shown below. It would be inappropriate to respond
or generate events when not requested.
The composing event is generated when the user is actively typing a
reply to the message. If the user never completes/sends the reply
(or after an idle timeout), an empty jabber:x:event (just contains
the id element) should be sent to "clear" the outstanding composing
event.
Original Message (requests that the offline and displayed events should be sent if/when they occur):
foo bar
Return Event (the id element flags that it is a return event):
MSG_31
8. jabber:iq:gateway
This is a new simple namespace to assist clients in their add-user
functionality. The results of the get are used for the GUI strings
and user entry instructions. The set of what the user entered will
return the correct jid for subsequent actions.
...
9. XHTML
XHTML allows clients to support simple styled text (colors and
fonts) or full blown xhtml support. It is a standard alternate body
namespace, to be used if supported. A simple
Miller [Page 10]
WHITE White Protocols Dec 2000
example:hihi
.
All of the textual content must always be represented as best as
possible in the normal body for non-supporting clients. If after
sending xhtml with a thread in a conversation, and the thread being
returned without an xhtml alternate body, the client should stop
sending the xhtml (because a client supporting xhtml would return
the thread in the next message and use xhtml). If the other client
returns a browse request and doesn't include the xhtml namespace, it
should default to off for that user, and vice-versa if included.
This detection logic isn't required, but is highly suggested.
From x-virge:
Using XHTML and Styling Messages in Jabber
XHTML-Basic in Jabber
Nothing is really "required" in any sense, but if you would like to claim full conformance with this document, you must follow everything marked required, and should do some of the recommended stuffs...
required:
- must be the root element
- must be inside
- indent or italicize or somehow indicate that this text is a quote, but a large one, usually a paragraph or more
- Clients should recognize that this is /n, and should be used instead of /n within the portion of
- at least understand that this divides into paragraphs. Basic support for the various align types would be nice
- This generally means italics
through - The general headings, h1 is usually displayed with largest font size. Client should also understand that a /n is implied after a heading
- Client should understand this is a paragraph, and be sure to end with a
- At absolute least, translate to " and
to ", so things will appear in quotes. A proper client will also understand nested quoting
- Most clients should recognize this as bold
- Clients should recognize at least http:// links (should they support jabber: as meaning a jabber user?), with optional support for mailto:. Relative links should be supported at the client's discresion
optional, but recommended:
- If the image is pointing somewhere that the client can find it, feel free to display it. This might be useful for clients which wish to be more graphical - they can ship with standard images, and somehow the UI can allow users to select them and display to each other. It is recommended that clients be able to display the alt text for images. (Not necessarily the images themselves)
- this is used to designate a fragment of computer code - perhaps make this in a fixed font. It would be nice to see computer code exchanged with things like this instead of with quotations around it
- Understand that this means text should be indented, and that its children, - are unordered (be sure to close the
- 's)
- Understand that this means text should be indented, and that its children, - , are ordered, usually this means with numbers, optional support for type numbering styles
optional:
- If you want to do something special to an address
and - if you wish to expand the title's of these on mouseover
- "Contains a citation or a reference to other sources. "
- "Indicates that this is the defining instance of the enclosed term. "
- "Indicates text to be entered by the user."
- pre-formatted text. If possible, do not wrap text within , as it should have its own wrapping
- "Designates sample output from programs, scripts, etc."
Miller [Page 11]
WHITE White Protocols Dec 2000
- "Indicates an instance of a variable or program argument."
and its buddies - and
- - these are used for definition lists. Not that much more useful than