From 2ac91f50c862f5ebccba409789c4a1c2f8dac461 Mon Sep 17 00:00:00 2001
From: Peter Saint-Andre or In accordance with XEP-0001, the XEP Editor is responsible for overall management of the Jabber Software Foundation's standards process and publication of XMPP Extension Protocols; in particular, the XEP Editor: Since the founding of the Jabber Software Foundation in 2001, the XEP Editor has been Peter Saint-Andre, who may be contacted via <editor@jabber.org>. 2dg9 kqhK)-ZGaYI*Bh>eX;#t1*AylpT`dCip$NuFr~pM&
z<5?TGkurx7-VcXB0Cl)eC8^ju3H1>vz4@`p)B-`)EEeZzgx#zM{}GsdY<6A|8C(kP
zo3X0i!461dLt>6Czu4%CCJT~;z!uJT9X>#+1dKoF7Z#bB6`2TS8h!Ib{>~Vef2e9w
z`s)oTla4;4LaCbLHY7)}3Wm{Qt&y~2C_fSjtaT|{|FPgzB>SBP%+@dVIAbcTQdv$t
ztEkBzh(ZSALx2*Zm&j4HBXs5*zPQE-#nq8rBsp7nE~Lb$ 8qtp~MV@r6(v)nh=Xm_EyRlTk The following example of GPS datum differences was kindly provided by Randy Steele of Apollo, Pennsylvania (URL: <http://www.nb.net/~resteele/>) and is archived here so that a permanent link is available from JEP-0080: User Geolocation. BEGIN EXAMPLE This is an example of the differences in the datums you can use with a GPS.
+Below is a site I was checking out. I marked it on my GPS in the field. When I got back
+home to find it on the topo map, I noticed something was not right. Using
+the UTM coordinates from the GPS, I located the site on the topo map. But
+the map site and the site I checked in the field did not match. The terrain
+was different, the site I actually checked was near the road (the top red
+circle). I then remembered about map datums. The topo map was made to NAD27, while
+my GPS was set to WGS84. After changing the GPS to the NAD27 datum, all was fine.
+So the moral of this story is: MAKE SURE THE GPS DATUM AND THE MAP DATUM MATCH!!!
+Note the difference in the circle locations. I also changed my GPS datum to NAD27. END EXAMPLE The Jabber Software Foundation (JSF) develops extensions to XMPP through a standards process centered around XMPP Extension Protocols (XEPs). The process is managed by the XMPP Extensions Editor and involves intensive discussion on the Standards-JIG mailing list, formal review and voting by the XMPP Council, and modification based on implementation experience and interoperability testing. All documents in the XEP series are available under a liberal IPR Policy for wide implementation. Submissions are welcome (see also the "inbox"). Changes are tracked via a CVS repository (see instructions), old versions are available, and IETF-style XML reference files are provided. This page lists approved XMPP extensions as well as proposals that are under active consideration. A list of all XEPs (including retracted, rejected, deprecated, and obsolete XEPs) is also available. Good places for developers to start are the basic and intermediate protocol suites. Note: The following table is sortable, just click on the headers (click twice to reverse the sort order). This document defines the official policy of the Jabber Software Foundation regarding intellectual property rights (IPR) pertaining to XMPP Extension Protocol (XEPs) specifications. Version 1.2 This document defines the official policy of the Jabber Software Foundation (JSF) regarding intellectual property rights (IPR) as they pertain to extensions to XMPP in the form of XMPP Extension Protocol specifications (XEPs). [1] The Jabber/XMPP protocols have been under development since 1998 and have been discussed and documented in public forums since January 1999 in the open-source projects that were a precursor to the JSF. Through force of history and activity since its founding in the summmer of 2001, the JSF has assumed responsibility for managing the evolution of the Jabber/XMPP protocols in two ways: (1) through working with the IETF to standardize the core protocols under the name Extensible Messaging and Presence Protocol (XMPP); and (2) through the definition of extensions to the core protocol in the JSF's XMPP Extension Protocol (XEP) specification series. Through this work, the JSF has in effect "homesteaded" the domain of XMPP Extensions and has acted as a trusted third party or "intellectual property conservancy" [2] to which new and established participants in the Jabber community have entrusted their XMPP Extensions. The JSF does not seek to disparage the legitimate rights of any individual or organization to assert ownership over an Implementation of XMPP or of any XMPP Extension. However, the JSF must ensure that XMPP Extensions do not pollute the free and open nature of the protocols. Preventing such pollution means that in perpetuity any entity may independently, and without payment or hindrance, create, use, sell, distribute, or dispose of implementations of XMPP and of any XMPP Extension. Such is the intent of this policy. The core XML streaming, instant messaging, and presence protocols developed by the Jabber community have been contributed by the JSF to the Internet Engineering Task Force (IETF) under the name Extensible Messaging and Presence Protocol (XMPP). XMPP is all and only these core protocols, as currently defined in RFC 3920 and RFC 3921. For the purposes of this IPR policy, an XMPP Extension is any specification approved by, or submitted for approval or consideration by, the JSF or its constituent committees (most particularly the XMPP Council). Such a specification must exist in the form of a standards-track XMPP Extension Protocol (XEP) specification in order to be considered an official submission. (Also referred to as an Extension.) Any software that implements XMPP or XMPP Extensions for the purpose of providing the functionality defined by the relevant specification(s). Any patent, copyright, or other proprietary claim or claims made by an entity regarding a XMPP Extension. (Also referred to as a Claim.) The JSF recognizes the possibility that the creator of an XMPP Extension may make an Intellectual Property Claim regarding an XMPP Extension. Therefore, the JSF takes the following positions: By submitting an XMPP Extension for consideration by the JSF, the author of the Extension shall assign any ownership rights or other Claims asserted over the Extension to the JSF. This does not apply to Claims regarding any Implementations of the Extension, but rather to the Extension itself. Any documentation of the Extension (in the form of a XEP specification) shall be copyrighted by the JSF. Once an author assigns ownership to the JSF, the JSF shall in turn make the Extension available to all entities so that they may create, use, sell, distribute, or dispose of implementations of XMPP and all XMPP Extensions in perpetuity and without payment or hindrance. No Extension shall be approved by the JSF or its constituent committees if there are Claims to the Extension itself, or any Claims that would prevent perpetual, unrestricted, royalty-free use of the Extension in a compliant Implementation by any interested party. If Claims preventing such use are discovered, the JSF shall immediately seek to replace the Extension with unencumbered protocols that may be implemented without condition by any entity. By its nature as XML, XMPP enables implementers to create their own private extensions to XMPP within custom XML namespaces. Such extensions may be kept private, and there is no compulsion for implementers to contribute such extensions to the Jabber community. It is only when an implementer seeks to have an extension standardized through the JSF's public standards process that ownership over such an extension must be transferred to the JSF. If an implementer wishes to keep its extensions private, it may simply refrain from submitting them to the JSF. However, private extensions exist outside the boundaries of XMPP and approved XMPP Extensions and must not be considered or described as part of XMPP or JSF-approved XMPP Extensions. All XMPP Extension Protocol (XEP) specifications shall contain the following Legal Notice:
+testRemarkNode = remNode.firstChild.nodeName
+# print testRemarkNode
+if (testRemarkNode == "p"):
+ remarkNode = (remNode.getElementsByTagName("p")[0])
+ remark = getText(remarkNode.childNodes)
+else:
+ remark = "[See revision history]"
+
+# what kind of action are we taking?
+xepflag = ""
+if (version == "0.1"):
+ xepflag = "new"
+elif ((version == "1.0") & (xeptype == "Standards Track")):
+ xepflag = "draft"
+elif ((version == "1.0") & (xeptype != "Standards Track")):
+ xepflag = "active"
+elif (version == "2.0"):
+ xepflag = "final"
+elif (xepstatus == "Retracted"):
+ xepflag = "retract"
+elif (xepstatus == "Deferred"):
+ xepflag = "defer"
+
+# UPDATE DATABASE:
+#
+# number is $xepnum
+# name is $title
+# type is $xeptype
+# status is $xepstatus
+# notes is "Version $version of XEP-$xepnum released $date."
+# version is $version
+# last_modified is $now
+# abstract is $abstract
+# changelog is "$remark ($initials)"
+
+db = MySQLdb.connect("localhost", dbuser, dbpw, "foundation")
+cursor = db.cursor()
+theNotes = "Version " + version + " of XEP-" + xepnum + " released " + date + "."
+theLog = remark + " (" + initials + ")"
+if xepflag == "new":
+ theStatement = "INSERT INTO jeps VALUES ('" + str(xepnum) + "', '" + title + "', '" + xeptype + "', '" + xepstatus + "', '" + theNotes + "', '" + str(version) + "', '" + str(now) + "', '" + abstract + "', '" + theLog + "', '0', '5', 'Proposed', 'none');"
+ cursor.execute(theStatement)
+else:
+ theStatement = "UPDATE jeps SET name='" + title + "', type='" + xeptype + "', status='" + xepstatus + "', notes='" + theNotes + "', version='" + str(version) + "', last_modified='" + str(now) + "', abstract='" + abstract + "', changelog='" + theLog + "' WHERE number='" + str(xepnum) + "';"
+ cursor.execute(theStatement)
+result = cursor.fetchall()
+
+## SEND MAIL:
+#
+# From: editor@jabber.org
+# To: standards-jig@jabber.org
+# Subject: UPDATED: XEP-$xepnum ($title)
+# [or "NEW..." if version 0.1]
+# Body:
+# Version $version of XEP-$xepnum ($title) is now available.
+# Abstract: $abstract
+# Changelog: $remark ($initials)
+# CVS Diff: $mods
+# URL: http://www.xmpp.org/extensions/xep-$xepnum.html
+
+fromaddr = "editor@jabber.org"
+# for testing...
+# toaddrs = "stpeter@jabber.org"
+# for real...
+toaddrs = "standards-jig@jabber.org"
+
+if xepflag == "new":
+ thesubject = 'NEW: XEP-'
+elif xepflag == "draft":
+ thesubject = 'DRAFT: XEP-'
+ toaddrs = toaddrs + ", jdev@jabber.org"
+elif xepflag == "final":
+ thesubject = 'FINAL: XEP-'
+ toaddrs = toaddrs + ", jdev@jabber.org"
+elif xepflag == "active":
+ thesubject = 'ACTIVE: XEP-'
+elif xepflag == "retract":
+ thesubject = 'RETRACTED: XEP-'
+elif xepflag == "defer":
+ thesubject = 'DEFERRED: XEP-'
+else:
+ thesubject = 'UPDATED: XEP-'
+thesubject = thesubject + xepnum + ' (' + title + ')'
+
+versionline = 'Version ' + version + ' of XEP-' + xepnum + ' (' + title + ') has been released.'
+abstractline = 'Abstract: ' + abstract
+changelogline = 'Changelog: ' + remark + ' (' + initials + ')'
+modsline = 'CVS Diff: ' + mods
+urlline = 'URL: http://www.xmpp.org/extensions/xep-' + xepnum + '.html'
+
+msg = "From: XMPP Extensions Editor <%s>\r\n" % fromaddr
+msg = msg + "To: %s\r\n" % toaddrs
+msg = msg + "Subject: %s\r\n" % thesubject
+msg = msg + versionline
+msg = msg + "\r\n\n"
+msg = msg + abstractline
+msg = msg + "\r\n\n"
+msg = msg + changelogline
+msg = msg + "\r\n\n"
+msg = msg + modsline
+msg = msg + "\r\n\n"
+msg = msg + urlline
+msg = msg + "\r\n\n"
+
+server = smtplib.SMTP('localhost')
+server.set_debuglevel(1)
+server.sendmail(fromaddr, toaddrs, msg)
+server.quit()
+
+# END
+
diff --git a/archive.sh b/archive.sh
new file mode 100755
index 00000000..12b94e56
--- /dev/null
+++ b/archive.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# archive an old version of a XEP (before publishing new version)
+# usage: ./archive.sh xepnum version
+
+xeppath=/var/www/xmpp.org/extensions
+
+cp $xeppath/xep-$1.html $jeppath/attic/xep-$1-$2.html
+
+# end
diff --git a/deferred.py b/deferred.py
new file mode 100755
index 00000000..11134f31
--- /dev/null
+++ b/deferred.py
@@ -0,0 +1,143 @@
+#!/usr/bin/env python
+
+# File: deferred.py
+# Version: 0.2
+# Description: a script for setting a JEP to Deferred
+# Last Modified: 2006-04-24
+# Author: Peter Saint-Andre (stpeter@jabber.org)
+# License: public domain
+# HowTo: ./deferred.py jepnum dbuser dbpw
+
+# IMPORTS:
+#
+import glob
+import MySQLdb
+import os
+from select import select
+import smtplib
+import socket
+from string import split,strip,join,find
+import sys
+import time
+from xml.dom.minidom import parse,parseString,Document
+
+def getText(nodelist):
+ thisText = ""
+ for node in nodelist:
+ if node.nodeType == node.TEXT_NODE:
+ thisText = thisText + node.data
+ return thisText
+
+# get the seconds in the Unix era
+now = int(time.time())
+
+# READ IN ARGS:
+#
+# 1. JEP number
+# 2. database user
+# 3. database password
+
+jepnum = sys.argv[1];
+dbuser = sys.argv[2];
+dbpw = sys.argv[3];
+
+jepfile = jepnum + '/jep-' + jepnum + '.xml'
+
+# PARSE JEP HEADERS:
+#
+# - title
+# - abstract
+# - version
+# - date
+# - initials
+# - remark
+
+thejep = parse(jepfile)
+jepNode = (thejep.getElementsByTagName("jep")[0])
+headerNode = (jepNode.getElementsByTagName("header")[0])
+titleNode = (headerNode.getElementsByTagName("title")[0])
+title = getText(titleNode.childNodes)
+abstractNode = (headerNode.getElementsByTagName("abstract")[0])
+abstract = getText(abstractNode.childNodes)
+statusNode = (headerNode.getElementsByTagName("status")[0])
+jepstatus = getText(statusNode.childNodes)
+typeNode = (headerNode.getElementsByTagName("type")[0])
+jeptype = getText(typeNode.childNodes)
+revNode = (headerNode.getElementsByTagName("revision")[0])
+versionNode = (revNode.getElementsByTagName("version")[0])
+version = getText(versionNode.childNodes)
+dateNode = (revNode.getElementsByTagName("date")[0])
+date = getText(dateNode.childNodes)
+initialsNode = (revNode.getElementsByTagName("initials")[0])
+initials = getText(initialsNode.childNodes)
+remarkNode = (revNode.getElementsByTagName("remark")[0])
+remark = getText(remarkNode.childNodes)
+
+# UPDATE DATABASE:
+#
+# number is $jepnum
+# name is $title
+# type is $jeptype
+# status is $jepstatus
+# notes is "Version $version of JEP-$jepnum released $date."
+# version is $version
+# last_modified is $now
+# abstract is $abstract
+# changelog is "$remark ($initials)"
+
+db = MySQLdb.connect("localhost", dbuser, dbpw, "foundation")
+cursor = db.cursor()
+theNotes = "Version " + version + " of JEP-" + jepnum + " released " + date + "; consideration deferred because of inactivity."
+theLog = remark + " (" + initials + ")"
+theStatement = "UPDATE jeps SET name='" + title + "', type='" + jeptype + "', status='Deferred', notes='" + theNotes + "', version='" + str(version) + "', last_modified='" + str(now) + "', abstract='" + abstract + "', changelog='" + theLog + "' WHERE number='" + str(jepnum) + "';"
+cursor.execute(theStatement)
+result = cursor.fetchall()
+
+# SEND MAIL:
+#
+# From: editor@jabber.org
+# To: standards-jig@jabber.org
+# Subject: DEFERRED: JEP-$jepnum ($title)
+# Body:
+# JEP-$jepnum ($title) has been Deferred because of inactivity.
+#
+# Abstract: $abstract
+#
+# URL: http://www.jabber.org/jeps/jep-$jepnum.html
+#
+# If and when a new revision of this JEP is published,
+# its status will be changed back to Experimental.
+#
+
+fromaddr = "editor@jabber.org"
+# for testing...
+# toaddrs = "stpeter@jabber.org"
+# for real...
+toaddrs = "standards-jig@jabber.org"
+
+thesubject = 'DEFERRED: JEP-' + jepnum + " (" + title + ")"
+introline = 'JEP-' + jepnum + ' (' + title + ') has been Deferred because of inactivity.'
+abstractline = 'Abstract: ' + abstract
+urlline = 'URL: http://www.jabber.org/jeps/jep-' + jepnum + '.html'
+endline = 'If and when a new revision of this JEP is published, its status will be changed back to Experimental.'
+
+#msg = "From: %s\r\n" % fromaddr
+msg = "From: JEP Editor <%s>\r\n" % fromaddr
+msg = msg + "To: %s\r\n" % toaddrs
+msg = msg + "Subject: %s\r\n" % thesubject
+msg = msg + introline
+msg = msg + "\r\n\n"
+msg = msg + abstractline
+msg = msg + "\r\n\n"
+msg = msg + urlline
+msg = msg + "\r\n\n"
+msg = msg + endline
+msg = msg + "\r\n"
+
+server = smtplib.SMTP('localhost')
+server.set_debuglevel(1)
+server.sendmail(fromaddr, toaddrs, msg)
+server.quit()
+
+# END
+
diff --git a/editor.shtml b/editor.shtml
new file mode 100755
index 00000000..69b60df1
--- /dev/null
+++ b/editor.shtml
@@ -0,0 +1,21 @@
+
+
+
XEP Editor
+
+
+
+
+
+
+
+ wVH^xjJtfqU}<9HTZ>fu9VYnASSOVYe)3vUs5$Zofg)hU!hT?>``@1)3|~#R
zEQADyKrDbD>L-&LQc3bsutldWBxMk1FNr(9M5o2>Xb?3WQ9gAhUG8_iH=j`;=*IET
zkU(S@wX3ego-684QnZ_b*xo-JQjkK>d*2#x!s^!G5td{pRsySiB(q2kQ9Ei<$tnDq
zNXRPx-5POef+W>JV>T_3i)h=Cot!lY7R8Sye?~C_>{oYzxx6zndmt_dIkaPnlteN`
zYU+ssW7L$ij!H@*#v~;)+O$%1GF8S+DJA&9lw!1V8bpz)qLj3ZlEPDJlPLwYDo@)!
zizAixvQD`UR8_;GvKbh{Afc)$7Kiyn!d9`Y6vPxS0E^Yjtwq;3mkpDhl{FS|6OK`x
zMpiccDJ|=UoN7UO-fd}#vc=Yd=g?}pV3sxa(D#&jd1_v-S~cx?=d`4El8X~8h0Yk)
zJUu##NRZM+u*padqU~4?xXVPIiyqI_ciHM7AFH>xy@{fIga+1G;qIA562W^_ShnI)
z(CSMiw@b6^@wr^aaY`llYNg=y_FTaCL&JNlJ)OSwQqGSFw4OZhOfh&n3Gzfe4*nCY
zG;x_28NamQLVK!&NvH}y-_=$qmS&H$eo-@kFFS-MZRiYHK>&Glbfir!##M@W&N%ZPD+Milfi
z?`}qn9C`#%Me)$X7ywd5u!C81WjaI|_7?;Wodf{I9<1lMl$Yu8tqk_-wt~3{OtYbH
z*nuG9hTvcAW;phVS;H}TAyGus;ENNsW|iKg4LOy4-(A=w$&(*B%SSgAxvn!R)qSFZ
zbDhSM<9zdpvaOv$-G^9Jv((MQw-byA6iv({Tul^^pxW7~)X5&Ap6r*)tMlH`($m1W
z(W+(oIE6DBQK9K)Gogn=b)PMWFRShMSqu>Z3;ffEpfj#&jUF=_Sw
z!+NCrvI{+as1n}<8zzU82?l{XhY~!Cx-^h72o8e8BcAVfbxdonr?H*J@}s`u3s?!I
z)&io$a)V|ABWo5d0aCe+g;_j*!cDvz>i(H%@vaGa-D@}#HecIA`!Co#6P4emhUc-W
z;_e&yoD%fo#udggHBHS2L#!y2q8K)y^=&4U{R
zWH)!LPD3`Oo#{I752QbZ(xG2N>2di?yarO&(ZQh2OEQxQk=&sqhNok)yWp<*s>zQawQqpY+j`~-}V)|cj?~1K*_?5OE{t8
z#f%#}4hgekOp-JsKCJALCC1B>UqYrFS+i)Fn^AWDY?8BSns-}&HC#5X-?fC#!i6jF
zX>O7XYV
z1j!8+LZRmHBRWA&mAHCek7Y-#XNEx+MR?=}uA1f8fX8+}JZgG!+3b1D;$8TY&=V^U
zorwf@KB{>;#^s%d2}1|u7k9RI?8TBNT?nUZF^3rP>Jx!haDsOB^%He|Pi_*~SZl8+
zyrdYR2cMXqU#k}i#xQXag`{+L^q!aM>IHgRRzt}l?c`3xk|kpuo(L_pqj^qDx_Nq$
zuRn~(KQo7R@MW9+l|Jf#-Fm2tHVieu&W%>#%Zv}z5}dc2;7)r8NoQV{OZODOn3_tY
zKl4=O?4}I2y`(MS(O!^P->6r2ZuQD2|M8i^>PB~LrH+}!9}%l~?Eq|}ckheawr?U*
ztm$ogw+}Y9cMNQP^v)07b|=uwh9%9ri_*U_lpy53zxOu=e5MopgRM}OPwiC4Toqx}
zap|*UW`4fy%*xw|a(@ZR|LunVS4qu@1hD_0ukYtr4bf2h*%x?0(b}d`B6|qtT0AOj-v~6uB$eWkz)w_QG+NJyV?oq)-4GXp!Hlomqi-nr>_;@H~
zkw6QS#0hz$%9mr|(p5OKDA1e*CTEmvd38$EnPg>*6)d-Q|>`E6f^ONk6`zrzjqaBl%<}urYaOS`aEC^!TX5LiREwIYeUi
z2I)IMjwEhk>eIYzcEoxmv1LOGO4e#gtcb-Blf~3X*0Q)EMc(W_MB|M^NO>I!+Jtns
zM5im?$1!3(YHTd>9v$bH!Vnf^F9~{*PEh5`Um_ErJ;cZZK?z8oDYKf1
GPS Datum Example
+
+
+
+XMPP Extensions
+
+
+
+
+
+
+
+
diff --git a/inxep.py b/inxep.py
new file mode 100755
index 00000000..ddfc72e4
--- /dev/null
+++ b/inxep.py
@@ -0,0 +1,121 @@
+#!/usr/bin/env python
+
+# File: protojep.py
+# Version: 0.1
+# Description: a script for announcing proto-JEPs
+# Last Modified: 2004-09-14
+# Author: Peter Saint-Andre (stpeter@jabber.org)
+# License: public domain
+# HowTo: ./protojep.py filename
+# (note: do not include extension!)
+
+# IMPORTS:
+#
+import glob
+import os
+from select import select
+import smtplib
+import socket
+from string import split,strip,join,find
+import sys
+import time
+from xml.dom.minidom import parse,parseString,Document
+
+def getText(nodelist):
+ thisText = ""
+ for node in nodelist:
+ if node.nodeType == node.TEXT_NODE:
+ thisText = thisText + node.data
+ return thisText
+
+# READ IN ARGS:
+#
+# 1. JEP filename (sans extension)
+
+jepname = sys.argv[1];
+
+jepfile = 'inbox/' + jepname + '.xml'
+
+# PARSE JEP HEADERS:
+#
+# - title
+# - abstract
+# - version
+# - date
+# - initials
+# - remark
+
+thejep = parse(jepfile)
+jepNode = (thejep.getElementsByTagName("jep")[0])
+headerNode = (jepNode.getElementsByTagName("header")[0])
+titleNode = (headerNode.getElementsByTagName("title")[0])
+title = getText(titleNode.childNodes)
+abstractNode = (headerNode.getElementsByTagName("abstract")[0])
+abstract = getText(abstractNode.childNodes)
+statusNode = (headerNode.getElementsByTagName("status")[0])
+jepstatus = getText(statusNode.childNodes)
+typeNode = (headerNode.getElementsByTagName("type")[0])
+jeptype = getText(typeNode.childNodes)
+revNode = (headerNode.getElementsByTagName("revision")[0])
+versionNode = (revNode.getElementsByTagName("version")[0])
+version = getText(versionNode.childNodes)
+dateNode = (revNode.getElementsByTagName("date")[0])
+date = getText(dateNode.childNodes)
+initialsNode = (revNode.getElementsByTagName("initials")[0])
+initials = getText(initialsNode.childNodes)
+remarkNode = (revNode.getElementsByTagName("remark")[0])
+remark = getText(remarkNode.childNodes)
+
+# SEND MAIL:
+#
+# From: editor@jabber.org
+# To: standards-jig@jabber.org
+# Subject: LAST CALL: JEP-$jepnum ($title)
+# Body:
+# The JEP Editor has received a proposal for a new JEP.
+#
+# Title: $title
+#
+# Abstract: $abstract
+#
+# URL: http://www.jabber.org/jeps/inbox/$jepname.html
+#
+# The Jabber Council will now consider whether to accept
+# this proposal as a full JEP.
+#
+
+fromaddr = "editor@jabber.org"
+# for testing...
+# toaddrs = "stpeter@jabber.org"
+# for real...
+toaddrs = "standards-jig@jabber.org"
+
+thesubject = 'proto-JEP: ' + title
+introline = 'The JEP Editor has received a proposal for a new JEP.'
+titleline = 'Title: ' + title
+abstractline = 'Abstract: ' + abstract
+urlline = 'URL: http://www.jabber.org/jeps/inbox/' + jepname + '.html'
+actionline = 'The Jabber Council will decide within 7 days (or at its next meeting) whether to accept this proposal as an official JEP.'
+
+#msg = "From: %s\r\n" % fromaddr
+msg = "From: JEP Editor <%s>\r\n" % fromaddr
+msg = msg + "To: %s\r\n" % toaddrs
+msg = msg + "Subject: %s\r\n" % thesubject
+msg = msg + introline
+msg = msg + "\r\n\n"
+msg = msg + titleline
+msg = msg + "\r\n\n"
+msg = msg + abstractline
+msg = msg + "\r\n\n"
+msg = msg + urlline
+msg = msg + "\r\n\n"
+msg = msg + actionline
+msg = msg + "\r\n\n"
+
+server = smtplib.SMTP('localhost')
+server.set_debuglevel(1)
+server.sendmail(fromaddr, toaddrs, msg)
+server.quit()
+
+# END
+
diff --git a/ipr-policy.shtml b/ipr-policy.shtml
new file mode 100755
index 00000000..23f41d48
--- /dev/null
+++ b/ipr-policy.shtml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+Number
+ Name
+ Type
+ Status
+ Date
+ JSF IPR Policy
+
+
+
+
+
+
+1. Introduction
+
+
+1.1 History
+ 1.2 Purpose
+ 2. Terms
+
+
+ 2.1 XMPP
+
+
+
+ 2.2 XMPP Extension
+
+
+ 2.3 Implementation
+
+
+2.4 Intellectual Property Claim
+ 3. Terms of Contributing an XMPP Extension
+
+
3.1 Ownership
+ 3.3 Approval of Extensions
+ 3.3 A Note about Private Extensions
+ 5. Legal Notice
+
+
+This XMPP Extension Protocol is copyright 1999 - [year]
+by the Jabber Software Foundation (JSF) and is in full
+conformance with the JSF's Intellectual Property Rights
+Policy (<http://www.xmpp.org/extensions/ipr-policy.shtml>).
+This material may be distributed only subject to the terms and
+conditions set forth in the Creative Commons Attribution
+License (<http://creativecommons.org/by/2.5/>).
+
1. For information about XMPP Extension Protocols, see <http://www.xmpp.org/extensions/> and JEP-0001.
+2. For information about intellectual property conservancies, see <http://www.creativecommons.org/concepts/#ip> and M. van Houweling, "Cultivating Open Information Platforms: A Land Trust Model." Journal of Telecommunications & High Technology Law 1, no. 1 (2002): 309-23.
+Many thanks to Lawrence Lessig and Molly van Houweling for their assistance in formulating this policy.
+Version 1.2 (2006-10-04): Modified terminology to reflect protocol branding change from Jabber to XMPP (e.g., Jabber Enhancement Proposal to XMPP Extension Protocol).
+Version 1.1 (2005-10-04): Replaced Open Publication License with Creative Commons Attribution License.
+Version 1.0 (2002-10-29): Initial version approved by JSF Board of Directors.
+ + diff --git a/lastcall.py b/lastcall.py new file mode 100755 index 00000000..1c35caa3 --- /dev/null +++ b/lastcall.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python + +# File: lastcall.py +# Version: 0.2 +# Description: a script for announcing JEP Last Calls +# Last Modified: 2004-09-29 +# Author: Peter Saint-Andre (stpeter@jabber.org) +# License: public domain +# HowTo: ./lastcall.py jepnum enddate dbuser dbpw + +# IMPORTS: +# +import glob +import MySQLdb +import os +from select import select +import smtplib +import socket +from string import split,strip,join,find +import sys +import time +from xml.dom.minidom import parse,parseString,Document + +def getText(nodelist): + thisText = "" + for node in nodelist: + if node.nodeType == node.TEXT_NODE: + thisText = thisText + node.data + return thisText + +# get the seconds in the Unix era +now = int(time.time()) + +# READ IN ARGS: +# +# 1. JEP number +# 2. end date +# 3. database user +# 4. database password + +jepnum = sys.argv[1]; +enddate = sys.argv[2]; +dbuser = sys.argv[3]; +dbpw = sys.argv[4]; + +jepfile = jepnum + '/jep-' + jepnum + '.xml' + +# PARSE JEP HEADERS: +# +# - title +# - abstract +# - version +# - date +# - initials +# - remark + +thejep = parse(jepfile) +jepNode = (thejep.getElementsByTagName("jep")[0]) +headerNode = (jepNode.getElementsByTagName("header")[0]) +titleNode = (headerNode.getElementsByTagName("title")[0]) +title = getText(titleNode.childNodes) +abstractNode = (headerNode.getElementsByTagName("abstract")[0]) +abstract = getText(abstractNode.childNodes) +statusNode = (headerNode.getElementsByTagName("status")[0]) +jepstatus = getText(statusNode.childNodes) +typeNode = (headerNode.getElementsByTagName("type")[0]) +jeptype = getText(typeNode.childNodes) +revNode = (headerNode.getElementsByTagName("revision")[0]) +versionNode = (revNode.getElementsByTagName("version")[0]) +version = getText(versionNode.childNodes) +dateNode = (revNode.getElementsByTagName("date")[0]) +date = getText(dateNode.childNodes) +initialsNode = (revNode.getElementsByTagName("initials")[0]) +initials = getText(initialsNode.childNodes) +remarkNode = (revNode.getElementsByTagName("remark")[0]) +remark = getText(remarkNode.childNodes) + +# UPDATE DATABASE: +# +# number is $jepnum +# name is $title +# type is $jeptype +# status is $jepstatus +# notes is "Version $version of JEP-$jepnum released $date." +# version is $version +# last_modified is $now +# abstract is $abstract +# changelog is "$remark ($initials)" + +db = MySQLdb.connect("localhost", dbuser, dbpw, "foundation") +cursor = db.cursor() +theNotes = "Version " + version + " of JEP-" + jepnum + " released " + date + "; Last Call ends " + enddate + "." +theLog = remark + " (" + initials + ")" +theStatement = "UPDATE jeps SET name='" + title + "', type='" + jeptype + "', status='Proposed', notes='" + theNotes + "', version='" + str(version) + "', last_modified='" + str(now) + "', abstract='" + abstract + "', changelog='" + theLog + "' WHERE number='" + str(jepnum) + "';" +cursor.execute(theStatement) +result = cursor.fetchall() + +# SEND MAIL: +# +# From: editor@jabber.org +# To: standards-jig@jabber.org +# Subject: LAST CALL: JEP-$jepnum ($title) +# Body: +# This message constitutes notice of a Last Call +# for JEP-$jepnum ($title). +# +# Abstract: $abstract +# +# URL: http://www.jabber.org/jeps/jep-$jepnum.html +# +# This Last Call begins now and shall end at the close +# of business on $enddate. +# + +fromaddr = "editor@jabber.org" +# for testing... +# toaddrs = "stpeter@jabber.org" +# for real... +toaddrs = "standards-jig@jabber.org" + +thesubject = 'LAST CALL: JEP-' + jepnum + " (" + title + ")" +introline = 'This message constitutes notice of a Last Call for JEP-' + jepnum + ' (' + title + ').' +abstractline = 'Abstract: ' + abstract +urlline = 'URL: http://www.jabber.org/jeps/jep-' + jepnum + '.html' +schedline = 'This Last Call begins today and shall end at the close of business on ' + enddate + '.' + +#msg = "From: %s\r\n" % fromaddr +msg = "From: JEP Editor <%s>\r\n" % fromaddr +msg = msg + "To: %s\r\n" % toaddrs +msg = msg + "Subject: %s\r\n" % thesubject +msg = msg + introline +msg = msg + "\r\n\n" +msg = msg + abstractline +msg = msg + "\r\n\n" +msg = msg + urlline +msg = msg + "\r\n\n" +msg = msg + schedline +msg = msg + "\r\n" + +server = smtplib.SMTP('localhost') +server.set_debuglevel(1) +server.sendmail(fromaddr, toaddrs, msg) +server.quit() + +# END + diff --git a/protopage.xsl b/protopage.xsl new file mode 100644 index 00000000..8711ba4a --- /dev/null +++ b/protopage.xsl @@ -0,0 +1,73 @@ + + + +This page provides information about the XML namespaces defined in
+
+
The following XML schemas are available for the
Last Updated:
Here is how to submit a proposal to the Jabber Software Foundation for consideration as an XMPP Extension Protocol:
+Contact the XMPP Extensions Editor so that he knows to expect your submission.
Write your proposal following the guidelines described in XEP-0143: Guidelines for Authors of XMPP Extension Protocols.
Email the XML file (or a URL for the file) to the XMPP Extensions Editor with a subject line of "ProtoJEP: [your title here]".
Note: It is the author's responsibility to provide a properly-formatted source file (see the template and CVS repository). Proposals submitted in HTML, TXT, MS Word, Open Document Format, etc. will be returned to the proposal author for proper formatting.
+ + diff --git a/xep-0001.xml b/xep-0001.xml new file mode 100644 index 00000000..e553b7e0 --- /dev/null +++ b/xep-0001.xml @@ -0,0 +1,688 @@ + + +%ents; +]> + +Clarified and simplified the state charts based on implementation experience; summarized state definitions.
Specified that a Standards Track JEP defines either (1) a wire protocol or (2) a protocol suite.
Defined Procedural JEP type as the union of JIG Formation JEPs and certain Informational JEPs in order to clarify the JEP categories; added Modifications to Approved JEPs section in order to make explicit existing Council practices regarding Active and Final JEPs; specified that JEPs on which voting was not complete at the end of a Council term shall undergo a second Last Call and subsequent vote by the new Council; modified Proposal Process to specify that the Jabber Council shall issue Last Calls on JEPs for which it is the approving body, with all discussion to occur on the Standards-JIG list; updated the schema.
Further specified the goals of the JEP process; mentioned Board-approved JEPs.
Specified the procedure for changing a JEP from Historical to Standards Track.
Specified the procedure for acceptance of a proposal as a JEP; clarified the JEP types; completed editorial review.
Added rule about automatic deferral of inactive JEPs.
Clarified the definition of informational JEP.
Added status of Retracted; corrected several errors related to the Jabber Registrar.
Further clarified the proposal process per discussion on the JSF members list.
Major revision based on experience. In addition to a reorganization of the content to improve the clarity of the presentation, changes include: (1) no anonymous authors; (2) proposal must be seconded by at least 5% of JSF members before being proposed for a Council vote; (3) clarification that the Council votes only on a particular revision of a JEP (e.g., version 1.3 when proceeding from Draft to Final); (4) added information about the "Call for Experience" phase before proceeding from Draft to Final; (5) added reference to RFC 2119; (6) added sections for security considerations, IANA considerations, and Jabber Registrar considerations. Approved by the JSF Board and Jabber Council on 2002-11-20.
Added information about the new "Experimental" state for Standards Track JEPs and made appropriate changes to the JEP process.
Added link to DTD.
(1) Added information about the "cooling off" period before a Standards Track JEP may be advanced from Draft to Final; (2) Added a link to the JEP template file; (3) Performed several minor fixes.
(1) Added information about expiration dates; (2) Added a status of Deprecated to Standards Track JEPs.
(1) Changed "Jabber Foundation" to "Jabber Software Foundation"; (2) Changed "JIG Proposal JEP" to "JIG Formation JEP"; (3) Removed reference to the Secretary of the Jabber Software Foundation in connection with the role of JEP Editor; (4) Clarified the possible states of acceptance of each kind of JEP and described in greater detail the criteria for advancement from one state to another.
Changed status to Active.
Initial release -- a simplified and updated version of Rahul Dave's Jabberization of the process and format for Python Enhancement Proposals
The &JSF; adheres to an open standards process that enables interested parties to document existing protocols used within the Jabber/XMPP developer community and to submit proposals that define new protocols; with a few exceptions,
The Jabber Software Foundation was founded in the year 2001 to openly document, safeguard, manage, and extend the wire protocols used within the Jabber/XMPP developer community. The work of the Jabber Software Foundation has several objectives:
+The standards process specified herein has been developed and refined in order to meet these objectives.
+The five JEP types are described in the following sections.
+The approving body for all Standards Track, Informational, Historical, and Humorous JEPs is the &COUNCIL;; the approving body for Procedural JEPs may be either the &BOARD; or the Jabber Council.
+This document focuses primarily on Standards Track JEPs since they are the vehicle for defining new protocols, but also discusses the other JEP types.
+A Standards Track JEP defines one of the following:
+An Informational JEP defines one of the following:
+An Historical JEP documents a protocol that was developed before the JEP process was instituted, but that is still in use within the Jabber/XMPP developer community; such a JEP may or may not be obsoleted by a Standards Track JEP, or upgraded to Standards Track.
+A Humorous JEP attempts to be funny by defining a protocol that would never be used in the real world; such JEPs are usually published on April 1 and automatically have a status of Active.
+A Procedural JEP defines a process or activity to be followed by the JSF, including JIG charters as specified by &jep0002;.
+The JSF welcomes and encourages the submission of protocols to the JSF's standards process.
Note well that JEP authors must transfer ownership of their protocols (but not implementations thereof) to the JSF. Refer to the &JSFIPR; for details. JEP authors must make sure that they have read, understood, and agreed to the JSF IPR Policy before submitting a proposal to the JEP Editor!
+All proposals submitted to the JSF for consideration as JEPs must contain the following information:
+Legal Notice -- the legal notice must be exactly that which is specified in the JSF IPR Policy
Author Information -- first name, last name, email address, and Jabber ID are all required and must be provided for all authors
Finally, Standards Track, Informational, and Historical JEPs must conform to &rfc2119; in the use of terminology regarding requirements levels.
+The approving body for almost all JEPs is the Jabber Council; therefore, in order to be published as a JEP, a proposal must first be accepted by the Jabber Council (the only exceptions are certain kinds of Procedural JEPs, for which the approving body may be the JSF Board of Directors and which may be accepted for publication by the JEP Editor in consultation with the Board). Upon receiving a proposal, the JEP Editor shall do the following:
+If no member of the Jabber Council objects to publication of the proposal within seven (7) days or at the next meeting of the Council, the JEP Editor shall accept it as a JEP. If objections are raised by the Council on the Standards-JIG list or in its meeting, the JEP author is encouraged to address the feedback of the Council and to submit a revised version of the proposal and/or confer with the JEP Editor or objecting Council member(s) regarding how to proceed.
+If the proposal is accepted as a JEP, the JEP Editor shall do the following:
+Note well that no special criteria (other than acceptance by the Jabber Council and minimal formatting compliance) need to be met in order for a JEP to be granted a status of Experimental. The granting of Experimental status must not be construed as indicating any level of approval by the JSF, the Jabber Council, or the Jabber/XMPP developer community. Implementation of Experimental JEPs is encouraged in an exploratory fashion (e.g., in a proof of concept) in order to gain experience with and iteratively improve the protocol defined therein, but such implementations may not be appropriate for deployment in production systems.
+Once a JEP is published, it becomes available for public discussion within the Standards JIG and the broader Jabber/XMPP developer community. The JEP author is responsible for collecting feedback from the Jabber/XMPP developer community during the life of the JEP and for incorporating such feedback into the proposal. In order to fully participate in discussion of the proposal, the JEP author should be subscribed to the Standards-JIG list, which is the primary venue for discussion of JEPs. Changes made based on feedback received by the JEP author must be captured in updated versions of the JEP (e.g., 0.2 after 0.1), each of which must be put under source control and subsequently published and announced by the JEP Editor.
+If an Experimental JEP is inactive (i.e., no updated versions are published) for a period of six (6) months, the JEP Editor shall automatically change the status of the JEP to Deferred unless it is in the queue of JEPs under active consideration for advancement by the Jabber Council; upon submission of an updated version, the JEP Editor shall change the status back to Experimental.
+Before an Experimental JEP may be proposed to the Jabber Council for advancement to Draft (Standards Track JEPs) or Active (Historical, Informational, and Procedural JEPs), the Jabber Council must agree that the JEP is ready to be considered for advancement. Once the Council so agrees, it shall instruct the JEP Editor to (1) change the status of the JEP from Experimental to Proposed and (2) issue a Last Call for open discussion on the Standards JIG list. The Last Call shall expire not less than 10 days after the date of issue.
+Once the consensus of the Standards JIG has been incorporated into the JEP and all issues of substance raised during the Last Call have been addressed by the JEP author, the JEP Editor shall formally propose a specific revision of the JEP to the Jabber Council for its vote. If necessary, the JEP Editor may, at his discretion and in consultation with the Jabber Council, extend the Last Call or issue a new Last Call if the JEP requires further discussion.
+Last Calls regarding Procedural JEPs for which the approving body is the JSF Board of Directors may be issued directly by the JEP Editor once instructed by the Board.
+After a JEP has been proposed to the Jabber Council, any change in its status shall be determined by a vote of the Jabber Council. All members of the Council must vote, with the possible values being +1 (approve), 0 (neutral), or -1 (disapprove, with reasons). A JEP shall not be advanced to the next stage in the approval process so long as any Council Member continues to vote -1; that Council Member's written concerns must be addressed in order for the JEP to advance. A majority of Council members must vote +1 in order for a JEP to advance. (Additional voting policies, such as voting periods and defaults if a member does not vote, may be set by the Jabber Council.) A vote of the Jabber Council is final and binding, although a JEP author is free to address the concerns of the Council and to resubmit the JEP for future consideration.
+If the Jabber Council does not complete voting on a JEP before the end of its term, the JEP Editor shall issue a new Last Call on the Standards JIG list and the newly-elected Council shall vote anew on the JEP after completion of the Last Call. This provides an opportunity for any member of the previous Council who had voted -1 to voice his or her concerns in a public forum before the new Council votes on the JEP.
+A vote of the Jabber Council applies only to the specific revision of the JEP that has been presented to it. Further revisions may need to be re-submitted for approval.
+Any change in the status of a JEP must be announced on the Standards-JIG list by the JEP Editor. If a JEP advances to a status of Final, it shall be so announced and also published as one of the official JSF protocols
Approval of Procedural JEPs for which the approving body is the JSF Board of Directors shall occur upon approval by the Board in accordance with the rules defined in the &BYLAWS;.
+More detailed information about the approval process is provided below, including criteria for Standards Track JEPs and for Historical, Informational, and Procedural JEPs.
+The possible states for a Standards Track JEP are as follows:
+
+
+ +--> Retracted
+ |
+ |
+ +--> Deferred +--> Rejected
+ | |
+ | |
+Experimental ----> Proposed ----> Draft ----> Final
+ | |
+ | |
+ +-----------+---> Deprecated ---> Obsolete
+
+ The ideal path is for a Standards Track JEP is to be advanced by the Jabber Council from Proposed to Draft to Final (the criteria for this advancement are described in the following paragraphs). However, an Experimental JEP shall be assigned a status of Deferred if it has not been updated in six (6) months (e.g., because of a lack of interest or because it depends on other specifications that have yet to move forward). In addition, rather than being advanced from Proposed to Draft, a Standards Track JEP may be voted to a status of Rejected if the Jabber Council deems it unacceptable. (Note that if a JEP is Deferred, the JEP Editor may at some point re-assign it to Experimental status, and that, even if a JEP is Rejected, it is retained in source control and on the Jabber Software Foundation website for future reference.) Finally, a JEP author may voluntarily remove an Experimental JEP from further consideration, resulting in a status of Retracted.
+In order for a Standards Track JEP to advance from Proposed to Draft, it must:
+Elevation to Draft status (version 1.0) is a major advancement for the JEP, indicating a strong sense on the part of the Jabber Council and Jabber/XMPP developer community that the specification will be of lasting value. Since a Draft standard must be well-understood and must be known to be reasonably stable, it is relatively safe to use it as the basis for implementations and production deployments. However, note that because a Draft standard may still require additional field experience and may be subject to change based on such experience, mission-critical or large-scale implementations of the Draft standard may not be advisable (although every effort shall be made to ensure that any changes to a Draft JEP will be backwards-compatible with the 1.0 version). Note also that any changes to a Draft JEP must be provisionally published at <http://www.jabber.org/jeps/tmp/>, announced on the Standards-JIG mailing list, and formally approved by the Jabber Council before being officially published at the canonical URL for the JEP.
+In order for a JEP to advance from Draft status to Final status (version 2.0), it must be shown to be stable and well-received by the Jabber/XMPP developer community. Before presenting a Draft standard to the Jabber Council for consideration as a Final standard, the JEP Editor shall issue a Call for Experience on the Standards-JIG list so that feedback can be gathered from those who have implemented the Draft standard (the Call for Experience shall expire not less than 14 days after the date of issue, and shall not be issued until at least 60 days have passed since advancement to Draft). In addition, at least two implementations of the JEP must exist, at least one of which must be free software (in accordance with the &GPL; or &LGPL;) or open-source software (in accordance with the definition provided by &OSI;). Until two implementations are produced, a Standards Track JEP shall retain a status of Draft. Once (1) two implementations have been presented to the Jabber Council, (2) feedback provided during the Call for Experience has been incorporated into the JEP, and (3) the JEP has been fully checked for accuracy, the status of the JEP may be changed to Final upon a vote of the Council.
+Finally, a Standards Track JEP that has been granted a status of Final may be superseded by a future JEP approved by the Jabber Council. In such cases, the status of the earlier JEP shall be changed to Deprecated, possibly with an expiration date assigned by the Jabber Council (see the Expiration Dates section below). After a reasonable period of time or upon the passing of the expiration date, the status of the JEP shall be changed to Obsolete.
+The possible states for a Historical, Informational, or Procedural JEP are as follows:
+
+
+ +--> Retracted
+ |
+ |
+ +--> Deferred +--> Rejected
+ | |
+ | |
+Experimental ----> Proposed ----> Active
+ |
+ |
+ +--> Deprecated --> Obsolete
+
+ Because such JEPs do not seek to define standard protocols, in general they are less controversial and tend to proceed from Proposed to Active without controversy on a vote of the Jabber Council. However, some of these JEPs may be remanded from the Council to the JEP author and/or JEP Editor for revision in order to be suitable for advancement from Proposed to Active (e.g., documentation of protocols in use must be accurate and describe any existing security concerns). As with Standards Track JEPs, the JEP author may retract such a JEP when it is Experimental, and the Council may reject such a JEP when it is Proposed.
+Once approved, Historical, Informational, and Procedural JEPs will have a status of Active. Such a JEP may be replaced by a new JEP on the same or a similar topic, thus rendering the earlier JEP out of date; in such cases, the earlier JEP shall be assigned a status of Deprecated (and eventually Obsolete) with a note specifying the superseding JEP.
+The Jabber Council may, at its discretion, decide to convert an Historical JEP into a Standards Track JEP if the protocol defined in the JEP has been in long use, is deemed stable and uncontroversial, and is unlikely to be superseded by a newer protocol. The Historical JEP shall be treated in the same way as a Standards Track JEP that has a status of Experimental, beginning with the Proposal Process. If after the Last Call and voting by the Jabber Council the JEP is approved for advancement on the standards track, its type shall be changed to Standards Track and its status shall be changed to Draft.
+The possible states for a JEP are summarized in the following sections.
+A JEP of any type is in the Experimental state after it has been accepted by the Jabber Council and published by the Jabber Software Foundation but before it has advanced within the standards process to a state of Active or Draft.
+A JEP of any type is in the Proposed state while it is in Last Call or under consideration by the Jabber Council for advancement from Experimental to Draft or Active.
+A Standards Track JEP is in the Draft state after it has undergone extensive discussion and technical review on the Standards-JIG list and has been voted forward on the standards track by the Jabber Council.
+A Standards Track JEP is in the Final state after it has been in the Draft state for at least 60 days, has been implemented in at least two separate codebases, and has been voted forward on the standards track by the Jabber Council.
+A JEP of any type other than Standards Track is advanced to a status of Active after it has been voted forward from Experimental by the Jabber Council.
+An Experimental JEP of any type is changed to the Deferred state if it has not been updated in six (6) months.
+A JEP of any type is in the Retracted state if the authors have asked the JEP Editor to remove the JEP from further consideration in the JSF's standards process.
+A JEP of any type is in the Rejected state if the Jabber Council has deemed it unacceptable and has voted to not move it forward within the standards process.
+A JEP of any type is in the Deprecated state if the Jabber Council has determined that the protocol defined therein is out of date and that new implementations are no longer encouraged (e.g., because it has been superseded by a more modern protocol).
+A JEP of any type is changed from Deprecated to Obsolete if the Jabber Council has determined that the protocol defined therein should no longer be implemented or deployed.
+Sometimes it is necessary to modify JEPs that have received final approval by the Jabber Council or JSF Board of Directors (e.g., to correct errors, incorporate the lessons of experience, or document new security concerns). This section describes the process for doing so with regard to Standards Track JEPs that have achieved a status of Final and Historical, Informational, and Procedural JEPs that have achieved a status of Active.
+With regard to Standards Track JEPs, the Jabber Software Foundation (in particular, the Jabber Council) strives to ensure that such JEPs are accurate, complete, and stable before advancing them to a status of Final (corresponding to document version 2.0 of the JEP). The Call for Experience and discussion within the Standards JIG help to ensure this result, but final responsibility rests with the Jabber Council. Despite the best efforts of all concerned, errors are sometimes discovered in Final JEPs (the individual who discovers such an error should inform the Council via the Standards-JIG mailing list or communicate directly with the JEP Editor). Whereas other standards development organizations may issue errata while leaving the specification itself unchanged, the JSF makes changes to the Final JEP and publishes a revised document version (e.g., version 2.1). In general the changes are made by the JEP Editor or JEP author in consultation with the Jabber Council, discussed within the Standards JIG if appropriate, and agreed upon by the full Jabber Council. Upon agreement regarding the exact changes, the Jabber Council shall instruct the JEP Editor to publish a revised version of the JEP and announce the existence of the revised version through the normal channels (e.g., on the JSF website and to the Standards-JIG list). Naturally, if members of the Jabber/XMPP developer community have concerns regarding the changes made, they are free to discuss the matter in the relevant forum (usually the Standards-JIG list) before or after the revised version has been published.
+The process is similar with regard to Historical and Informational JEPs that have achieved a status of Active (corresponding to document version 1.0 of the JEP): the Jabber Council agrees on the exact changes to be made and instructs the JEP Editor to publish and announce a revised version (e.g., version 1.1). Here again the Jabber Council bears responsibility for any changes and public discussion is welcome.
+Procedural JEPs may be modified more frequently as the Jabber Software Foundation gains experience with the processes defined therein. For example, JEP-0001 is modified periodically in order to document processes previously not made explicit or to modify existing processes based on experience with the JEP process; similar changes are sometimes made to the &jep0053; JEP and to various JIG-related JEPs. Changes to these JEPs are discussed by the Jabber Council, JSF Board of Directors, JSF membership, and Standards JIG as appropriate, and exact changes are agreed to by the relevant approving body (Jabber Council or JSF Board of Directors). The approving body then instructs the JEP Editor to publish and announce the revised version as described above.
+In rare cases, a protocol enhancement may be accepted as an interim solution, especially when it is recognized that expected future improvements in technology or the underlying Jabber/XMPP protocols will make possible a much better solution to the problem at hand (e.g., a better protocol for user avatars may be contingent upon the development of a robust protocol for publish/subscribe functionality). In such cases, a JEP may be approved provisionally and be assigned an expiration date.
+The exact form of such an expiration date shall be left up to the discretion of the Jabber Council. However, the preferred form is to assign an expiration date of six (6) months in the future, at which time the Jabber Council must re-affirm the status of the JEP and, if desired, extend the expiration date for another six (6) months. While this process may continue indefinitely (although that is unlikely), it has the virtue of forcing the Jabber Council and Jabber/XMPP developer community to re-examine the provisional protocol on a fairly regular basis in the light of technological changes. Alternatively, a JEP may be assigned a "soft" expiration date: that is, the JEP will expire when an expected future protocol comes into existence, whenever that may be. In either case, the status of the JEP shall be changed to Deprecated when it expires.
+In addition, an expiration date may be assigned when the status of a JEP is changed from Final (or, potentially, Draft) to Deprecated. In this case, the expiration date applies to the date when the JEP is expected to change from Deprecated to Obsolete. These dates may be flexible; however it is expected that they will follow the same six-month rule as provisional protocol enhancements.
+Every JEP must contain a section entitled "Security Considerations", detailing security concerns or features related to the proposal; in particular, a Standards Track JEP should list the security threats that the protocol addresses and does not address, as well as security issues related to implementation of the protocol. JEP authors should refer to &rfc3552; for helpful information about documenting security considerations and should also confer with the JEP Editor and/or Jabber Council regarding this important task.
+Some JEPs may require interaction with &IANA;. The IANA acts as a clearinghouse to assign and coordinate the use of numerous Internet protocol parameters, such as MIME types and port numbers (e.g., the TCP ports 5222 and 5269 used by the Jabber/XMPP developer community are registered with the IANA). Whether or not a JEP requires registration of parameters with the IANA, that fact must be noted and explained in a distinct section of the JEP entitled "IANA Considerations". Registration with the IANA should not occur until a JEP advances to a status of Draft (Standards Track JEPs) or Active (Informational and Historical JEPs), and should be initiated by the Jabber Registrar in consultation with the JEP author, not by the JEP author directly with the IANA.
+The ®ISTRAR; performs a function similar to the IANA, although limited to the Jabber/XMPP developer community. It does so by reserving protocol namespaces and by uniquely assigning parameters for use in the context of Jabber/XMPP protocols (for example, the categories and types used in &jep0030;).
+Whether or not a JEP requires registration of protocol namespaces or parameters with the Jabber Registrar, that fact must be noted and explained in a distinct section of the JEP entitled "Jabber Registrar Considerations". Such registration should not occur until a JEP advances to a status of Draft (Standards Track JEPs) or Active (Informational and Historical JEPs). Registration of protocol namespaces is initiated by the JEP Editor when a JEP advances to Draft or Active. Registration of particular parameters used within a specification may be initiated by a JEP author within the text of the JEP, or by an implementor of the JEP after it has advanced to Draft or Active. For details regarding the Jabber Registrar and its processes, refer to &jep0053;.
+A JEP may also request that a new registry is to be created by the Jabber Registrar. The JEP author must clearly define the nature of the new registry as well as the process for submitting data to the registry, and must do so in collaboration with the Registrar.
+JEPs that define official JSF protocols must include a schema that conforms to &w3xmlschema1; and &w3xmlschema2;.
+The schema for the JEP format itself is as follows:
+
+
+
+
+
+
+
+
+ This schema defines the document format for Jabber Enhancement
+ Proposals (JEPs). For further information about JEPs, visit:
+
+ http://www.jabber.org/jeps/
+
+ The canonical URL for this schema is:
+
+ http://www.jabber.org/jeps/jep.xsd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+A Jabber Interest Group (JIG) is a working group approved by the Jabber Council to address specific areas of growth or concern within the Jabber community, usually by means of developing and publishing Jabber Enhancements Proposals (JEPs).
+The main function of most JIGs is to produce acceptable enhancements to the Jabber protocol (delivered in the form of Jabber Enhancement Proposals or JEPs
Anyone (not limited to members of the Jabber Software Foundation) may propose the formation of a JIG by completing a Jabber Enhancement Proposal outlining the need for the JIG and its proposed focus. However, JIG leaders must be members of the Jabber Software Foundation. The number of leaders for a JIG is flexible, and shall be determined by each JIG, in consultation with the Jabber Council if necessary. The concept of "membership" with regard to JIGs is loose, and is essentially co-extensive with membership in the appropriate mailing list (each JIG has its own mailing list, which is archived for public review). JIG members do not need to be members of the Jabber Software Foundation, and any member of the general public may subscribe to JIG mailing lists.
+It is expected that all JIGs (other than certain standing JIGs) will remain active for as long as necessary in order to produce one or more standards-track JEPs for review by the Jabber Council in the JIG's area of focus. However, if a JIG does not show signs of activity for an extended period of time (usually six months of inactivity on the JIG's mailing list), the JIG may be disbanded at the discretion of the Jabber Council with appropriate warning to the JIG members (usually in the form of an email sent to the JIG's mailing list).
+Complete direct client-to-client file transfers presents a major problem for clients that are behind a firewall or NAT. Proxy Accept Socket Service (PASS) enables clients to do real-time file transfers via a third party; in addition, it does not limit clients to file transfers but enables any two clients to create a raw TCP socket between them for any purpose, such as VoIP (SIP/RTP), BEEP, or binary game data.
+The first step is to communicate with a PASS service to set it up.
+At this point, the PASS service is now listening on the given IP and port for incoming connections on behalf of the Jabber Entity. The provided IP and port can now be sent to any other entity as a connection point, for file transfers or any other use.
+The default behavior for the PASS service is to listen on the port forever, unless the requesting client specifies an <expire/> value (in seconds). If the service is not configured with an expire value, it will not timeout the connection, and will start listening on the port again after one of the two sides disconnects.
+Code | +Message | +Cause | +
---|---|---|
502 | +No more ports available. Try again later. | +The PASS service is listening on all of its available ports. | +
When an incoming connection is attempted to that IP and port, the PASS service MUST send an IQ request to the entity on whose behalf it is listening:
+The entity SHOULD now immediately connect to the given proxy IP and port, and upon connection all data written to that socket will be copied to the client connection, and vice-versa. Any disconnect on either side MUST cause a disconnect on the other (initiated by the service). If the IQ set to the entity fails or returns an error, the client socket MUST be dropped as well. The client XML element provides the information about the remote end of the incoming socket.
+Abuse in bandwidth or resources could become an issue, so PASS implementations SHOULD include strict and detailed rate and usage limits, allowing only limited usage by single entities and rate-limiting bandwidth used if necessary for both single connections or overall usage. These limits are implementation-specific.
+A Jabber client can send various controls to the PASS service via the set to control how the PASS service behaves, how the server handles a listening port.
+This tells the server to shut down the port after a specified number of seconds. After the timeout period, the PASS service MUST send an <iq/> to the JID to tell it that the port has been closed down. It notifies the client with:
+This tells the server to listen once, and then close the port. Even if the <expire/> has not been met, the <oneshot/> overrides that and shuts down the listening port. When this happens the server notifies the client with the following packet:
+This tells the server to explicitly shut down a listening port. Useful for when the client shuts down and can tell the PASS service to recycle the port. The server sends back:
+Code | +Message | +Cause | +
---|---|---|
400 | +Missing <proxy/> specification. | +Sent a <close/> w/o a <proxy/> | +
401 | +Port not registered to your JID. | +You did not register this port with the server. | +
404 | +Port not found in registry. | +The <proxy port=''/> was not a defined port. | +
405 | +Proxy IP does not match. | +The IP sent in the <proxy/> does not match the IP of the pass-service | +
The PASS protocol can be used for clients to talk to each other and find out information about each other. When a client wants to send a file to another client, it can use the jabber:iq:pass namespace to query the IP address of the other client. For example:
+You send the other client:
+The other client SHOULD send back:
+Obviously the port is not going to be known, but the IP address will let you authenticate the JID via the PASS service since the PASS service tells you the <client/> information upon a connection.
+When a server gets an Incoming Connection notification the client has the right to deny that connection based on the <client/> information that it receives. It can return an error to the PASS service specifying the <proxy/> port and hangup on the active <client/> connection and start listening again. This does not affect the <oneshot/> control. For example:
+The PASS service sends you:
+Your client would send back:
+Code | +Message | +Cause | +
---|---|---|
401 | +Unauthorized | +The incoming <client/> does not match the <client/> from the client you want to exchange data with. | +
This JEP requires no interaction with &IANA;.
+No action on the part of the ®ISTRAR; is necessary as a result of this JEP, since 'jabber:iq:pass' is already a registered protocol namespace.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0003: http://www.jabber.org/jeps/jep-0003.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+Several existing Jabber/XMPP protocols involve the exchange of structured data between users and applications for common tasks such as registration (&jep0077;) and searching (&jep0055;). Unfortunately, these early protocols were "hard coded" and thus place significant restrictions on the range of information that can be exchanged. Furthermore, other protocols (e.g., &jep0045;) may need to exchange data for purposes such as configuration, but the configuration options may differ depending on the specific implementation or deployment. Finally, developers may want to extend other protocols (e.g., &jep0030;) in a flexible manner in order to provide information that is not defined in the base protocol. In all of these cases, it would be helpful to use a generic data description format that can be used for dynamic forms generation and data "modelling" in a variety of circumstances.
+An example may be helpful. Let us imagine that when a user creates a multi-user chatroom on a text conferencing service, the service allows the user to configure the room in various ways. While most implementations will probably provide a somewhat common set of configurable features (discussion logging, maximum number of room occupants, etc.), there will be some divergence: perhaps one implementation will enable archiving of the room log in a variety of file types (XML, HTML, PDF, etc.) and for a variety of time periods (hourly, daily, weekly, etc.), whereas another implementation may present a boolean on/off choice of logging in only one format (e.g., daily logs saved in HTML). Obviously, the first implementation will have more configuration options than the second implementation. Rather than "hard-coding" every option via distinct XML elements (e.g., <room_logging_period/>), a better design would involve a more flexible format.
+The 'jabber:x:data' protocol described herein defines such a flexible format for use by Jabber/XMPP entities, steering a middle course between the simplicity of "name-value" pairs and the complexity of &w3xforms; (on which development had just begun when this protocol was designed). In many ways, 'jabber:x:data' is similar to the Forms Module of &w3xhtml;; however, it provides several Jabber-specific data types, enables applications to require data fields, integrates more naturally into the "workflow" semantics of IQ stanzas, and can be included as an extension of existing Jabber/XMPP protocols in ways that the XHTML Forms Module could not when this protocol was developed (especially because &w3xhtmlmod; did not exist at that time).
+This JEP addresses the following requirements:
+The base syntax for the 'jabber:x:data' namespace is as follows (a formal description can be found in the XML Schema section below):
+
+
+
+
+
+
+ field-value
+
+
+
+
+ ]]>
+ The &X; element qualified by the 'jabber:x:data' namespace SHOULD be included as a first-level child of an XML stanza; the stanza MAY be of any kind (&IQ;, &MESSAGE;, or &PRESENCE;), although it is RECOMMENDED to use &IQ; or &MESSAGE; (see also the restrictions enumerated below).
+The OPTIONAL <title/> and <instructions/> elements enable the form-processing entity to label the form as a whole and specify natural-language instructions to be followed by the form-submitting entity. The XML character data for these elements SHOULD NOT contain newlines (the \n and \r characters), and any handling of newlines (e.g., presentation in a user interface) is unspecified herein; however, multiple instances of the <instructions/> element MAY be included.
+The data gathered or provided in a 'jabber:x:data' form can be situated in a number of different contexts. Examples include an empty form that needs to be filled out, a completed form, the results of a submission, a search result, or simply a set of data that is encapsulated using the 'jabber:x:data' namespace. The full context for the data is provided by three things:
+The first two pieces of contextual information are provided by other protocols, whereas the form types are described in the following table.
+Type | +Description | +
---|---|
form | +The form-processing entity is asking the form-submitting entity to complete a form. | +
submit | +The form-submitting entity is submitting data to the form-processing entity. | +
cancel | +The form-submitting entity has cancelled submission of data to the form-processing entity. | +
result | +The form-processing entity is returning data (e.g., search results) to the form-submitting entity, or the data is a generic data set. | +
In order to maintain the context of the data as captured in the form type, the following rules MUST be observed:
+For &IQ; stanzas, the root element qualified by the "wrapper" namespace in a form of type "form" or "submit" MUST be returned in a form of type "result". The &X; element qualified by the 'jabber:x:data' namespace MUST be a child of the "wrapper" namespace's root element. As defined in &xmppcore;, the 'id' attribute MUST be copied in the IQ result. For data forms of type "form" or "result", the &IQ; stanza SHOULD be of type "result". For data forms of type "submit" or "cancel", the &IQ; stanza SHOULD be of type "set".
For &MESSAGE; stanzas, the <thread/> SHOULD be copied in the reply if provided. The &X; element qualified by the 'jabber:x:data' namespace MUST be a child of the &MESSAGE; stanza.
The only data form type allowed for <presence/> stanzas is "result". The &X; element qualified by the 'jabber:x:data' namespace MUST be a child of the &PRESENCE; stanza. In accordance with XMPP Core, use of data forms is not recommended unless necessary to provide information that is directly related to an entity's network availability.
A data form of type "form", "submit", or "result" SHOULD contain at least one <field/> element; a data form of type "cancel" SHOULD NOT contain any <field/> elements.
+The <field/> element MAY contain any of the following child elements:
+<desc/> -- The XML character data of this element provides a natural-language description of the field, intended for presentation in a user-agent (e.g., as a "tool-tip", help button, or explanatory text provided near the field). The <desc/> element SHOULD NOT contain newlines (the \n and \r characters), since layout is the responsibility of a user agent, and any handling of newlines (e.g., presentation in a user interface) is unspecified herein. (Note: To provide a description of a field, it is RECOMMENDED to use a <desc/> element rather than a separate <field/> element of type "fixed".)
<required/> -- This element, which MUST be empty, flags the field as required in order for the form to be considered valid.
<value/> -- The XML character data of this element defines the default value for the field (according to the form-processing entity), the data provided by a form-submitting entity, or a data result. In data forms of type "form", if the form-processing entity provides a default value via the <value/> element, then the form-submitting entity SHOULD NOT attempt to enforce a different default value (although it MAY do so to respect user preferences or anticipate expected user input). Fields of type list-multi, jid-multi, text-multi, and hidden MAY contain more than one <value/> element; all other field types MUST NOT contain more than one <value/> element.
<option/> -- One of the options in a field of type "list-single" or "list-multi". The XML character of the <value/> child defines the option value, and the 'label' attribute defines a human-readable name for the option. The <option/> element MUST contain one and only one <value/> child. If the field is not of type "list-single" or "list-multi", it MUST NOT contain an <option/> element.
If the <field/> element type is anything other than "fixed" (see below), it MUST possess a 'var' attribute that uniquely identifies the field in the context of the form (if it is "fixed", it MAY possess a 'var' attribute). The <field/> element MAY possess a 'label' attribute that defines a human-readable name for the field. For data forms of type "form", each <field/> element SHOULD possess a 'type' attribute that defines the data "type" of the field data (if no 'type' is specified, the default is "text-single"); fields provided in the context of other forms types MAY possess a 'type' attribute as well.
+If fields are presented in a user interface (e.g., as items in a questionnaire or form result), the order of the field elements in the XML SHOULD determine the order of items presented to the user.
+The following field types represent data "types" that are commonly exchanged between Jabber/XMPP entities. These field types are not intended to be as comprehensive as the datatypes defined in, for example, &w3xmlschema2;, nor do they define user interface elements.
+Type | +Description | +
---|---|
boolean | +The field enables an entity to gather or provide an either-or choice between two options. The default value is "false". &BOOLEANNOTE; | +
fixed | +The field is intended for data description (e.g., human-readable text such as "section" headers) rather than data gathering or provision. The <value/> child SHOULD NOT contain newlines (the \n and \r characters); instead an application SHOULD generate multiple fixed fields, each with one <value/> child. | +
hidden | +The field is not shown to the form-submitting entity, but instead is returned with the form. | +
jid-multi * | +The field enables an entity to gather or provide multiple Jabber IDs. | +
jid-single * | +The field enables an entity to gather or provide a single Jabber ID. | +
list-multi | +The field enables an entity to gather or provide one or more options from among many. | +
list-single | +The field enables an entity to gather or provide one option from among many. | +
text-multi ** | +The field enables an entity to gather or provide multiple lines of text. | +
text-private | +The field enables an entity to gather or provide a single line or word of text, which shall be obscured in an interface (e.g., *****). | +
text-single | +The field enables an entity to gather or provide a single line or word of text, which may be shown in an interface. This field type is the default and MUST be assumed if a form-submitting entity receives a field type it does not understand. | +
* Note: Data provided for fields of type "jid-single" or "jid-multi" MUST contain one or more valid Jabber IDs, where validity is determined by the addressing rules defined in XMPP Core (see the Data Validation section below).
+** Note: Data provided for fields of type "text-multi" SHOULD NOT contain any newlines (the \n and \r characters). Instead, the application SHOULD split the data into multiple strings (based on the newlines inserted by the platform), then specify each string as the XML character data of a distinct <value/> element. Similarly, an application that receives multiple <value/> elements for a field of type "text-multi" SHOULD merge the XML character data of the value elements into one text block for presentation to a user, with each string separated by a newline character as appropriate for that platform.
+In some contexts (e.g., the results of a search request), it may be necessary to communicate multiple items. Therefore, a data form of type "result" MAY contain two child elements not described in the basic syntax above: one <reported/> element followed by zero or more <item/> elements. The syntax is as follows:
+
+
+
+
+ -
+
+ field-value
+
+
+ -
+
+ field-value
+
+
+ .
+ .
+ .
+
+ ]]>
+ Each of these elements MUST contain one or more <field/> children. The <reported/> element defines the data format for the result items by specifying the fields to be expected for each item; for this reason, the <field/> elements SHOULD possess a 'type' attribute and 'label' attribute in addition to the 'var' attribute, and SHOULD NOT contain a <value/> element. Each <item/> element defines one item in the result set, and MUST contain each field specified in the <reported/> element (although the XML character data of the <value/> element MAY be null).
+Data validation is the responsibility of the form-processing entity (commonly a server, service, or bot) rather than the form-submitting entity (commonly a client controlled by a human user). This helps to meet the requirement for keeping client implementations simple. If the form-processing entity determines that the data provided is not valid, it SHOULD return a "Not Acceptable" error, optionally providing a textual explanation in the XMPP <text/> element or an application-specific child element that identifies the problem (see &jep0086; for information about mappings and formats).
+For the sake of the following examples, let us suppose that there exists a bot hosting service on the Jabber network, located at <botster.shakespeare.lit>. This service enables registered users to create and configure new bots, find and interact with existing bots, and so on. We will assume that these interactions occur using the &jep0050; protocol, which is used as a "wrapper" protocol for data forms qualified by the 'jabber:x:data' namespace. The examples in the sections that follow show most of the features of the data forms protocol described above.
+Note: Additional examples can be found in the specifications for various using protocols, such as JEP-0045: Multi-User Chat and JEP-0055: Jabber Search.
+The first step is for a user to create a new bot on the hosting service. We will assume that this is done by sending a "create" command to the desired bot:
+The hosting service then returns a data form to the user:
+The user then submits the configuration form:
+The service then returns the results to the user:
+Now that the user has created this search bot, let us suppose that one of the friends he has invited decides to try it out by sending a search request:
+There are no security concerns related to this specification above and beyond those described in the relevant section of XMPP Core.
+This JEP requires no interaction with &IANA;.
+The ®ISTRAR; includes the 'jabber:x:data' namespace in its registry of protocol namespaces.
+The Jabber Registrar maintains a registry of parameter values related to the 'jabber:x:data' namespace, specifically as defined in &jep0068;; the registry is located at <http://www.jabber.org/registrar/formtypes.html>.
+This schema is descriptive, not normative.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0004: http://www.jabber.org/jeps/jep-0004.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ When contained in a "reported" element, the "field" element
+ SHOULD NOT contain a "value" child.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+The following protocol changes were incorporated in the Final specification as a result of experience with the Draft specification (described in version 1.0 of this document):
+Determine standards for implementing derivative trademarks (e.g., "100% Jabber Protocol Compliant") and test software and services for compliance.
+Resolve issues around using the jabber:*:oob namespaces, and explore extending them to support additional requirements for managing multimedia streams (SIP). +Create additional protocols and methods to assist exchanging OOB data in heterogeneous environments where direct connections are not possible (PASS).
+Focusing on authentication, message encryption, connection security, etc.
+To define a new namespace for dynamic forms. Minimally to supplant jabber:iq:register and jabber:iq:search.
+Will determine the protocol for sending and receiving formatted messages in Jabber (XHTML-Basic)
+The replacement for agents, including extensible directory lookups and namespace feature negotiation. Defined as a draft protocol but needs additional work.
+Describe in detail how presence management currently works, and work on proposals for things like invisibility.
+Although popular, the vCard spec is too inflexible and limited. These problems become apparent when a User wants to set information outside the scope of the vCard in a standard format others will know is there. The so called 'IQ-Set' in custom namespaces is not sufficient because set information is often not in a standard format that others recognize or support. A short list of problems with vCard:
+But instead of bringing down the entire customization of the 'IQ-Set' to only pre-defined schemas, it is important to keep the flexibility and power of it.
+Therefore, we propose that Jabber needs a very flexible, extensible, and powerful information structure and retrieval system. There exist four aspects to solve for when designing an improved information storage and retrieval system for any platform, especially Jabber: Interface, Structure, Storage, and Gate.
+Interface is the process, steps, and protocol a Service has to go through to access the information with the User's approval, for the User to approve or reject the access, and the User's Server to manage and secure it all.
+Although it will be part of the Jabber protocol, it is still undecided how heavily the Profiles specification will rely on and use the Jabber system. This is the first thing that will have to be decided on, but thankfully there are some plans we have already outlined as possibilities, listed at the Theoretic Identity website.
+Structure is the format that the information will be stored in and accessed by. It will have to be very flexible, likely eventually allowing the User to specify the info-sets they want to use instead of having them all set by this project.
+The personal information will be stored in XML documents or info-sets, called 'Profiles', possibly making use of RDF, and usually following Schema specifications, although that should not be a requirement.
+Storage is describing and accessing the physical location where the Profiles are kept. It will likely start off being only the Jabber Server, but will eventually allow for remote (specialized network hard drive services) and local (on the User's local machine or a portable floppy) storage. It also describes how this data will be transferred between computers and networks in an efficient and secure manner.
+This will likely be the most other-JIG dependent part of the system, since we will have to make heavy use of encryption in Jabber, and likely file transfers. So we may want to help out those related JIGs when we get to this point to make sure their results can be used by this system.
+Gate gives the User complete control at all times of others' access to and power over their Profiles. Since this system is designed to hold the bulk, if not all, of a User's personal information, they *must* have a powerful way to prevent unwanted others to access their data. So there must exist a powerful access regulation framework to precisely control which, when, and how other parties can get this information.
+Since we want this kept flexible and very secure, the techniques used in this system will likely be a new Jabber server module that receives special 'jabber:profiles' namespaces, compares the sending JID to a User-stored list of permission-granted JIDs, and acts upon the message accordingly, either following through or rejecting the requested transfer of information.
+To make sure this project progresses smoothly and orderly, it has been decided it will be split up into steps, or 'Phases'. Each of the above four aspects will be split into two to four Phases, and the Road-map for the entire project will follow along these Phases. Version 1.0 of the Profiles system will be little more than an expanded vCard schema with simple rules and permissions to regulate access to it. It will progress up to Version 4.0 or 5.0, adding in advanced verification to persuade Services to use a User's Jabber Profiles instead of forcing them to set up a local account, and also adding write permissions so Services can set receipts of purchases and similar information in a User's Account.
+This Road-map will be produced soon after the JIG is set up, and will give a good feature list and time-line to follow.
+Such an improved system would obviously provide for more types of information storage and management, but there are some other side-benefits that can be conceived of.
+Eventually we would like this Profiles specification to completely replace the strict vCard schema that is 'hard-coded' into the protocol. We do not expect vCard to disappear from Jabber at all, simply be one possible Profile among many in a User's Account. At the end of this JIGs existence, we would like to see it integrate the Profiles and special 'jabber:profiles' namespaces fully into the rest of the Jabber protocol, having it become the method by which all User information (such as Roster, client-side preferences, and filters) is stored and retrieved.
+It is important to note that this JIG will not be a stand-alone JIG. It will draw upon many other JIGs (that currently exist and that have yet to be created). It will need encryption from the Security JIG for safe transfer of the information, a versatile forms format from the Forms JIG for Profiles administration, and advanced authentication from a future JIG for Services to authenticate the User against their Jabber account.
+The concept of Jabber Profiles was started by Eric Murphy and Mike Hearn. They both had begun to come up with similar ideas, but did not meet and exchange ideas until around early 2001. Adam Theo also came across them soon after that, and after some discussion, the three authors of this JEP agreed to start a serious effort on developing it. We started it as a project at Theoretic Solutions (http://www.theoretic.com/identity/), although at that time it was as a full-fledged identity specification, complete with Profiles, Authentication, and Trust. It was not until we have now moved to set it up as an official JIG that we have split the individual parts up, to make it easier to develop.
+The following proposal is for the formation of a Jabber Interest Group that will create a new conferencing protocol, as well as create additional functionality and standardize communications on top of said conferencing protocol.
+The initial task of the Conferencing JIG will be to propose a Jabber Conferencing specification that will solve various problems which exist in the current "groupchat" specification. This specification is meant to be a foundation for additional functionality; it defines the framework needed to provide additional features, without requiring changes to the framework specification itself. There is also to be a certain amount of feature-negotiation included; the conferencing service can define what features can be declared for a room, both as optional and required client features for room participation.
+The framework's scope consists of the following minimum functionality:
+In addition to these basic functions, we can imagine numerous different types of conferencing features; for example, hidden rooms created on the fly for discussions between a Jabber user and their friends or co-workers, transports providing access to similar foreign systems such as IRC, additional client functionality such as shared-location (URL/Co-browsing) and whiteboarding, and so on. There might also be requirements for security levels (for instance, normal participant, moderator, and room admin). Additional information may also be conveyed to users about one another, such as a user's real Jabber ID. Room entry or participation within a discussion might also have restrictions on some systems.
+The framework protocol is meant to provide a basis for designing these additional features. Some features, such as co-browsing, could be implemented entirely client-side; others may require significant logic within the conferencing implementation. In addition, some features may be optional for participation within a room, while other features could be required in order for a client to participate within a room.
+While the current "groupchat" specification is rather simple to implement, it is rather inflexible and cannot easily be extended; specifically, it has the following disadvantages:
+This new conferencing protocol will be designed to solve these problems.
+Because of the prevalence of the existing "groupchat" specification for multi-user chats, a long conversion process is anticipated. A server implementation which supports both protocols will simply not allow "groupchat"-only clients to participate in rooms with required features.
+As listed above, there is a fairly large number of features that could be developed on top of a well-designed framework. The Conferencing JIG will first be established to develop a framework, with features mainly being compared against the framework for feasibility of implementation. After a proposal has been formalized as a specification, the JIG will become a group for discussing and proposing new features, and for formally specifying those features.
+Many communication applications now allow for the association of a small image or buddy icon (avatar) with a user of that application. The avatar is not intended to be a defining portrait of the user, but rather a simple expression of the user's appearance, mood, status, and the like. This proposal outlines a way to incorporate avatars into the current Jabber platform.
+Certain restrictions are placed upon the image. First, the image height and width must be between thirty-two (32) and sixty-four (64) pixels. The suggested size is sixty-four (64) pixels high and sixty-four (64) pixels wide
There are two methods of showing that a client has an avatar available:
+Partly because Jabber browsing is relatively undeveloped, this proposal focuses on the first option.
+The <x/> element in the jabber:x:avatar namespace contains a SHA1 hash (hexadecimal, not base64) of the image data itself (not the base64-encoded version) in a <hash/> element. (Because the odds of creating an identical hash are small, the hash is considered unique to the image and can be used to cache images between client sessions, resulting in fewer requests for the image.) The initial announcement of the availability of an avatar is done by sending a presence packet with the jabber:x:avatar information, as follows:
+If the avatar-generating user changes the avatar, a new presence packet is sent out with the updated information:
+To disable the avatar, the avatar-generating user's client will send a presence packet with the jabber:x:avatar namespace but with no hash information:
+Clients should send the current avatar hash in every <presence/> packet even if the avatar has not changed. Remember that other clients logging in will receive a copy of the most recent <presence/> element, which should therefore always contain the most recent avatar hash. However, if the client's connection is lost unexpectedly or the client disconnects without sending an unavailable presence, the server will send other clients a <presence/> element containing no jabber:x:avatar extension. Therefore if, after receiving one or more presence packets containing jabber:x:avatar information, an avatar-receiving client receives a presence packet that does not include the jabber:x:avatar namespace, it is recommended that the client save the avatar image until the next set of information is received. In this case the avatar-generating client might send something as simple as the following:
+There are two methods for retrieving the actual avatar data:
+The first of these methods is preferred. On this model, a query is sent directly to the avatar-generating client using an <iq/> element of type "get" in the jabber:iq:avatar namespace
The avatar-generating client will reply with an <iq/> element of type "result" in the jabber:iq:avatar namespace; this reply will contain a query element that in turn contains a <data/> element with the MIME type in the 'mimetype' attribute and the data base64-encoded in the body of the <data/> element:
+If the first method fails, the second method that should be attempted by sending a request to the server for the avatar-generating user's public XML containing the avatar data. This data is to be stored in the storage:client:avatar namespace. This method presumes that the avatar-generating client has already stored its avatar data on the server:
+Once such data has been set, the avatar can be retrieved by any requesting client from the avatar-generating client's public XML storage:
+It is acknowledged that sending avatar information within presence packets is less than desirable in many respects (e.g., in network traffic generated); however, there currently exists in Jabber no generic framework for addressing these shortcomings. Possible solutions on the horizon include live browsing and a pub/sub model, but these are still embryonic and experimental. Once something of that nature is accepted by the Council, the avatar spec will be modified to work within that framework rather than by attaching to presence.
+Peter Millard, a co-author of this specification from version 0.1 through version 0.3, died on April 26, 2006.
+&xmlrpc; is a method of encoding RPC requests and responses in XML. The original specification defines HTTP (see &rfc2068;) as the only valid transport for XML-RPC payloads.
+Various initiatives exist already to transport XML-RPC payloads over Jabber. These initiatives were independent of each other and used slightly differing methods (e.g. carrying the payload in a
A working session during JabberCon 2001 resulted in a formalisation of a single method. This JEP describes that method, which is labelled as Jabber-RPC to differentiate it from XML-RPC itself.
+The &IQ; stanza is used to transport XML-RPC payloads. XML-RPC requests are transported using an &IQ; stanza of type "set", and XML-RPC responses are transported using an &IQ; stanza of type "result". An &IQ; stanza MUST NOT contain more than one request or response.
+The &IQ; stanza contains a single &QUERY; sub-element in the jabber:iq:rpc namespace. The direct child of the &QUERY; element will be either a single <methodCall/> element (in the case of a request) or a single <methodResponse/> element (in the case of a response). This child element will contain the XML-RPC payload. Note that the XML declaration that normally appears at the head of an XML-RPC request or response when transported as the payload of an HTTP POST request MUST BE omitted when it is transported via a Jabber &IQ; stanza.
+The encoding of the Jabber XML stream is UTF-8. It is assumed that the encoding of the XML-RPC payload is also UTF-8.
+Application-level errors will be indicated within the XML-RPC payload (as is the case with the traditional HTTP-based XML-RPC mechanism). Transport level errors will be indicated in the normal way for &IQ; stanzas -- namely, by an &IQ; stanza of type "error" and the addition of an <error/> tag as a direct child of the &IQ; stanza. There are no specific XML-RPC-related, transport-level errors.
+If the requesting entity does not have sufficient permissions to perform remote procedure calls, the responding entity MUST return a &forbidden; error:
+If an entity supports the Jabber-RPC protocol, it SHOULD advertise that fact in response to &jep0030; information ("diso#info") requests by returning an identity of "automation/rpc" and a feature of "jabber:iq:rpc":
+An entity that supports Jabber-RPC SHOULD establish a "whitelist" of entities that are allowed to perform remote procedure calls and MUST return a &forbidden; error if entities with insufficient permissions attempt such calls.
+This JEP requires no interaction with &IANA;.
+The ®ISTRAR; includes 'jabber:iq:rpc' in its registry of protocol namespaces.
+The Jabber Registrar includes a Service Discovery type of "rpc" within the "automation" category in its registry of service discovery identities.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0009: http://www.jabber.org/jeps/jep-0009.html
+
+ There is no official XML schema for XML-RPC. The main body
+ of this schema has been borrowed from an unofficial schema
+ representation contained in the book "Processing XML With
+ Java" by Elliotte Rusty Harold, as located at:
+
+ http://www.ibiblio.org/xml/books/xmljava/chapters/ch02s05.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+Jabber is often thought of simply as a system for instant messaging, albeit an open one. However, Jabber technology can be used, and is being used, in applications quite different from simple IM. One of these applications is whiteboarding. In collaborative work, the ability to draw (for example, to design sketches, UML schemas, house architectures, and organizational plans) is essential, as exemplified by the success of real-world whiteboarding applications such as Microsoft NetMeeting. Whiteboarding can also be used for entertainment purposes such as games and quizzes. Because of the value of whiteboarding as an important real-time collaboration tool, other IM services are beginning to offer these capabilities. For these and other reasons, I believe that a good protocol for whiteboarding in Jabber would be of great value.
+There exists today a protocol draft for sending streaming XPM over Jabber
Therefore, the Whiteboard JIG should develop a standard way of handling whiteboards in Jabber and a format for data transfer. This might be based on vector graphics, bitmap data, or a combination of these two. In addition, the protocol should work in the context of both regular messaging and conferencing. The protocol for whiteboarding during conferencing might depend on the new protocol proposal to come from the Conferencing JIG
The Whiteboarding JIG should produce the following deliverables (these deliverables will be presented to the Jabber Council as a JEP):
+A set of requirements that the proposed protocol should fulfill.
+There are today at least four different attempts
One or more data formats for the graphics data, presented both as a description and as a DTD or XML schema.
+The actual protocol for how the graphics data is sent over Jabber. This will also include an analysis of any associated functionality that must be performed by Jabber servers and clients.
+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 using conversational messages or presence. Every JabberID (JID) is a node that can be interacted with via messages, presence, and special purpose IQ namespaces. Some JIDs are parents (such as transports), and often many JIDs have relationships with other JIDs (such as a user to their resources, a server to its services, etc.). We need a better way to structure and manage this culture of multi-namespace JID stew. The answer: Jabber Browsing.
+Note well that implementors are encouraged to implement &jep0030; instead of Jabber Browsing.
+One of the concepts in browsing which helps to extend the interaction between JIDs is a "JID-Type", a simple heirarchy for identifying the role of any JabberID that is similar to the mime-type format. Many programmers are comfortable with the concept of identifying file types by mime-types, which use the format "category/type". A JID-Type, once discovered, is to be used in the same way that a mime-type would be for a file, to alter the user interface representing that JID or provide alternative functionality for interacting with it (either automatically or driven by user interaction). The following categories and types are proposed as the canonical list for the purpose of JID-Types:
+Category | +Type | +Description | +
---|---|---|
application/ | ++ | Specific applications running as a resource on a user@host | +
bot | +Automated conversations | +|
calendar | +Calendaring and scheduling service | +|
editor | +Collaborative editor | +|
fileserver | +Available files | +|
game | +Multi-player game | +|
whiteboard | +Whiteboard tool | +|
conference/ | ++ | Nodes of this category provide multi-user chat facilities (a.k.a. conference rooms). | +
irc | +IRC rooms (note: this enables Jabber users to connect to Internet Relay Chat rooms) | +|
list | +Mailing-list-style conferences | +|
private | +Private, dynamically-generated conference rooms | +|
public | +Public, permanent conference rooms | +|
topic | +Topic-based conferences | +|
url | +Website-hosted conferences | +|
headline/ | ++ | Recognize different sources of headlines, GUI hints | +
logger | +Log messages (usually presented in a scrolling GUI) | +|
notice | +Alerts and warnings (usually presented as popup messages) | +|
rss | +Rich Site Summary syndication | +|
stock | +Stock market information by symbol (ticker) | +|
keyword/ | ++ | Keyword-based lookup services (search engines, etc.) | +
dictionary | +Dictionary lookup service | +|
dns | +DNS resolver | +|
software | +Software search | +|
thesaurus | +Thesaurus lookup service | +|
web | +Web search | +|
whois | +Whois query service | +|
render/ | ++ | Automated translation services | +
en2fr | +English to French | +|
*2* | +Other language to language (using standard language codes) | +|
tts | +Text to Speech | +|
service/ | ++ | Nodes of this category provide a link to another Instant Messaging network or messaging gateway. The 'jabber:iq:register' namespace can be used to gain access to such networks, and the 'jabber:iq:search' namespace may also be available. | +
aim | +AIM transport | +|
icq | +ICQ transport | +|
irc | +IRC gateway (note: this enables IRC users to connect to Jabber) | +|
jabber | +A Jabber server which conforms to the specification for the 'jabber:client' namespace | +|
jud | +Jabber User Directory | +|
msn | +MSN transport | +|
pager | +Pager gateway | +|
serverlist | +A list of servers. It is assumed that this node has service/* children | +|
sms | +SMS gateway | +|
smtp | +SMTP gateway | +|
yahoo | +Yahoo! transport | +|
user/ | ++ | Nodes of this category are Jabber users, typically implementing enough of the 'jabber:client' namespace to be compliant. | +
client | +A standard or fully-featured Jabber client compliant with the 'jabber:client' namespace | +|
forward | +A forward alias | +|
inbox | +An alternate inbox | +|
portable | +A portable device implementing some of the 'jabber:client' namespace | +|
voice | +A node providing phone or voice access | +|
validate/ | ++ | Validation services | +
grammar | +Grammar-checking tool | +|
spell | +Spell-checking tool | +|
xml | +XML validator | +
Historically each category was used as the name of an element, and the type was an attribute, such as ]]>. The proper expression for all new implementations supporting this specification is to express the type information as attributes on a generic item element: ]]>. When processing returned browse information this new syntax should always be handled first, and the old syntax only used if it is important to be able to access older implementations.
+Additional unofficial categories or types may be specified by prefixing their name with an "x-", such as "service/x-virgeim" or "x-location/gps". Changes to the official categories and subtypes may be defined either by revising this JEP or by activating another JEP. Removal of a category or subtype must be noted in this document.
+The namespace containing the Jabber Browsing data is jabber:iq:browse. The primary element within this namespace is 'item' (again, historically every category listed above would also be an element).
+The common way to browse to a JabberID using IQ is:
+The item element has these attributes in a browse result:
+Any item may contain any number of additional items as a child, which describes the hierarchical relationship between the parent and the child items. This relationship could be represented as a "link" in a wizard or page-based user interface, or as a branch in a tree as it is expanded. Browse results usually only contain the direct children of a node, not the grandchildren. Browsing to a user, but not a resource, will return results from the server (still with the user's JID) containing the list of resources.
+For example, this could be the result of browsing to jer@jabber.org:
+More definitively, throughout all of browsing, a parent describes the children, and the children when browsed to fully describe themselves. The browse data received from the child takes precedence.
+Parents should list children only if they are available. This means that if for a user a child client goes offline, the parent should remove it from its browse result.
+On top of the browsing framework, a simple form of "feature advertisement" can be built. This enables any entity to advertise which features it supports, based on the namespaces associated with those features. The <ns/> element is allowed as a subelement of the item. This element contains a single namespace that the entity supports, and multiple <ns/> elements can be included in any item. For a connected client this might be <ns>jabber:iq:oob</ns>, or for a service <ns>jabber:iq:search</ns>. This list of namespaces should be used to present available options for a user or to automatically locate functionality for an application.
+The children of a browse result may proactively contain a few <ns/> elements (such as the result of the service request to the home server), which advertises the features that the particular service supports. This list may not be complete (it is only for first-pass filtering by simpler clients), and the JID should be browsed if a complete list is required.
+Clients should answer incoming browsing requests to advertise the namespaces they support.
+When a JabberID is browsed, the result may contain children or it may be empty. An empty result means there are no further relationships or links under that JID, which could be represented as a page containing a list of functions available for the JID, such as vCard, message, register, etc. When the result contains children, they may also be empty (as in the first result from jer@jabber.org above). An empty child does not mean anything, and to determine the namespaces supported or if there are more children, it must be browsed to directly.
+The first important use of jabber:iq:browse is to replace the jabber:iq:agents namespace. When a client connects, it may optionally browse to the server to which it connected in order to retrieve a list of available services. The resulting iq might look like the following example:
+To determine any further details from this list, each child would have to be browsed. The elements within the icq service are only hints to a client for building user interface elements. The icq.jabber.org service would still need to be browsed in order 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 could also serve as the "home page" for a page-based browsing user interface.
+A client should not just blindly request browse information every time the user requests it, rather, a client should cache the browse results based on JabberID. Any display or use of the browse data should then be returned from the cache. This model is similiar to that of presence.
+There are no security features or concerns related to this proposal.
+This JEP requires no interaction with &IANA;.
+No action on the part of the ®ISTRAR; is necessary as a result of this JEP, since 'jabber:iq:browse' is already a registered protocol namespace.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0011: http://www.jabber.org/jeps/jep-0011.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+The 'jabber:iq:browse' namespace has been in use for quite some time. However, live browsing still needs to be better defined by a generic publication/subscription system. It is assumed that when such a system is defined, updates to this JEP will be made. It is, however, possible that no futher changes to jabber:iq:browse itself may be needed.
+It is often helpful to know the time of the last activity associated with a Jabber Entity. The canonical usage is to discover when a disconnected user last accessed the server (a closely related usage is to discover when a connected user was last active on the server, i.e., the user's idle time). The 'jabber:iq:last' namespace provides a method for retrieving this kind of information. In historical usage, the 'jabber:iq:last' namespace has also been used to query Jabber servers and components about their current uptime; however, this is an extension to the core usage of the 'jabber:iq:last' namespace and may require the addition of a separate namespace in the future.
+Although the 'jabber:iq:last' namespace has been in use since January 2001, it is still not considered one of the standard Jabber protocols. While the &jabberd; server, many components, and some clients already implement this namespace, it is often overlooked by new developers because of the lack of standardization. This informational JEP defines the protocol as it is used today in order to more fully document it for historical purposes.
+The 'jabber:iq:last' namespace is used as the value of the 'xmlns' attribute of a <query> element contained within an <iq/> element. When requesting last activity information, a Jabber Entity sends an <iq> element of type='get' to another Jabber Entity (i.e., a JID). When responding to such a request, a Jabber Entity sends an <iq> element of type='result'. The <query> element never has any children and contains only one attribute and CDATA, depending on the scenario in which it is used.
+As currently implemented, the Jabber Entity receiving an IQ reply in the 'jabber:iq:last' namespace must interpret it based on the sending JID's type in order to determine the meaning of the information. Specifically, currently the information means something different depending on whether the JID sending the reply is of the form 'host', 'user@host', or 'user@host/resource'. These differences and established usage are explained more fully below.
+As noted above, the primary usage of the 'jabber:iq:last' namespace is to find out how long ago a user logged out (and, additionally, what their status message was at that time). This primary usage assumes that the IQ get is sent to (and the IQ reply is received from) a JID of the form 'user@host'. When used in this way, the <query> element contained in the IQ reply has a 'seconds' attribute, which is the number of seconds that have passed since the user last logged out, and the element CDATA is the status message of the last unavailable presence received from the user. An example is shown below:
+In this example, the user logged out fifteen minutes and three seconds ago, and when they logged out they sent a presence packet of type='unavailable' whose <status/> element contained the text "Heading home".
+If the user has at least one available resource when the server receives the request, the response SHOULD contain an empty <query/> element whose 'seconds' attribute is set to a value of '0'.
+Note well that, as specified in &xmppcore; and &xmppim;, an IQ query sent to a JID of the form user@host is handled by a server on the user's behalf, not forwarded to one or more active resources. In addition, a server MUST NOT return last activity information to an entity that is not authorized to view the user's presence information (normally via presence subscription), and MUST return a "Forbidden" error in response to such a request (for information about error conditions, refer to &jep0086;).
+When the IQ get in the 'jabber:iq:last' namespace is sent to a specific resource of an online user (i.e., a JID of the form of 'user@host/resource'), the JID sending the reply MAY respond with the idle time of the user. This is not a required protocol for clients to support, so clients sending such requests MUST NOT depend on receiving a meaningful result from the target user (although a client that does not support the protocol, or that does not wish to divulge this information, SHOULD return a "Service Unavailable" error). The standard does not specify what resolution the clients must use for the idle times, so the result SHOULD NOT be used as a precise measurement. Here is an example:
+In this example, the user has been idle for about two minutes.
+If there is no available resource matching the user@host/resource in the 'to' attribute of the request, the server MUST follow the rules in XMPP IM in order to determine what error stanza to return.
+When the IQ get in the 'jabber:iq:last' namespace is sent to a server or component (i.e., to a JID of the form 'host'), the information contained in the IQ reply reflects the uptime of the JID sending the reply. The seconds attribute is how long the host has been up, and the CDATA is unused.
+In this example, the server has been up for a little more than 34 hours.
+A server MUST NOT allow an unauthorized entity to learn a user's network availability by sending a Last Activity request to a JID of the form user@host or user@host/resource; Last Activity information MAY be divulged only to those entities that have permission to view the user's presence (normally via presence subscription), potentially as restricted by privacy rules (as defined in XMPP IM and further profiled in &jep0126;).
+This JEP requires no interaction with &IANA;.
+No action on the part of the ®ISTRAR; is necessary as a result of this JEP, since 'jabber:iq:last' is already a registered protocol namespace.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0012: http://www.jabber.org/jeps/jep-0012.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+The 'jabber:iq:last' namespace has been used intensively (in the jabberd server, components such as most transports, and some Jabber clients), and no major faults have been found in the current implementations. However, as noted, it has not necessarily been used widely, and many Jabber clients lack support for this namespace. For this reason it is probably best to consider it a non-core namespace.
+The current specification assumes that the 'resource' portion of a JID is equivalent to a device or connection (laptop, PDA, etc.). While in that context it makes sense to interpret the information returned by an IQ reply in the 'jabber:iq:last' namespace as client idle time, such an assumption will make less sense in a future world where a resource may be not a device or connection but truly a more generic resource such as a calendar or weblog. The current interpretation of 'jabber:iq:last' for 'user@host/resource' as idle time may not be appropriate for the more diverse Jabber resources of the future.
+The most significant point of contention regarding the 'jabber:iq:last' namespace is the perceived ambiguity of the information contained in an IQ reply for this namespace. Specifically, for a 'user@host' the information is the time since the JID was last connected to the host, for a 'user@host/resource' the information is the time since the resource was last active (i.e., in most circumstances the client idle time), and for a 'host' the information is the uptime for the server or component. Because of this ambiguity (real or perceived), there is some sentiment in the Jabber community that it would be better to create a separate 'jabber:iq:uptime' namespace (and perhaps even a 'jabber:iq:idletime' namespace), leaving the 'jabber:iq:last' namespace for last disconnection time only. These potential namespaces may be proposed in one or more future JEPs if needed.
+Although not required to do so by &rfc3920; and &rfc3921;, many existing Jabber/XMPP instant messaging servers will store messages received while a user is offline and deliver them when the user is next online. Such messages are commonly called "offline messages". The current means of retrieving one's offline messages is simple: one sends available presence to the server and, as a consequence, the server sends a one-time "flood" of all the messages that have been stored while one was offline. This simplification has the following deficiencies:
+It can be overwhelming, which is undesirable for the vacationer or heavy user. Many individuals upon returning to work from a weeklong vacation spend the first few hours wading through the dozens, even hundreds, of emails that they received during their absence. Unlucky, however, is this user who then logs onto their Jabber server and is bombarded by hundreds of instant messages, possibly in scores of popup dialogs, simultaneously. Should their client crash, they have lost all communication that occurred while they were away.
It can be difficult to integrate with web-based email clients, which is undesirable for some portals. Several large portals are currently trying to blur the distinction between IM and email -- providing both through one web interface. With offline retrieval semantics so vastly different between the two, this is quite difficult.
What is needed is a flexible semantic for offline message handling, similar to POP3 in the email world (see &rfc1939;). This would enable the wireless user to view header information for all offline messages and select only those from their boss and important clients for viewing. It would enable the vacationer to read and delete their messages one at a time, minimizing the possibility of losing all correspondence. And it would provide for seamless integration with existing web-based email clients.
+In particular, such a protocol should support the following use cases:
+In order to discover whether one's server supports this protocol, one uses &jep0030;.
+If the server supports this protocol, it MUST return a <feature/> element in the disco result with the 'var' attribute set to the namespace name for this protocol: 'http://jabber.org/protocol/offline'.
+RFC 1939 includes a feature (the "STAT" command) that enables a user to determine how many messages are waiting to be retrieved (without retrieving all of the headers). Such a feature would be helpful in Jabber/XMPP as well, especially if the client is constrained with regard to storage capacity or available bandwidth.
+In order to determine the number of messages in the offline message queue, the user sends a disco#info request without a 'to' address (i.e., implicitly to the user himself) and with the disco node specified as 'http://jabber.org/protocol/offline':
+If the server supports retrieval of the number of messages, it MUST include &jep0128; data specifying the number of messages:
+Upon receiving a service discovery request addressed to a node of "http://jabber.org/protocol/offline" (either a disco#info request as in this use case or a disco#items request as in the next use case), the server MUST NOT send a flood of offline messages if the user subsequently sends initial presence to the server during this session. Thus the user is now free to send initial presence (if desired) and to engage in normal IM activities while continuing to read through offline messages. However, once the user sends presence, the user's server MUST deliver in-session messages as usual; this JEP applies to offline messages only. In addition, if the user authenticates and provides presence for another resource while the first (non-flood) resource still has an active session, the server MUST NOT flood the second resource with the offline message queue.
+In order to retrieve headers for all of the messages in the queue, the user sends a disco#items request without a 'to' address (i.e., implicitly to the user himself) and with the disco node specified as 'http://jabber.org/protocol/offline'.
+The server now MUST return headers for all of the user's offline messages. So that the user may determine whether to view a full message, the header information provided MUST include the full Jabber ID of the sender (encoded in the 'name' attribute) and a unique identifier for the message within the user's "inbox" (encoded in the 'node' attribute), so that the user may appropriately manage (view or remove) the message.
+If the requester is a JID other than an authorized resource of the user (i.e., the user@host of the requester does not match the user@host of the user), the server MUST return a &forbidden; error. If the requester is authorized but the node does not exist, the server MUST return an ¬found; error. If there are no offline messages for this user, the server MUST return an empty query as defined in JEP-0030. (For information about the syntax of error conditions, refer to &jep0086;.)
+The syntax and semantics of the attributes are as follows:
+Messages are viewed based on the value of the 'node' attribute as provided for each item returned by the server in the header information. A user MAY request one or more messages in the same IQ get.
+If the requester is a JID other than an authorized resource of the user, the server MUST return a &forbidden; error. If the requester is authorized but the node does not exist, the server MUST return an ¬found; error. Otherwise, the server MUST send the requested message(s) plus an IQ result:
+In order to distinguish incoming messages, each message MUST contain the node value. It is RECOMMENDED for the server to include &jep0091; information in the message.
+A server MUST NOT remove a message simply because it has been requested by and delivered to the user; instead, the user must specifically request to remove a message. This further implies that the user's offline message queue SHOULD NOT be automatically cleared out by the server if there are offline messages remaining when the user's session ends. However, an implementation or deployment MAY remove messages according to its own algorithms (e.g., storage timeouts based on a "first in first out" rule) or policies (e.g., message queue size limits) if desired.
+As with viewing, messages are removed based on the value of the 'node' attribute as provided for each item returned by the server in the header information. The user MAY request the removal of one or more messages in the same IQ set.
+If the requester is a JID other than an authorized resource of the user, the server MUST return a &forbidden; error. If the requester is authorized but the node does not exist, the server MUST return a ¬found; error. Otherwise, the server MUST remove the messages and inform the user:
+The user retrieves all message by sending the "fetch" command:
+If the requester is a JID other than an authorized resource of the user, the server MUST return a &forbidden; error. If the requester is authorized but the node does not exist, the server MUST return a ¬found; error. Otherwise, the server MUST retrieve all messages and inform the user:
+A client MAY retrieve all messages without first requesting message headers. In this case, the server MUST return all of the user's offline messages and also MUST NOT send a flood of offline messages if the user subsequently sends initial presence to the server during this session. That is, the semantics here are the same as for requesting message headers.
+The user removes all message by sending the "purge" command:
+If the requester is a JID other than an authorized resource of the user, the server MUST return a &forbidden; error. If the requester is authorized but the node does not exist, the server MUST return a ¬found; error. Otherwise, the server MUST remove all messages and inform the user:
+This section shows the flow of protocol between client (C:) and server (S:) for the existing (flood) scenario and the improved (POP3-like) scenario.
+The semantics change with POP-like offline message handling, and server behavior changes as well...
+A server MUST NOT deliver a user's offline messages to any JID except one of the user's authorized resources.
+This JEP requires no interaction with &IANA;.
+The ®ISTRAR; includes 'http://jabber.org/protocol/offline' in its registry of protocol namespaces.
+The Jabber Registrar includes "automation" in its registry of Service Discovery categories for use for any entities and nodes that provide automated or programmed interaction. This JEP specifies the following new types for the "automation" category:
+Type | +Description | +
---|---|
message-list | +The node for the offline message queue; valid only for the node "http://jabber.org/protocol/offline". | +
message-node | +A node for a specific offline message if service discovery is provided for messages. | +
The registry submission is as follows:
+
+ message-list
+
+ The node for the offline message queue; valid only for the node
+ "http://jabber.org/protocol/offline"
+
+ JEP-0013
+
+
+ message-node
+ A node for a specific offline message if service discovery is provided for messages
+ JEP-0013
+
+
+ ]]>
+ The Jabber Registrar includes "http://jabber.org/protocol/offline" in its registry of well-known Service Discovery nodes.
+&jep0068; defines a process for standardizing the fields used within Data Forms qualified by a particular namespace. There is one uses of such forms in offline message retrieval as described in the Requesting Number of Messages section of this JEP. The registry submission is as follows:
+
+ http://jabber.org/protocol/offline
+ JEP-0013
+
+ Service Discovery extension for number of messages
+ in an offline message queue.
+
+
+
+ ]]>
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0013: http://www.jabber.org/jeps/jep-0013.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+When people speak to one another, they use various tones of voice and body language to express themselves. When communicating online, people have no easy way of expressing themselves clearly. By incorporating message tones into Jabber, people will be able to convey tones such as anger, sarcasm, and confusion.
+Tone can be added only to messages, and it is added as an <x> tag inside a message. The <x> tag will look something like this:
+The specified tone is included as CDATA within the <x> element.
+Here is an example of a message with a tone:
+Tones are not meant to be sent with every message. They should be used only in cases where a tone dramatically applies. The overuse of tones will cause them to lose their effect.
+Because tones are abstract and not clearly defined, there is no standard list of tones. Clients should receive the tone as it is and display it as plain text, in such a way that it is linked to a specific message. Clients may want to have a specified list of tones that a user can select from when sending a message.
+Tones should be short and simple. Here is a list of good tones:
+I have found the need in the past to migrate an account from + one server to another for various reasons. Many of the people who + ask me about Jabber ask if there is a way to migrate their account + from one server to another if the need arises. There is no reason + Jabber can not handle this internally and update all the + JID-references appropriately.
+ +Jabber servers come and go, especially ones run by people who + are just playing with the technology. Computers also die and + funding runs out. It can be hard on users to have to re-create + their rosters every time they have to change to a different + server. Administrators also want to provide an 'out' for their + users, so that they feel more secure in the time spent setting up + rosters. For these reasons there should be a way to migrate an + account from one server to another.
+ +A basic overview of the behavior would be as follows.
+Throughout most of the account transfer the server hosting + the old account will be acting for the user. The end client + should have very little to do with the actual transfer.
+ +On acceptance the server on which the old account resides + starts the migration process by sending this to each person + subscribed to the user's presence.
+Once that update has been sent to all the contacts on the + roster the floobin.cx server sends to the jabber.org server airog@floobin.cx's roster as follows:
+Once the migration finishes a notification is sent to the user:
+Because we cannot determine easily if the new server will + support the same transports as the old server we cannot + easily transfer entities that pass through the + transport. Therefore, until jabber:iq:browse matures, or + some other solution for determining if two transports + support the same functionality we should not attempt to + migrate transport information.
+ +I propose the following algorithm for determining if a + particular roster item is a sub-item of a transport. There are + jabber roster items for each of the transports themselves, + something to the effect of icq.jabber.org or + aim.jabber.org. They contain no user portion of the jid. We + record all of these in a list that we will call the + 'transport-list'. Then for each roster item we want to migrate + we compare its 'host' part of the jid to all items in the + 'transport-list'. If the roster item matches, then the roster + item is a hosted through the transport and shouldn't be + migrated.
+Does the server keep an empty account that redirects requests + to the new account? I've been hearing mass rumblings of 'NO' + here.
+How do we handle vCard information or server side stored + preferences? Since the account we're migrating to can be any + account some of that information might already be there, how do + we resolve conflicts?
+ +Also, we cannot be sure that the new server supports + storage of private data. This again needs some sort of + features negotiation, discovery which could be provided by + jabber:iq:browse.
+ +Until jabber:iq:browse is in the 'standards' stage, I + recommend we only transfer regular jabber users, and not + transfer anything but the roster. All the client software will + have to set their preferences for themselves on the new + server.
+Note: This JEP has been superseded by &xmppim;; please refer to that document for the most up-to-date protocol!
+Almost all types of Instant Messaging (IM) applications have found it necessary to develop some method for a user to block the receipt of messages and packets from other users (the rationale for such blockage depends on the needs of the individual user). The method for implementing this functionality in the current Jabber system is for each client application to keep its own "blacklist" of the Jabber IDs from which the user does not wish to receive messages. This current implementation has the following drawbacks:
+The solution to these shortfalls is to have a common blacklist which is stored on the Jabber server along with the other information which clients receive from the server (primarily the roster).
+This document proposes the addition of a new namespace to handle the storage and retrieval of the server-side blacklist and whitelist information. The proposed 'jabber:iq:privacy' namespace would be consistent with the existing jabber:* namespaces and use the <query/> element as a direct child under the main <iq/> element. A client application would use <iq type="get"> to retrieve the lists from the server, and use <iq type="set"> to add or edit items in a specific list. Each list is a combination of multiple items. Each item can be of type allow or deny. For this document, these lists will be called "zebra lists".
+Each <query/> element would have one or more <list> elements which would contain the information for an entire zebra list. The <query> element also contains an <active> element and a <default> element. These elements contain the name of the currently active zebra list or the name of the default zebra list. A client application may perform a get request with an empty <active> element and/or and empty <default> which indicates that it only wants to know which list is currently active or the default list. A client application may also specify a default list to be used for offline processing and when no active list is directly specified. To fetch the currently active list and the rules for each list, the client application performs a simple blank get request.
+The <default> element is used when processing packets and the client is offline, and is used whenver the client connection (session) does not specify a specific list to be active.
+Each <item> element in the zebra list MAY contain a jid attribute (the Jabber ID, i.e. user@host, of the contact which is to be blocked or allowed), MAY contain a subscription attribute, and MUST contain a type attribute. If no jid attribute is specified, then the rule MUST apply to all jids. The possible values of the type attribute would be either "deny", "allow". To remove items from the list, simply send back the list tag with the various <item> elements missing.
+If the <item> element contains a subscription attribute, it means that the rule applies to all jids in the current users roster which have matching subscription elements. Note that a subscription of "both" MUST be treated the same as "from" and "to" together.
+If the <item> element contains no child elements, then all packets would be blocked or allowed. This includes: messages, presence packets, and iq packets. The <item> elements MAY contain the following empty child elements:
+When a message or other XML packet is blocked according to the entries in the list, the server MUST bounce the packet back to the original sender. The bounced packet MUST be of type="error" and contain a child <error/> element with a code attribute of 405.
+If a <list> element is sent that contains no child elements, the list of that name is removed. If the active list is not reset during the list removal, and the list removed was the active list, the user is returned back to a default state of allow all packets.
+Setting your active zebra list is effective for the current session only, but the storage of the lists is for the user. During usage, a client application should set the active list before sending available presence or fetching the roster. If a client does not set the active zebra list for the current session, the default rules of allowing all packets would apply to that session. +
+When changing or editing in a specific zebra list, the client application MUST send back all items in the list in the desired order. Server side components that are performing the packet filtering MUST preserve the order of the individual <item> tags and process the rules in that order. All lists MUST have at least one rule that SHOULD specify the default action. The client application MAY send back an <active> element indicating the new currently active list. If no <active> element is sent, the currently active list is used.
+When a client application wishes to just change the currently active zebra list, they MUST NOT send back all of the lists and their contents. The client application SHOULD send back just the new <active> element. If the named list does not exist, the server MUST send back an error using error code 406 (Not Acceptable).
+Client applications can NOT set the default or active list, and alter the actual lists in the same packet. If a client connection attempts to modify both things at once, the server implementation must send back a iq-error using error code 406.
+Implementations of zebra lists MAY choose to allow specific packet types to be checked. If a client attempts to set an item with a specific packet type (message, presence, or iq) and the implementation does not support that feature, the server MUST send back the <iq/> as a type="error" using an error code of 406 (Not Acceptable).
+Implementation of zebra lists SHOULD NOT "push" new lists and additions to existing clients already connected using the same JID (as you would get jabber:iq:roster pushes). If a client application wants to know the current zebra list information, it SHOULD send a get request.
+When a jabber ID is specified on a rule and the ID does not conform to user@host, the following rules apply:
+If a packet does not match any rules in the active list, the default action is to allow.
+The following protocol segments illustrate the exchange of packets between the client application and the server in order to retrieve the zebra list information.
+The following protocol segments illustrate the exchange of packets used to change the active zebra list.
+The following protocol segments illustrate the exchange of packets used to add or edit a zebra list.
+The following protocol segments illustrate how a client application would remove a zebra list.
+The following protocol segments illustrate the exchange of message packets when the sender is blocked by the currently active zebra list.
+In the future, it may be desirable at some point to allow clients to filter specific iq namespaces. The protocol could easily handle this capability by doing something like the following:
+In the future, it may be desirable to have be able to block normal presence/availability packets, while still allowing subscription packets through the zebra list.
+In the current open source Jabber server, there is a JSM module called mod_filter which has the capability to implement this type of functionality. However, most servers with large user bases have found it impossible to use mod_filter because of the load that it imposes on packet processing. Using normal whitelist/blacklist operations should make the processing much simpler than mod_filter's processing of an unknown set of rules various rules (not just blocking).
+Peter Millard, the author of this specification from version 0.1 through version 0.3, died on April 26, 2006.
+Framing is the mechanism by which a listener is able to separate a stream of information into discrete semantic units. In Jabber, each of these semantic units is a fragment of a <stream:stream> document consisting of a direct (depth=1) child element of the <stream:stream> document element, and all its attributes and child nodes. These semantic units are hereafter called packets. A Jabber session document, excluding the document element start tag and end tag which are handled as special cases, is implicitly encoded into these packets and transmitted across the network.
+This JEP describes a framing method that may provide performance and code simplicity advantages over the framing method currently used.
+The current scheme for framing in Jabber relies on the inherent structure of XML to determine packet boundaries. Since each packet is a well-formed XML fragment, the start of the packet is unambiguously denoted by the element start tag at depth=1, and the end of the packet is unambiguously denoted by the corresponding close tag at depth=1.
+This method of framing is elegant because all the necessary framing information is inherent in the XML; it makes framing independent of the underlying transport layer so long as that transport layer guarantees per-session FIFO delivery. However, it has significant performance and implementation disadvantages, as it requires any Jabber node (endpoint or router) to XML-parse the packet as it is still being received in order to determine the packet boundary. Many XML parsing suites are not designed to be used in this manner, and various hacks and workarounds have emerged in current Jabber software in order to adapt them for this purpose.
+Consider a simple method that prefixes the byte length of each packet as an XML text node at depth=1. Put more simply, the transmitting agent calculates the byte length of the element it wishes to transmit. It then transmits this integer length encoded as text, immediately followed by the element.
+This technique has the following advantages:
+This technique has the following disadvantages:
+Framing data is included for the <stream:stream> and </stream:stream> tags as if they were their own packets, although they are not independently well-formed XML. These should be handled as special cases in a Jabber XML streams implementation.
+The connecting agent (client) implicitly requests that the receiving agent (server) use JEP-0017 framing by transmitting JEP-0017 framing data in its own outgoing stream (the connecting agent always "goes first"). Servers should detect the presence of framing data in the client's stream (by testing whether the first character received is a digit or a <) and, if it is detected, activate outgoing framing for that session.
+Regardless of the use of framing data, all nodes must verify the well-formedness of XML payloads in order to avoid propagating misframes.
+This framing method is not intended as a fully satisfactory or permanent solution to XML stream framing. In the "distant" (longer than one year) time span, it may be desirable to consider more thorough systems such as BEEP. The intent of this JEP is to establish an intermediate solution that will provide code simplicity advantages to new implementations in the near term without requiring fundamental changes to the Jabber transport or protocol (as adopting BEEP would almost certainly require).
+Jabber users have long wanted the ability to come online using Jabber, but appear "unavailable" to a subset of their roster, an ability which is commonly referred to as invisible mode. While several current implementations have various ways of providing this functionality, the systems currently in place often lack clear behavior and documentation. This document provides requirements for invisible mode and clarifies the existing protocol-in-use to provide the desired functionality.
+Note well: The functionality described herein can and should be implemented by means of the Privacy Rules namespace defined in &xmppim;. This document is provided for historical purposes only.
+The requirements for invisible mode are basic:
+For the purposes of this discussion, we will assume this terminology.
+Assuming the user's client has authenticated with the system normally, it would send the following presence stanza to become invisible (note: this can be the initial presence stanza sent by the user). To do so, the client will send undirected presence with a type="invisible" attribute.
+If a user chooses to become visible after being invisible, the client will send undirected presence with a type="visible" attribute.
+If a user is visible to all of their contacts, and wishes to become invisible to selected contacts on their roster, then their client will send the following directed presence stanza.
+In this case, the server begins to track that the user is invisible to the contact joe@foo.com, and does not forward further presence updates to joe@foo.com. If the user wishes joe@foo.com to received further presence updates, then their client must send either an undirected presence stanza with a type="visible" attribute (see Example 2), or a directed presence stanza to joe@foo.com with a type="visible" attribute as below.
+The opposite behavior of the previous section should, also, be present in the server. For example, if a user is invisible to all of their contacts, they should be able to become visible to a selected contact by send a stanza similar to the one in Example 4.
+As with the previous section, a user can later choose to hide his presence updates for joe@foo.com by either sending an undirected presence stanza (see Example 1), or by sending a directed presence stanza to joe@foo.com (see Example 3).
+The above section documents the major points of the invisible mode protocol. It is important to understand how the server should interact with the protocol documented above.
+Normally, when a server receives a presence stanza, it stamps the appropriate 'from' attribute on the stanza and sends it on its way. If the stanza does not possess a 'to' attribute, the process of sending the stanza on its way involves broadcasting that stanza to all contacts listed in the user's roster. If the stanza does have a 'to' attribute, the stanza is simply routed to the correct contact. With the addition of invisible mode presence, the server MUST now verify that a stanza should be directed to contacts on a user's roster before sending it on. In addition, stanzas that are directly related to invisible presence (stanzas with a 'type' attribute of either "visible" or "invisible") MUST NOT be sent to any contacts, but MAY cause other presence stanzas to be sent instead.
+One of the biggest failings of older invisible mode implementations were client features like auto-away. In most cases, these auto-away stanza would inadvertently cause a user to become visible (although away) to all contacts on its roster. This invisible presence protocol has been designed to deal with that problem elegantly.
+Consider the following situation (the protocol for which is shown in the examples below):
+Since joe@foo.com has just come online, the server SHOULD NOT forward any presence stanzas to contacts on his roster.
+Note that in this example, presence updates from joe@foo.com are routed only to rynok@foo.com, despite the fact that stpeter@foo.com and pgmillard@foo.com are both online and available. This is because joe@foo.com has chosen to be visible only to rynok@foo.com. If joe@foo.com chooses to become visible to his entire roster, he simply sends an undirected presence stanza with the type="visible" attribute. In this case the server SHOULD forward the last undirected presence stanza received to stpeter@foo.com and pgmillard@foo.com.
+Now Joe has decided that he doesn't want pgmillard@foo.com to receive further presence updates. Since he is currently visible to all contacts, he simply needs to send a directed presence stanza to pgmillard@foo.com with the type="invisible" attribute set.
+In this case, the server will send a directed presence stanza to pgmillard@foo.com with the type="unavailable" attribute set, which indicates to pgmillard@foo.com's client that joe@foo.com has gone "offline."
+Further presence updates sent by joe@foo.com will now be forwarded to stpeter@foo.com and rynok@foo.com, and MUST NOT be forwarded pgmillard@foo.com.
+The server MUST NOT forward presence stanzas containing the type="visible" or type="invisible" attribute to a client.
+There are no security features or concerns related to this proposal.
+No interaction with &IANA; is required as a result of this JEP.
+No namespaces or parameters need to be registered with the ®ISTRAR; as a result of this JEP.
+The Jabber Software Foundation is an experiment. When we initially set up our policies, processes, and structures, we knew that our initial thoughts might not be our final thoughts, and that we would need to make adjustments as experience dictated. In this JEP, I argue that just such an adjustment is now necessary with regard to the Jabber Interest Groups (JIGs).
JEP-0002
Unfortunately, it is widely recognized in the Jabber community that the JIGs are not working. Ten JIGs have been approved by the Jabber Council,
In perhaps the best measure of success or failure, only one JIG has produced a JEP for submission to the Jabber Council, and that JEP (JEP-0009
In other words, an honest assessment forces us to conclude that the JIGs are not working.
+I see several possible solutions to the JIG problem:
+Given the lack of activity in the JIGs so far (and the lack of time available to those who would manage them), I am skeptical that "cracking the whip" will produce results, and I believe the onus of proof is on those who would argue that the existing JIGs can be successful. Similarly, taking a "wait and see" attitude will simply let a bad situation continue unchecked, and in my opinion will at some point require us to choose between option 1 and option 3. Rather than postpone the day of reckoning, I argue that we need to address the problem head-on and take action to streamline the JIGs and find a better way of working.
+But what is that "better way"? In order to figure that out, we need to understand why things are not working now. I don't think it's that the current JIG members are lazy, stupid, or incompetent -- after all, these are the same people who have in many instances created good Jabber-based software. Nor do I think it's that members of the Jabber community are incapable of creating JEPs, because individually and in small, ad-hoc groups they have created quite a few.
+I see several reasons why the JIGs are not working:
+If we reflect on what is working, we see that JEPs are being produced by individuals and small, ad-hoc groups. We also see that active discussion of those proposals is taking place in the Standards JIG, which contains everyone who is strongly interested in the Jabber protocols. Finally, we notice that the special-purpose JIGs have not played any appreciable role in our success so far.
+My proposed solution takes into account everything we have learned to date about producing JEPs and advancing the state of the Jabber protocols. Specifically, I propose that we take the following steps:
+There may be value in bringing back specialized JIGs in the future when the Jabber community becomes larger. However, at this time I urge that we face the facts and proactively implement the solution I have outlined in this JEP.
A discovery protocol such as &jep0030; enables Jabber entities to query other entities regarding the features they support, but does not provide a means for the two entities to negotiate specific options related to the advertised features (e.g., specific methods of file transfer such as &jep0047; or &jep0065;).
+The protocol defined herein enables Jabber entities to negotiate options for specific features. These features could be negotiated between any two endpoints on the Jabber network, such as two clients, a client and a component, two components, a client and a server, or two servers. The protocol is generic enough that it can be used whenever options need to be negotiated between two Jabber entities.
+Features are negotiated though the exchange of &IQ; stanzas containing &QUERY; child elements qualified by the 'http://jabber.org/protocol/feature-neg' namespace. However, this &QUERY; element is simply a wrapper for structured data encapsulated in the &jep0004; protocol.
In order to begin a negotation, the initiator sends an &IQ; stanza of type "get" to the recipient with a single <feature/> element containing a data form of type "form" which defines the available options for one or more features. Each feature is represented as an x-data "field", which MUST be of type "list-single" as specified in JEP-0004.
+The recipient SHOULD examine each feature and the options provided. In order to indicate preferred options, the recipient then SHOULD specify one option for each feature and return a data form of type "submit" to the initiator in an &IQ; stanza of type "result".
+The following examples show some likely scenarios for feature negotiation between entities. Further examples can be found in using protocols, such as &jep0096;.
+A typical negotiation flow is shown in the following example of two entities negotiating the time and place for a meeting.
+If the responding entity does not support one or more of the features, it MUST return a &feature; error, and SHOULD specify the feature(s) not implemented in the XMPP <text/> element.
+If the responding entity supports none of the options offered for a certain feature, it MUST return a ¬acceptable; error, and SHOULD specify the relevant feature in the XMPP <text/> element.
+If at least one feature offered by an entity is subject to &jep0020;, the entity's response to a service discovery information request MUST include <feature var='http://jabber.org/protocol/feature-neg'/> as one of the features.
+The using protocol (in these examples, &jep0045;) SHOULD specify which features might be negotiable, either in the relevant documentation or in the entry for that feature in the service discovery features registry maintained by the Jabber Registrar. However, the requesting entity MAY also query the responding entity in order to determine which features are negotiable, as shown below.
+The using protocol (in these examples, JEP-0045) SHOULD specify which features might be negotiable, either in the relevant documentation or in the entry for that feature in the service discovery features registry maintained by the Jabber Registrar (see <http://www.jabber.org/registrar/disco-vars.html>). However, the requesting entity MAY also query the responding entity in order to determine which features are negotiable, as shown below.
+If that feature is not negotiable, the responding entity MUST return a "Feature Not Implemented" error:
+If that feature is negotiable, the responding entity MUST return an appropriate negotiation form:
+The requesting entity MAY then submit a data form containing the required information.
+Security considerations are the responsibility of the using protocol.
+This JEP requires no interaction with &IANA;.
+In order for Jabber entities to adequately leverage Data Forms (e.g., by using machine-readable fields), it is RECOMMENDED to register standard x-data fields with the ®ISTRAR; via the mechanisms defined in &jep0068;. Whether to do so for any given features and options shall be determined by the using protocol.
+
+
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0020: http://www.jabber.org/jeps/jep-0020.html
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+Peter Millard, the primary author of this specification from version 0.1 through version 1.4, died on April 26, 2006. The remaining author is thankful for Peter's work on this specification.
+The Jabber Event Notification Service (ENS) acts as a dispatcher and may be used by applications as a central point of collection for certain types of events that are of interest to them. Examples of events include:
+ +In Jabber, the role of the ENS has traditionally been filled by overloading the <presence/> packet type. However, this method was never designed to be used as a general publish-and-subscribe mechanism, and so has the following problems:
+ +The protocol consists of two parts - the subscriber-to-ENS protocol, and the publisher-to-ENS protocol. Since there is no direct interaction between a publisher and a subscriber, it makes sense to seperate the two parts of the protocol.
+ +The protocol operates in the 'http://xml.cataclysm.cx/jabber/ens/' namespace.
+ +A reference implementation is available at http://cataclysm.cx/jabber/ens.html.
+Before we begin describing the protocol, is it necessary to define some terms, including the function and responsibilties of the entities that communicate with the ENS.
+ +An event can be defined as a change to the value of one or more properties of a resource.
+ +In the ENS, an event type is referred to by a JID (Jabber IDentifier), including the JID resource. For example, consider a hypothetical publisher that is linked to an IMAP message store. It might notify the ENS of the fact the a message has arrived, deleted, or filed, using the following JIDs:
+ +Alternatively, an end-user client that wanted to notify the ENS when its avatar changes might do so using a JID like "rob@cataclysm.cx/avatar"
+A subscriber is a Jabber entity that receives notifications about events. Usually, a subscriber will be an end-user client, but it may be any Jabber entity.
+ +As the name suggests, a subscriber can subscribe and unsubscribe to various events via the ENS. When it subscribes, the publisher responsible for the event it is subscribing to will be asked by the ENS to authorise the subscription request. To facilitate this, the subscriber may provide an XML fragment containing information that the publisher can use to authorise it. The use of this fragment is application specific. +
+ +Once subscribed to an event, the subscriber will receive any notifications that the publisher sends about that event.
+A publisher is the Jabber entity responsible for actually sending event notifications to the ENS. A notification contains the event type JID of the event that occured, and an optional "payload" XML fragment, that is passed untouched by the ENS to the subscriber. The contents of this payload is application-specific and can be used to provide detailed information about the event to the subscriber. For example, in the case of the NewMessage event above, the payload might contain the contents of the To:, From: and Subject: headers of the message.
+ +Additionally, the publisher is responsible for deciding who may subscribe to events it publishes. When the ENS receives a subscription request, it will ask the publisher to decide whether or not the subscriber may subscribe to a particular event. This authorisation request may also contain an XML fragment from the subscriber containing information that may be used for authorisation.
+To subscribe to a particular event, the subscriber sends a packet like of the following form to the ENS:
+ +The subscriber may include an <auth-info/> XML fragment containing some (application-specific) information that the publisher can use to authorise it:
+ +If it wishes, the subscriber may request a "reliable" subscription. This option guarantees that the subscriber will receive all notifications about this event (as far as the Jabber architecture guarantees delivery). This changes the semantics of the subscriber publish protocol - see section 3.6 for more details.
+ +Once subscribed, the ENS will return a packet of the following form to the subscriber:
+ +If an error occured during subscription (such as the publisher not allowing the subscriber to subscribe), an error packet will be returned to the subscriber:
+ +The actual error fragment in the packet is a direct copy of the one returned by the publisher when it fails the authorisation request from the ENS. If the publisher does not provide one, error code 503 (Service Unavailable) will be returned instead. If the publisher does not respond to the authorisation request (after an implementation-specific timeout), error code (Remote Server Timeout) will be returned.
+To unsubscribe from a particular event, the subscriber sends a packet like of the following form to the ENS:
+ +Once unsubscribed, the ENS will return a packet of the following form to the subscriber:
+ +No further notifications for the event will be received.
+When a publisher publishes a notification to the ENS, the ENS will forward the notification to any subscribers for that event. A notification sent to a subscriber takes the following form:
+ +A notification may also contain a (application-specific) "payload" XML fragment:
+ +Section 4.1 has more information about the payload.
+ +If the subscriber responds to the notification with an error, the subscriber will be automatically unsubscribed from the event by the ENS.
+If the <reliable/> option was specified when the subscriber subscribed to the event, then the subscriber is expected to acknowledge a notification with a packet of the following form:
+ +If the subscriber does not respond, or responds with an error, the notification will be resent by the ENS after a (implementation-specific) timeout.
+To publish a notification, the publisher sends a packet of the following form to the ENS:
+ +A notification may also contain a (application-specific) "payload" XML fragment:
+ +The payload can be any well-formed XML data. Everything inside the <publish/> tag will be forwarded untouched to the subscriber.
+Once the ENS has dispatched the notification to subscribers, it will return a packet of the following form to the publisher:
+ +A publisher is required to approve subcription requests. When a subscriber attempts to subscribe to an event, the publisher will receive a packet of the following form from the ENS:
+ +The subscriber may include an <auth-info/> XML fragment containing some (application-specific) information that the publisher can use to authorise it:
+ +To signal to the ENS that a subscriber should be allowed to subscribe, the publisher should return a packet of the following form:
+ +To deny the subscription, the publisher should return an error packet, containing the appropriate <error/> fragment:
+ +The <error/> fragment will be copied untouched into the error response sent back to the subscriber. See section 3.2 for more details.
+The ENS will respond with error code 400 (Bad Request) any time it receives a request that it cannot understand (a malformed packet, for example).
+ +Other errors may occur, and they are described in the appropriate sections of the above protocol specification.
+The following items should be discussed before this proposal is approved by the Council:
+ +The ENS, as described, works well. However, no provisions are made for a subscriber to find out which ENS a publisher is publishing to. It does a subscriber no good to subscribe to an event on the wrong ENS - the subscription would succeed (assuming the publisher allows it), but no notifications would ever be received.
+ +There are several potential solutions, each with their problems:
+ +This problem may be outside of the scope of this specification.
+Currently, if a subscriber obtains a reliable subscription, and then disappears from the network (as an end-user client might), the ENS will continue to send notifications to it (ignoring errors) until it unsubscribes. If the subscriber never comes back, then ENS will send notifications forever (in theory).
+ +At what point should even <reliable/> have its limits? Should we unsubscribe a reliable subscriber who bounces (ie. the Jabber server failed to deliver) more than, say, 10 publishes? Or maybe they should be unsubscribed if they do not respond (as in section 3.6) to anything for, say, 10 minutes?
+ +<reliable/> is an interesting idea, but it may be that it is too problematic for its own good.
+The topic of reliable subscriptions raises the question as to how long a subscription lasts. Should a subscription last forever (like <presence/> does), even across restarts of the server?
+ +If end-user clients are to be subscribers, then under this scheme the ENS would have to subscribe to presence, so as to know when the client has disconnected. Since presence is a function of the session manager, this could have the effect of making the ENS less generic that we may like.
+As I see it, basic presence will always be a function of the session manager, for the following reasons:
+ +I think the places where the ENS can boom will be in applications like avatars, and genuine event-based systems (like the kind described above - "you have new mail", "someone has scheduled a meeting with you in your online calendar", etc).
+The 'jabber:x:event' namespace defines extensions used to request and respond to events relating to the delivery, display, and composition of messages.
+By attaching a jabber:x:event extension to a &MESSAGE; element, the sender can track stages in the delivery of that message to its recipient.
+There are four message events currently defined in this namespace:
+ +Indicates that the message has been stored offline by the intended recipient's server. This event is triggered only if the intended recipient's server supports offline storage, has that support enabled, and the recipient is offline when the server receives the message for delivery.
+Indicates that the message has been delivered to the recipient. This signifies that the message has reached the recipient's Jabber client, but does not necessarily mean that the message has been displayed. This event is to be raised by the Jabber client.
+Once the message has been received by the recipient's Jabber client, it may be displayed to the user. This event indicates that the message has been displayed, and is to be raised by the Jabber client. Even if a message is displayed multiple times, this event should be raised only once.
+In threaded chat conversations, this indicates that the recipient is composing a reply to a message. The event is to be raised by the recipient's Jabber client. A Jabber client is allowed to raise this event multiple times in response to the same request, providing the original event is cancelled first.
+Extensions qualified by the jabber:x:event namespace may be used only in the context of &MESSAGE; elements. That is, event information should be requested, and given in response, in relation to &MESSAGE; elements only, and not &PRESENCE; or &IQ; elements.
+Event information should only be sent in response to a request for that information. Unsolicited event information is illegal. In addition, a client should not request message event information from a correspondent if it is known (for example through the results of a previous browse request) that the correspondent does not support message events.
+Any request for the offline event in a message that has been stored offline must be removed by the server before the message is forwarded to the Jabber client. This means that any <offline/> tag should be removed from the extension.
+ +Event notifications are requested by attaching an extension qualified by the jabber:x:event namespace to a &MESSAGE; element. A tag representing each event type requested for that message should be placed within the extension. Only one jabber:x:event extension may be attached to a &MESSAGE; element, but multiple event types may be requested within that one extension. The tags representing each of the event types are <offline/>, <delivered/>, <displayed/>, and <composing/>.
+An example of a &MESSAGE; element with a jabber:x:event extension is shown here.
+Here we see the sender wants to be notified if the message is stored offline (by the server), notified when the message is delivered (to the client), and notified if the recipient begins replying to the message. In this case, the sender will potentially receive three events based on this request. The first if the recipient is offline and the message is stored on the server, the second when the recipient becomes available and the message is delivered, and the third if the recipient begins composing a reply to the message.
+Note that the &MESSAGE; element requesting event notification contains an 'id' attribute. While these attributes are optional in the Jabber protocol, messages that contain event notification requests MUST contain an 'id' attribute so that raised events may be matched up with their original requests.
+If the message is stored by the server, the server must raise the requested event (offline) by sending a message to the sender as shown in this example:
+When raising an event, the raiser must send a &MESSAGE; element constructed according to the following rules:
+The composing event is slightly different from the other events in that it can be raised and cancelled multiple times. This is to allow the reflection of what actually is happening when a user replies to a message; he may start composing a reply, which would trigger the composing event, get halfway through, and stop (by some definition of "stop", which may be implementation-specific). At this stage the event is no longer valid, or at least doesn't make much sense. So the client may send a cancellation for the composing event just raised.
+The cancellation is raised by sending another jabber:x:event; however, in contrast to how the events are usually raised, no <composing/> tag is sent, just an <id/> tag, like this:
+The lack of an <composing/> tag (and any other event tag) signifies that the composing event, indicated previously by the id value, has been cancelled. In this example, the composing event being cancelled is that event that was previously raised with the id of message22. After cancelling a composing event, a new one may be raised, following the same rules as before, when the typing of the reply is resumed.
+This section contains a number of examples to illustrate the full flow of messages, event notifications, and event cancellations for a fictional conversation.
+Romeo temporarily loses his wireless connection in the Capulet's orchard and therefore his message is stored offline by the montague.net server, which generates the offline event and sends that notification to Juliet.
+Romeo reconnects and the message is delivered to his Jabber client, which generates a delivered event and sends it to Juliet's client.
+Romeo's Jabber client displays the message and sends a displayed event to Juliet's client.
+Romeo begins composing a reply to Juliet's heartfelt question, and his Jabber client notifies Juliet that he is composing a reply.
+Romeo realizes his reply is too rash and pauses to choose the right words; his Jabber client senses the delay and cancels the previous composing event.
+Romeo starts composing again, and his Jabber client sends a notification to Juliet's client.
+Romeo finally sends his reply, and requests composing events related to it.
+Compliant implementations SHOULD observe the following business rules:
+There are no security features or concerns related to this proposal.
+This JEP requires no interaction with &IANA;.
+No action on the part of the ®ISTRAR; is necessary as a result of this JEP, since 'jabber:x:event' is already a registered protocol namespace.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0022: http://www.jabber.org/jeps/jep-0022.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+Note Well: The protocol described herein has been deprecated by the &JSF;. The recommended protocol for implementing message expiration functionality is now &jep0079;.
+It is sometimes helpful to indicate that a piece of information has a finite useful life or time-to-live (TTL). In the context of instant messaging, the main use of a TTL is to indicate that a message must or should be used by or read by a certain time, usually because the message has meaning or purpose only within a finite amount of time. In normal usage, such a message should be discarded after the specified time has passed if it has not been used or read by that time.
+In Jabber, TTL functionality has been implemented informally using the jabber:x:expire namespace. Support for this namespace was added to the &jabberd; server as well as some clients and components in early 2001. Specifically, that support has involved the following two areas of responsibility:
+An Endpoint can specify a TTL for an XML stanza that it wishes to send by attaching an <x/> extension qualified by the jabber:x:expire namespace. The extension contains no children, only a 'seconds' attribute that contains a value representing the stanza's TTL, in seconds.
+ +Any mechanism that is involved in the storage, forwarding, and general handling of XML stanzas must check for the presence of such an extension and act accordingly, expiring (discarding) any stanzas that have exceeded their TTL lifetime. The jabber:x:expire namespace allows for a further attribute inside the <x/> extension: 'stored'. Here, the mechanism can record a value representing when the stanza was committed to storage, so that when the stanza is eventually retrieved for forwarding to the intended recipient, the elapsed time of storage can be calculated. This is to prevent the stanza from being held in 'suspended animation'.
+Here we see what the original message looks like after the stanza has been committed to storage and the time of storage recorded:
+When Sabine attempts to retrieve her offline messages, the store-and-forward mechanism (e.g., mod_offline) compares the current time against the stored attribute. If the 1800 seconds have passed, the mechanism should simply drop the message, without notifying either the sender or the intended recipient. No Eccles cakes for Sabine!
+Although current usage of jabber:x:expire is most commonly seen in server implementations to address any TTL requirements of stored messages, Jabber clients can also be seen as handlers of messages that may contain expiration extension information. If a message is received by a Jabber client, and not immediately displayed to the user, the client must check for TTL information and expire the message (rather than display it to the user) if appropriate.
+There are no security features or concerns related to this proposal.
+This JEP requires no interaction with &IANA;.
+No action on the part of the ®ISTRAR; is necessary as a result of this JEP, since 'jabber:x:expire' is already a registered protocol namespace.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0023: http://www.jabber.org/jeps/jep-0023.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+Pubsub ("publish/subscribe") is a technique for coordinating the efficient
+delivery of information from publisher to consumer. This specification
+
+The specification details the use of the Jabber protocol elements and +introduces a new namespace, jabber:iq:pubsub. +It also includes notes on actual implementation of such a +mechanism in Jabber. +
+ ++It's clear that as Jabber is deployed over a wider spectrum of platforms +and circumstances, more and more information will be exchanged. Whether +that information is specific to Jabber (JSM) users, or components, we need +an mechanism to be able to manage the exchange of this information in an +efficient way. +
+ ++For example, it is currently the trend to embed information about a +particular client's circumstance inside presence packets, either in the +<status/> tag or in an <x/> extension. One example that comes +to mind is "song currently playing on my MP3 player" (to which I have to +admit some responsibility for the meme in the first place). While embedding +information inside presence packets and having that information diffused to +the users who are subscribed to that user's presence has the desired effect, +it has a couple of non-trivial drawbacks: +
+ ++This is above and beyond the simple fact that this overloading of presence +packets and the presence subscription and diffusion mechanism can only end +in tears. +
+ ++It would be far better to have a separate (sub-)protocol that enabled +entities to take part in publish/subscribe relationships, and have a service +that facilitated the efficient exchange of information. Not only would it +relax the undue pressure on the presence mechanism, but it would also allow +people to use Jabber, which is, after all, about exchanging structured content +between endpoints, as a publish/subscribe _mechanism_ in its own right. +
+ +
+This specification describes a publish/subscribe protocol in terms
+of IQ packets with payload data in a new namespace, jabber:iq:pubsub. The
+choice for this namespace is slightly arbitrary - it was the same namespace
+used in temas's original document, seems to fit well, and we need a namespace
+to focus on.
+The aim of the specification is to provide for a facility where Jabber +entities can subscribe to (consume) and publish (emit) information in an +efficient and organised way. These entities could be JSM users or components. +
+ ++Push technology is back with a vengeance. Jabber can play a fundamental +part. +
+ ++The pubsub services will be typically provided by a component. In what +follows, there are generally three parties involved: +
+ ++Bear in mind that it is perfectly possible for a subscriber to be a +publisher, and a publisher to be a subscriber, too. +
+ ++The pubsub traffic will be carried in info/query (IQ) packets. All of the +data in these packets will be qualified by the jabber:iq:pubsub namespace. +
+ ++Pubsub scenarios can be seen in a subscribe (or unsubscribe) context or a +publish context. In light of this, we will examine the IQ packets +used in these contexts. +
+ ++A potential consumer, or recipient, of published information, needs to +request that he be sent that published information. Requesting to receive, +or be pushed, information is known as subscribing. +
+ ++A subscription request generally takes this form: +
+ ++Note - sections inside [...] are optional. +
+ ++Subscriptions can be specific to a publisher, in which case a to attribute +is specified in the <subscribe/> tag: +
+ ++In this case, the namespaces specified will be added to any existing list +of namespaces already recorded for that subscriber:publisher relationship. +In other words, it's a relative, not an absolute, subscription request. +
+ ++It is also possible in a publisher-specific subscription to omit specific +namespaces, if you want to be sent everything that particular publisher +might publish: +
+ ++This type of subscription should have the effect of absolutely replacing any +previous namespace-specific subscription to the publisher specified. +
+ ++If a subscriber wishes to cancel a subscription from a particular publisher, +he can send an unsubscribe like this: +
+ ++This should have the effect of removing the subscription from that publisher +for the namespaces specified. +
+ ++You can also send an unsubscribe without specifying any namespaces: +
+ ++This should have the effect of removing any subscription relationship with +the publisher specified. Note, however, that this won't stop the subscriber +being pushed information from that publisher if he's specified a +"publisher-generic" subscription (see next section). +
+ ++As well as being able to subscribe to specific publishers, it is also +possible to subscribe to receive data, according to namespace, regardless +of publisher: +
+ ++This means that the subscriber wishes to be pushed information in the +namespaces specified, regardless of who publishes it. Like the +publisher-specific subscribe that specifies namespaces, this request is +relative, in the namespaces are added to any existing namespaces already +recorded for this generic subscription. +
+ ++Subscribing to everything from everyone is probably not a good idea and +we should not allow this. (The format of the request is actually used in +an IQ-get context - see later). +
+ ++Likewise, you can unsubscribe from certain namespaces in this non-publisher-specific context like this: +
+ ++If there are any subscriptions to specific publishers for the namespaces +specified here, they should be removed (for those namespaces) in addition +to the removal from the 'all publishers' list. +
+ ++Finally, a subscriber can wipe the slate clean like this: +
+ ++which should have the effect of removing all namespace subscriptions +from everywhere. +
+ ++All the examples so far have shown actions on the subscriber's part, and +have consisted of IQ-sets. In an IQ-set, within the jabber:iq:pubsub +namespace, multiple children can exist in the query payload, but those +children must be of the same type. In other words, you can send multiple +<subscribe/>s, or multiple <unsubscribe/>s, but not a combination +of the two. +
+ ++This is allowed: +
+ ++But this is not allowed: +
+ ++In the case where multiple <subscribe/>s or <unsubscribe/>s +appear in an action, each element will be processed in turn, as they appear +in the payload. +
+ ++As well as actions, the subscriber can query his subscription using an +IQ-get in the jabber:iq:pubsub namespace. This should return a list of +the subscribers current subscriptions, like this: +
+ ++Note the two references to namespace:2 - one inside the non-publisher-specific +subscription list and one inside the subscription list specific to publisherA. +This example implies that the non-publisher-specific and publisher-specific +subscription information should be kept separately. This is designed to make +it easier on the subscriber to manage his specific subscriptions over time. +
+ ++In contrast to the subscribe and unsubscribe context, the publishing +context is a lot simpler to explain. +
+ ++A publisher can publish information within a certain namespace, like this: +
+ ++It's also possible for a publisher to publish more than one item at once, +like this: +
+ ++Each published item is wrapped in a <publish/> tag. This tag +must contain the namespace of the item being publishes, in an ns +attribute, as shown. This is distinct from the xmlns attribute of +the fragment of XML actually being published. It is theoretically +none of the pubsub component's business to go poking around in the +real published data, nor should it have to. It needs to know what +namespace is qualifying the published information that has been +received, so that the list of appropriate recipients can be +determined. +
+ ++While it's the responsibility of the publishing entities to publish +information, it's the responsibility of the pubsub +component to push out that published data to the subscribers. The +list of recipient subscribers must be determined by the information +stored by the pubsub component as a result of receiving subscription +requests (which are described earlier). +
+
+On receipt of an IQ-set containing published information, the pubsub
+entity must determine the list of subscribers to which that information
+should be pushed. If the IQ-set contains multiple <publish/>
+fragments, this process must be carried out for each one in turn.
+
+Taking the earlier example of the publishing of data in the 'foo' +namespace, the following example shows what the pubsub component +must send to push this foo data out to a subscriber. +
++The recipient is _not_ required to send an 'acknowledgement' in the +form of an IQ-result; the idea that this _push_ of information is +akin to how information is pushed in a live browsing context (see +jabber:iq:browse documentation for more details). +
+ ++When a pubsub service receives a publish packet like the ones above, it +needs to deliver (push) the information out according to the subscriptions +that have been made. +
+ ++However, we can introduce a modicum of sensitivity by using a presence +subscription between the pubsub service and the subscriber(s). If the +subscriber wishes only to receive information when he's online (this is +a JSM-specific issue), then he needs to set up a presence subscription +relationship with the pubsub service. The pubsub service should respond +to presence subscriptions and unsubscriptions by +
+ ++If the pubsub service deems that a published piece of information should +be pushed to a subscriber, and there is a presence subscription relationship +with that subscriber, the service should only push that information to the +subscriber if he is available. If he is not available, the information is not +to be sent. +
+ ++Thus the subscriber can control the sensitivity by initiating (or not) a +presence relationship with the service. If the subscriber wishes to receive +information regardless of availability, he should not initiate a (or cancel +any previous) presence relationship with the service. +
+ ++This loose coupling of presence relationships for sensitivity allows this +specification to be used in the wider context of component-to-component +publish/subscribe where presence is not a given. +
+ ++When in receipt of a pubsub subscription request from an entity +where a resource is specified in the JID, the pubsub component must +honour the resource specified in the from attribute of the request. +For example, here's a typical subscription request from a JSM user: +
++When storing the subscriber/publisher/namespace relationship matrix for +eventual querying when a publisher publishes some information, the +pubsub component must use the full JID, not just the username@host part. +
++Similarly, in this example: +
++the full JID of the component subscriber - news.server/politics-listener, +should be used to qualify the matrix. +
++This is because it allows the subscribing entities to arrange the +receipt of pushed items by resource. In the case of a JSM user, it +allows him to organise his clients, which may have different capabilities +(some being able to handle the jabber:iq:pubsub data, others not) to +receive the 'right' data. In the case of a component, it allows the +component to associate component-specific data with incoming published +namespace-qualified information. +
+ ++While the specification describes the fundamental building blocks of the +pubsub protocol, there are ideas that are not discussed above but nonetheless +may be incorporated into an implementation. There are other considerations +that have to be made in the wider context of publish and subscribe. Some of +the main ones are discussed briefly here too. +
+ ++There is no part of this pubsub specification that determines how a +potential subscriber might discover publishers. After all, there are +no rules governing which pubsub component a publisher could or should +publish to. And since pubsub subscriptions are specific to a pubsub +component, there is an information gap - "how do I find out what +publishers there are, and through which pubsub components they're publishing +information?" +
++This problem domain should be solved using other methods, not with the +actual jabber:iq:pubsub specific namespace. A combination of jabber:iq:browse +usage (the magic ointment that heals all things) and perhaps a DNS style +(or at least root-node-based) knowledge hierarchy might be the right +direction. +
++In the case where a server administrator wishes to facilitate pubsub +flow between JSM users on a server, a pubsub component can be plugged +into the jabberd backbone, and there is potentially no real issue with +knowing which pubsub component to use, and where it is. +But what about if the JSM users on one server wish to build pubsub +relationships with JSM users on another server? (Note that this general +question is not specific to JSM users, although that example will be used +here). The next two sections look at how these things might pan out. +
++When JSM users on server1 wish to subscribe to information published +by JSM users on server2 (let's say it's the mp3 player info, or avatars) +then there are some issues that come immediately to mind: +
++To reduce the amount of server-to-server traffic, we can employ the +concept of "proxy subscriptions". This is simply getting a pubsub component +to act on behalf of a (server-local) subscriber. Benefit comes when a pubsub +component acts on behalf of multiple (server-local) subscribers. +
++Here's how such proxy subscriptions can work, to reduce the amount of +server-to-server traffic: +
++Step 1: Subscriber sends original subscription +
++JSM users on server1 wish to subscribe to information published by an +entity on server2. Each of them sends a subscription request to the +_local_ pubsub component: +
++Step2: Pubsub component subscribes on subscriber's behalf +
++The pubsub component knows about the publisher, and where (to which +pubsub component) that publisher publishes information. It formulates +a subscription request and sends it to the remote pubsub component: +
++The remote pubsub component receives and acknowledges the subscription +request, and the local pubsub component relays the response back to +the original requester: +
++If the remote pubsub server was unable or unwilling to accept the +subscription request, this should be reflected in the response: +
++Step3: Publisher publishes information +
++The publisher, publisher.server2, publishes information in the +namespace:1 namespace, to the remote pubsub component pubsub.server2: +
++Step4: Pubsub component receives published information +
++The pubsub component pushes the published information to pubsub.server1, +who has been determined to be a valid recipient: +
++Step5: Pubsub component forwards published information to original subscriber +
++The local pubsub component then diffuses the information received to the +original subscriber: +
++This way, only a single published element must travel between servers +to satisfy a multiplex of subscribed entities at the delivery end. +
+ ++Of course, this mechanism will rely upon knowledge about pubsub components +and where they're available; furthermore, it will require knowledge about +where publisher entities publish their information. +This knowledge, and the mechanisms to discover this sort of information, +is not to be covered in this spec, which purely deals with the subscription +and publishing of information. As SOAP is to UDDI (to use a slightly +controversial pair of technologies), so is jabber:iq:pubsub to this +discovery mechanism as yet undefined. To include the definition of such +a discovery mechanism in this specification is wrong on two counts: +
++After all, the jabber:iq:pubsub spec as defined here is usable out of the +box for the simple scenarios, and scenarios where discovery is not +necessary or the information can be exchanged in other ways. +
+ ++There are some situations where it might be appropriate for a pubsub +component to refuse particular subscription requests. Here are two +examples: +
++A refusal could take one of a number of guises: +
+
+The jabber:iq:pubsub specification makes no provision for
+publishers to query a pubsub component to ask for a list of those entities
+that are subscribed to (namespaces) it (publishes). This is deliberate.
+Do we wish to add to the specification to allow the publisher to discover
+this information? If so, it must be as an optional 'opt-in' (or 'opt-out')
+tag for the subscriber, to determine whether his JID will show up on the
+list.
+
+Associated with this is the semi-reciprocal issue of acceptance? The +specification deliberately makes no provision for a subscription acceptance +mechanism (where the publisher must first accept a subscriber's request, +via the pubsub component). If we're to prevent the publishers knowing +who is subscribing, ought we to give them the power of veto, to 'balance +things out'? +
++Note that if we do, the acceptance issue is not necessarily one for the +pubsub specification to resolve; there are other ways of introducing +access control, at least in a component environment; use of a mechanism +that the Jabber::Component::Proxy Perl module represents is one example: +wedge a proxy component in front of a real (pubsub) component and have +the ability to use ACLs (access control lists) to control who gets to +connect to the real component. +
+ +Per a vote of the Jabber Council, changed status to Deprecated.
Per a vote of the Jabber Council, advanced status to Active.
Changed format to allow socket-equivalent security.
Initial version.
Note Well: This protocol specified in this document has been superseded by the protocol specified in &jep0124;.
++ This JEP documents a method to allow Jabber clients to access Jabber + servers from behind existing firewalls. Although several similar methods + have been proposed, this approach should work through all known firewall + configurations which allow outbound HTTP access. +
++ In general, a firewall is a box that protects a network from outsiders, + by controlling the IP connections that are allowed to pass through the + box. Often, a firewall will also allow access outside only by proxy, + either explicit proxy support or implicit through Network Address + Translation (NAT). +
++ In the interest of security, many firewall administrators do not allow + outbound connections to unknown and unused ports. Until Jabber becomes + more widely deployed, port 5222/tcp (for Jabber client connections) will + often be blocked. +
+
+ The best solution for sites that are concerned about security is to run
+ their own Jabber server, either inside the firewall, or in a DMZ
+
+ In addition, many firewalls/proxy servers will also not allow or not + honor HTTP Keep-alives (as defined in section 19.7.1.1 of &rfc2068;) + and will consider long-lived socket connections as security issues. + Because of this the traditional Jabber connection model, where one + socket is one stream is one session, will not work reliably. +
++ In light of all of the ways that default firewall rules can interfere + with Jabber connectivity, a lowest-common denominator approach was + selected. HTTP is used to send XML as POST requests and receieve pending + XML within the responses. Additional information is prepended in the + request body to ensure an equivalent level of security to TCP/IP sockets. +
++ The client makes HTTP requests periodically to the server. Whenever the + client has something to send, that XML is included in the body of the + request. When the server has something to send to the client, it must be + contained in the body of the response. +
++ In some browser/platform combinations, sending cookies from the client is + not possible due to design choices and limitations in the + browser. Therefore, a work-around was needed to support clients based on + these application platforms. +
++ All requests to the server are HTTP POST requests, with Content-Type: + application/x-www-form-urlencoded. Responses from the server have + Content-Type: text/xml. Both the request and response bodies are UTF-8 + encoded text, even if an HTTP header to the contrary exists. All + responses contain a Set-Cookie header with an identifier, which is sent + along with future requests as described below. This identifier cookie + must have a name of 'ID'. The first request to a server always uses 0 as + the identifier. The server must always return a 200 response code, + sending any session errors as specially-formatted identifiers. +
+
+ The client sends requests with bodies in the following format:
+
Identifier | +Purpose | +
---|---|
identifier | ++ To uniquely identify the session server-side. This field is only + used to identify the session, and provides no security. + | +
key | ++ To verify this request is from the originator of the session. The + client generates a new key in the manner described below for each + request, which the server then verifies before processing the + request. + | +
new_key | ++ The key algorithm can exhaust valid keys in a sequence, which + requires a new key sequence to be used in order to continue the + session. The new key is sent along with the last used key in the + old sequence. + | +
xml_body | ++ The body of text to send. Since a POST must be sent in order for + the server to respond with recent messages, a client may send + a request without an xml_body in order to just retrieve new + incoming packets. This is not required to be a full XML document or + XML fragment, it does not need to start or end on element boundaries. + | +
+ The identifier is everything before the first semicolon, and must consist + of the characters [A-Za-z0-9:-]. The identifier returned from the first + request is the identifier for the session. Any new identifier that ends + in ':0' indicates an error, with the entire identifier indicating the + specific error condition. Any new identifier that does not end in ':0' is + a server programming error, the client should discontinue the + session. For new sessions, the client identifier is considered to be 0. +
++ Any identifier that ends in ':0' indicates an error. Any previous + identifier associated with this session is no longer valid. +
++ Server returns ID=0:0. The response body can contain a textual error + message. +
+Server returns ID=-1:0
+Server returns ID=-2:0
+Server returns ID=-3:0
++ The key is a client security feature to allow TCP/IP socket equivalent + security. It does not protect against intermediary attacks, but does + prevent a person who is capable of listening to the HTTP traffic from + sending messages and receiving incoming traffic from another machine. +
+The key algorithm should be familiar with those with knowledge of Jabber zero-knowledge authentication.
+Note: Base64 encoding is defined in &rfc3548;. SHA1 is defined in &rfc3174;.
++ No framing is implied by a single request or reply. A single request can + have no content sent, in which case the body contains only the identifier + followed by a comma. A reply may have no content to send, in which case + the body is empty. Zero or more XMPP packets may be sent in a single + request or reply, including partial XMPP packets. +
++ The absense of a long-lived connection requires the server to consider + client traffic as a heartbeat to keep the session alive. If a + server-configurable period of time passes without a successful POST + request sent by the client, the server must end the client session. Any + client requests using the identifier associated with that now dead + session must return an error of '0:0'. +
++ The maximum period of time to keep a client session active without an + incoming POST request is not defined, but five minutes is the recommended + minimum. The maximum period of time recommended for clients between + requests is two minutes; if the client has not sent any XML out for two + minutes, a request without an XML body should be sent. If a client is + disconnecting from the server, a closing <stream:stream> must be + sent to end the session. Failure to do this may have the client continue + to be represented to other users as available. +
++ If the server disconnects the user do to a session timeout, the server + MUST bounce pending IQ requests and either bounce or store offline + incoming messages. +
++ The following is the sequence used for client communication +
+ Jabber is meant to allow people everywhere in the world to communicate + with each other. However, people converse in many different languages, not just + English. Many humans in fact don't even understand English. Hence, + Jabber should not be tied to a particular language, but rather allow + usage of any language, be it English, Chinese, Inuit, or anything else. +
++ One important step towards this goal is that Jabber is based upon + Unicode, allowing for many different languages. But that alone is not + enough. Jabber promotes a server-based system for many of its + components and services, like the JUD, or transports. Many of these have + to interact with users in some way. Currently, they do so in only one + fixed language (usually English). Even if the server admin is willing + to translate the messages, forms, etc. involved, there can only be one + localization active for a given server/component. +
++ Hence, Jabber must support a way for clients to inform the server about + their preferred language. In addition, the server and other components + have to understand and honor this information. Only this way can we + ensure that Jabber is able to work in a multi-national, multi-lingual + environment. +
++ Some examples on how this information could and should be used, include +
++ The basic idea behind this proposal was to use existing standards where possible, and to make it fully backward compatible. Furthermore it was a goal to allow clients to support it now, even without any server support, while at the same time permitting improved functionality once servers start to implement this spec. +
+ +To encode the locale on any given XML packet, we use the xml:lang attribute, as defined in the XML specification. This in turn uses values as specified in RFC 1766 to encode languages and regions. This way, you can even distinguish between British and Australian English. +
++ An xml:lang tag can be put onto any XML element; for the purposes of this JEP, however, we will limit its usage to the four central Jabber elements: <stream/>, <message/>, <iq/> and <presence/>. +
++ A client claiming to support this JEP has to initiate server connection slightly differently by putting an xml:lang attribute in the initial <stream:stream> element. +
++ Servers not supporting this JEP will just ignore the additional attribute. Compliant server can be distinguished by the fact that their reply <stream:stream> element also contains an xml:lang attribute, indicating the main language of the server. A compliant client has to detect whether the server is compliant or not, and base its future behavior on this information. +
++ If the client thus determines that the server is compliant, then it doesn't have to do anything beyond this point. All its outgoing messages will automatically be flagged by the server with an xml:lang attribute if necessary. Thus writing a minimal compliant client is trivial. +
++ If it is determined that the server does not support this JEP, and the client still wants to offer locale support, it may start flagging all its outgoing message/iq/presence elements with the xml:lang attribute, to ensure that other components/clients which do conform to this JEP can handle the localization despite the local server not doing so. +
++ Finally, if for whatever reasons the client wants to flag particular messages with a different locale (e.g. if the user is bilingual), it can do so at any time by putting an appropriate xml:lang element in the outgoing data. This will override the previously set default locale for this message only. +
++ A compliant server must detect the xml:lang attribute in incoming <stream:stream> elements. The server then has to store this information for later use, i.e. it has to remember the default language for each active session. +
++ Additionally, a compliant server must attach an xml:lang attribute to the reply <stream:stream> element sent in response to a newly initiated connection. This attribute should reflect the default language of that server, and is used to indicate to clients that the server implements this JEP. +
++ The server should not only allow user clients to specify a default language this way, but also server-side components, like the JUD should be allowed to do this. +
++ Whenever a message leave the server, it has to tag the message automatically with the xml:lang attribute of the corresponding seesion, if any was specified, unless the message is already tagged this way. In that case, the already existing xml:lang attribute takes precedence, thus allowing for greater flexibility. +
++ If a client send a message to another local client which uses the same xml:lang value, then no change is applied. But if the recipient uses a different xml:lang, and if the message has no xml:lang attribute attached yet, the xml:lang of the server has to be attached before delievey of the message. +
++ Jabber based services that wish to comply to this JEP have to make sure that all information they send to clients is tagged with an xml:lang attribute corresponding to the language used in the outgoing data, if appropriate, even if the component supports no other localizations. An example for this is a search form based on JEP-0004. +
++ This way, a client could for example offer to translate the form since it now knows the language the form was written in. Previously it could just guess the language was English, which never was guaranteed. +
++ To be able to tailor replies to the user's preferred language, the component has to know this information. This is simply inferred from any xml:lang attribute on incoming requests. If none is present, the default locale is assumed. If the client's default locale diverges from that of the component, it is the server's responsibility to tag the query with an appropriate xml:lang attribute (refer to the "Server support" section). If on the other hand the server is not compliant, then any interested client will manually tag its queries with an xml:lang attribute. Thus it is sufficient to check for this attribute. +
++ A more sophisticated component supporting multiple localizations of its forms/messages could now honor the requested language and send this search form instead of the English one shown previously: +
++ If the component doesn't have the requested localization available, it replies with the default localization (but of course with the matching xml:lang attribute tagged to it, and not the one of the request). +
+ +The Jabber community has long acknowledged the need for privacy and security features in a well-rounded instant messaging system. Unfortunately, finding a consensus solution to the problem of end-to-end encryption during the community's younger days was not easy. Eventually, early contributors created a quick solution using OpenPGP. This JEP documents the OpenPGP solution as it is used today, so that others may interoperate with clients that support it. This JEP is not intended to present a standard, because more complete solutions are being investigated.
+All operations described here are done with standard OpenPGP software such as GnuPG. All program output is US-ASCII armored output with the headers removed. This allows for easy transportation of the program output directly in the XML. All keys are exchanged using OpenPGP key servers, and usually are retrieved when a signed &PRESENCE; stanza is received (key retrieval does not happen in-band).
+Signing enables a sender to verify that they sent a certain block of text. In Jabber, signing uses the 'jabber:x:signed' namespace, and is primarily used with &PRESENCE;, but may also be used with &MESSAGE;. Because signing requires a block of text, it creates new restrictions on the &PRESENCE; and &MESSAGE; stanzas:
+These requirements are necessary so that there is always common text to sign and verify against. When signing presence, the sender SHOULD sign the XML character data of the <status> element. The sender SHOULD sign presence using the private key whose KeyID corresponds to the public key to be used in encrypting messages (see below).
+Encryption enables the sender to encrypt a message to a specific recipient. This is accomplished using the 'jabber:x:encrypted' namespace in conjunction with &MESSAGE; stanzas. Because a block of text is necessary in order to have something to encrypt, &MESSAGE; stanzas intended to be encrypted have the same restrictions as signing (see above). The data encrypted MUST be the XML character data of the <body> element. The sender SHOULD encrypt the message body using the public key whose KeyID corresponds to the private key used in signing presence (see above).
+It is considered polite to include an unencrypted message <body/> explaining that the actual message body is encrypted. This helps if the client experiences an error while decrypting the message, or if the user's a client that does not support encryption (although generally this should not happen, since the signed presence can be used to indicate that a client accepts encrypted messages).
+The method defined herein has the following security issues:
+In addition to the security considerations listed above, there are several other known issues with this method:
+This JEP requires no interaction with &IANA;.
+The ®ISTRAR; shall register the 'jabber:x:encrypted' and 'jabber:x:signed' namespaces as a result of this JEP.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0027: http://www.jabber.org/jeps/jep-0027.html
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0027: http://www.jabber.org/jeps/jep-0027.html
+
+
+
+
+
+
+ ]]>
+ Jabber Identifiers (JIDs) uniquely identify individual entities in the Jabber network. To date, their syntax has been defined by convention, existing implementations, and available documentation. As it exists, certain characters that are allowed in JIDs cause ambiguity, and the lack of a size limit on resources defies database schemas and causes some trivial JID operations to require dynamic memory allocation. This JEP seeks to both define and improve the existing JID syntax. This JEP will not explain the general usage or nature of JIDs, instead focusing on syntax.
+JIDs consist of three main parts:
+JIDs are encoded UTF-8. A grammar will be presented first, followed by specific clarifying and further restricting remarks.
+
+
+<JID> ::= [<node>"@"]<domain>["/"<resource>]
+<node> ::= <conforming-char>[<conforming-char>]*
+<domain> ::= <hname>["."<hname>]*
+<resource> ::= <any-char>[<any-char>]*
+<hname> ::= <let>|<dig>[[<let>|<dig>|"-"]*<let>|<dig>]
+<let> ::= [a-z] | [A-Z]
+<dig> ::= [0-9]
+<conforming-char> ::= #x21 | [#x23-#x25] | [#x28-#x2E] |
+ [#x30-#x39] | #x3B | #x3D | #x3F |
+ [#x41-#x7E] | [#x80-#xD7FF] |
+ [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+<any-char> ::= [#x20-#xD7FF] | [#xE000-#xFFFD] |
+ [#x10000-#x10FFFF]
+
+
A domain identifier is a standard DNS hostname as specified in RFC952
Node identifiers are restricted to 256 bytes, They may contain any Unicode character higher than #x20 with the exception of the following:
+Case is preserved, but comparisons will be made in case-normalized canonical form.
+Resources identifiers are case-sensitive and are limited to 256 bytes. They may include any Unicode character greater than #x20, except #xFFFE and #xFFFF.
+To date, resource identifiers have not had a fixed limit on their length. This JEP seeks to limit it to 256 bytes for the following reasons:
+In a worst-case encoding, such as Han ideographs, 256 bytes will provide enough storage space for 64 character points. This provides a lower bound on the number of characters a node may have in its resource.
+Specifying limits in terms of bytes instead of characters is somewhat arbitrary once a lower bound for characters is established. This JEP proposes limits in terms of bytes mainly because doing so results in parsing efficiency; specifically, an implementation does not have to un-encode the UTF-8 string for the sole purpose of further restricting character sets that require fewer than four bytes per character point. It is sufficient to have a lower bound on characters and an upper bound on bytes.
+The ability to discover information about entities on the Jabber network is extremely valuable. Such information might include features offered or protocols supported by the entity, the entity's type or identity, and additional entities that are associated with the original entity in some way (often thought of as "children" of the "parent" entity). While mechanisms for doing so are not defined in &xmppcore;, several protocols have been used in the past within the Jabber community for service discovery, specifically &jep0011; and &jep0094;. However, those protocols are perceived to be inadequate for several reasons:
+Neither Jabber Browsing nor Agent Information is easily extensible. For example, the categories and subcategories listed for JID-Types in JEP-0011 are explicitly defined as the only official categories, and any additions to the list of JID-Types would require a modification to JEP-0011. While the Jabber Browsing specification does allow for the use of unofficial categories and types prefixed with the string 'x-', this introduces migration issues. This lack of flexibility violates one of the Jabber community's core &jep0134;.
In Agent Information, there is no way to advertise supported features. While Jabber Browsing includes such a mechanism, the only way to express the availability of a feature is to advertise a supported protocol namespace. Yet some features may not be uniquely associated with a protocol namespace, which are one implementation of features but not the only one.
A Jabber Browsing result returns a combination of (1) namespaces supported by a Jabber Entity, (2) items associated with a Jabber Entity, and (3) namespaces supported by the associated items. This approach mixes information levels and requires parents to know everything about child nodes, thereby introducing significant confusion.
In both Jabber Browsing and Agent Information, items must be addressable as JIDs; however, this may not be possible in some applications.
This JEP addresses the perceived weaknesses of both the Jabber Browsing and Agent Information protocols. The result is a standards-track protocol for service discovery (often abbreviated to "disco", as is familiar in protocols such as &w3soap;).
+The authors have designed the service discovery protocol with the following requirements in mind:
+The protocol MUST support all functionality supported by the protocols it supersedes (Jabber Browsing and Agent Information).
There are three kinds of information that need to be discovered about an entity:
+All three MUST be supported, but the first two kinds of information relate to the entity itself whereas the third kind of information relates to items associated with the entity itself; therefore two different query types are needed.
+Discovering information about a child item MUST be accomplished by sending a separate discovery request to that item, not to the parent entity. (One result of this is that discovering complete information about an entire tree will require multiple request/response pairs in order to "walk the tree".)
The lists of identities and features MUST be flexible.
The protocol itself MUST be extensible.
A requesting entity may want to discover information about another entity on the network. The information desired generally is of two kinds:
+The target entity's identity. In disco, an entity's identity is broken down into its category (server, client, gateway, directory, etc.) and its particular type within that category (IM server, phone vs. handheld client, MSN gateway vs. AIM gateway, user directory vs. chatroom directory, etc.). This information helps requesting entities to determine the group or "bucket" of services into which the entity is most appropriately placed (e.g., perhaps the entity is shown in a GUI with an appropriate icon). An entity MAY have multiple identities. When multiple identity elements are provided, the name attributes for each identity element SHOULD have the same value.
+The features offered and protocols supported by the target entity. This information helps requesting entities determine what actions are possible with regard to this entity (registration, search, join, etc.), what protocols the entity supports, and specific feature types of interest, if any (e.g., for the purpose of feature negotiation).
In order to discover such information, the requesting entity MUST send an IQ stanza of type "get", containing an empty <query/> element qualified by the 'http://jabber.org/protocol/disco#info' namespace, to the JID of the target entity (the 'to' address is REQUIRED and MUST contain a valid JID; a 'node' attribute on the &QUERY; element is OPTIONAL as described in the Info Nodes and Items Nodes section of this document):
+The target entity then MUST either return an IQ result, or return an error (see the Error Conditions section of this document). The result MUST contain a <query/> element qualified by the 'http://jabber.org/protocol/disco#info' namespace, which in turn contains one or more <identity/> elements and one or more <feature/> elements. (Note: Every entity MUST have at least one identity, and every entity MUST support at least the 'http://jabber.org/protocol/disco#info' feature; however, an entity is not required to return a result and MAY return an error, most likely &feature; or &unavailable;, although other error conditions may be appropriate.) Each <identity/> element MUST possess 'category' and 'type' attributes specifying the category and type for the entity, and MAY possess a 'name' attribute specifying a natural-language name for the entity. Each <feature/> element MUST possess a 'var' attribute whose value is a protocol namespace or other feature offered by the entity. Preferably, both the category/type values and the feature values will be registered in a public registry, as described in the Jabber Registrar Considerations section of this document.
+If the JID of the specified target entity does not exist, the server or other authoritative entity SHOULD return an ¬found; error, unless doing so would violate the privacy and security considerations specified in XMPP Core and &xmppim; or local privacy and security policies (see also the Security Considerations of this document):
+If privacy and security considerations or policies prevent the server or other authoritative entity from returning an ¬found; error, it SHOULD return a &unavailable; error instead:
+When an entity sends a disco#info request to a bare JID (<account@domain.tld>) hosted by a server, the server itself MUST reply on behalf of the hosted account, either with an IQ-error or an IQ-result. For important rules regarding access to this functionality, see the Security Considerations section of this document. In particular, in response to a disco#info request sent to a bare JID with no node, if access is not denied the server SHOULD return an IQ-result for the bare JID, in which the primary identity SHOULD have a category of "account" with an appropriate type as specified in the Service Discovery Identities registry (most likely, a type of "registered"). Note: This enables authorized or trusted entities to discover whether the account exists and its account type (e.g., in IM systems to determine the existence of an account before adding it to a contact's roster).
+Here we assume that shakespeare.lit is trusted by capulet.com and that the account <juliet@capulet.com> is a registered account:
+A query sent to an associated entity may result in different or more detailed information. One example is sending a query to a particular conference room rather than the parent conference service:
+Another example of this is sending a query to a specific connected resource for an IM user:
+A disco#info query MAY also be directed to a specific node identifier associated with a JID, although the primary use of nodes is as Items Nodes rather than as info nodes:
+In order for the requesting entity to discover the items associated with a Jabber Entity, it MUST send an IQ stanza of type "get" to the target entity, containing an empty <query/> element qualified by the 'http://jabber.org/protocol/disco#items' namespace:
+The target entity then MUST either return its list of publicly-available items, or return an error. The list of items MUST be provided in an IQ stanza of type "result", with each item specified by means of an <item/> child of a <query/> element qualified by the 'http://jabber.org/protocol/disco#items' namespace (the <item/> child MUST possess a 'jid' attribute specifying the JID of the item and MAY possess a 'name' attribute specifying a natural-language name for the item):
+The <item/> element MUST NOT contain XML character data and SHOULD be empty; while it MAY contain XML data in another namespace, such data MUST be ignored if an implementation does not understand it.
+If there are no items associated with an entity (or if those items are not publicly available), the target entity MUST return an empty query element to the requesting entity:
+As with disco#info requests, when an entity sends a disco#items request to a bare JID (<account@domain.tld>) hosted by a server, the server itself MUST reply on behalf of the hosted account. For important rules regarding access to this functionality, see the Security Considerations section of this document. In particular, in response to a disco#items request sent to a bare JID with no node, if access is not denied the server SHOULD return the associated items including connected or available resources as appropriate:
+Here we assume that shakespeare.lit is trusted by capulet.com and that the account <juliet@capulet.com> has two available resources:
+It is possible that an item associated with an entity will not be addressable as a JID; examples might include offline messages stored in an inbox (see &jep0013;), entries in a Jabber-enabled weblog, XML-RPC services associated with a client or component, items available in an online trading system (e.g., a catalog or auction), news postings located at an NNTP gateway, and topics hosted by a &jep0060; component. In order to handle such items, the <item/> element MAY possess an OPTIONAL 'node' attribute that supplements the REQUIRED 'jid' attribute.
+The value of the node attribute may or may not have semantic meaning; from the perspective of Service Discovery, a node is merely something that is associated with an entity. In order to discover more about the node, the requesting entity MUST query the entity's JID while specifying the node. If the value of the 'node' attribute has semantic meaning, that meaning is provided by the using protocol or application, not by the Service Discovery protocol. A node attribute SHOULD NOT be included unless it is necessary to provide or discover information about an entity that cannot be directly addressed as a JID (i.e., if the associated item can be addressed as a JID, do not include a node). The value of the 'node' attribute MUST NOT be null.
+In the following example, a user requests all available items from an online catalog service:
+If there are items associated with the target entity but they are not addressable as JIDs, the service SHOULD then return a list of nodes (where each <item/> element MUST possess a 'jid' attribute, SHOULD possess a 'node' attribute, and MAY possess a 'name' attribute):
+There may be futher nodes associated with the "first-level" nodes returned in the above query (e.g., the nodes may be categories that have associated items). The requesting entity can query a node further by sending a request to the JID and specifying the node of interest in the query.
+The service then returns the further nodes associated with the "parent" node. In the following example, the service itself enforces an alphabetically-ordered hierarchical structure on the nodes that are returned, but such a structure is a matter of implementation rather than protocol.
+The requesting entity can then query further if desired:
+The foregoing examples show a hierarchy of nodes, in which some nodes are branches (i.e., contain further nodes) and some nodes are leaves (i.e., do not contain further nodes). The "hierarchy" category SHOULD be used to identify such nodes, where the "branch" and "leaf" types are exhaustive of the types within this category.
+If the hierarchy category is used, every node in the hierarchy MUST be identified as either a branch or a leaf; however, since a node MAY have multiple identities, any given node MAY also possess an identity other than "hierarchy/branch" or "hierarchy/leaf".
+Therefore, a disco#info request to the "music/D" node shown above would yield <identity category='hierarchy' type='branch'/> while a disco#info request to the "music/D/dowland-firstbooke" node would yield <identity category='hierarchy' type='leaf'/> (and each node could yield additional identities as appropriate).
+This section explains in greater detail the relationship between an entity and its associated items.
+In general, the items returned by an entity in a disco#items result MUST be items over which the entity has some relationship of ownership -- either direct control over the item itself (e.g., Publish-Subscribe nodes owned by the entity) or at least the ability to provide or vouch for the item in a canonical way on the Jabber network (e.g., groupchat rooms directly hosted by a multi-user chat service or IRC channels to which a gateway provides access).
+Such a relationship does not constrain the relationship between the owning entity's address and the address of the associated entity. In particular, any of the following scenarios is perfectly acceptable:
+Upon querying an entity (JID1) for items, one receives a list of items that can be addressed as JIDs; each associated item has its own JID, but no such JID equals JID1.
Upon querying an entity (JID1) for items, one receives a list of items that cannot be addressed as JIDs; each associated item has its own JID+node, where each JID equals JID1 and each NodeID is unique.
Upon querying an entity (JID1+NodeID1) for items, one receives a list of items that can be addressed as JIDs; each associated item has its own JID, but no such JID equals JID1.
Upon querying an entity (JID1+NodeID1) for items, one receives a list of items that cannot be addressed as JIDs; each associated item has its own JID+node, but no such JID+node equals JID1+NodeID1 and each NodeID is unique in the context of the associated JID.
In addition, the results MAY also be mixed, so that a query to a JID or a JID+node could yield both (1) items that are addressed as JIDs and (2) items that are addressed as JID+node combinations.
+Consider the case of an entity that owns multiple publish-subscribe nodes -- for example, a person who owns one such node for each of his music players. The following examples show what the disco#items query and result might look like (using the protocol defined in &jep0118;):
+The queried entity now returns a list of publish-subscribe nodes over which it has control, each of which is hosted on a different pubsub service:
+The server handling rules defined in XMPP IM require that the server itself reply on behalf of the user if the 'to' attribute of an IQ get or set is of the form <user@host>. This functionality is currently employed so that the user can "publish" information (e.g., vCard information as specified in &jep0054;) in a way that makes it possible for other entities to retrieve that information even if the user is unavailable. The service discovery specification defined herein builds on that notion by enabling a user to publish some of its service discovery information to the server, which shall store that information in persistent storage and return that information when other entities request it from the user's "bare JID" (user@host), either alone or in combination with a particular node.
+Implementations of service discovery that are built into instant messaging servers SHOULD allow users to publish items in this fashion, although they are not required to do so in order to conform to the service discovery specification. In order to discover whether his or her server supports this publish functionality, the user SHOULD send a disco#info request to his or her server:
+If the server supports service discovery publishing and the server wishes to disclose that fact to the user, it MUST include a feature of 'http://jabber.org/protocol/disco#publish' in its response.
+In order to publish items, an entity uses an IQ-set transaction to its server, which is responsible for responding to requests on behalf of that entity. Each <item/> child element of the parent query MUST possess the following attributes:
+The <item/> element MAY also possess the following attributes:
+The allowable values for the 'action' attribute are "update" and "remove"). If the action is "update", the server MUST either create a new entry (if the node and jid combination does not already exist) or overwrite an existing entry. If the action is "remove", the item MUST be removed from persistent storage.
+The following example shows a user publishing a list of his biological children to a well-known (but fictitious) service discovery node.
+Subsequent queries to "jid='kinglear@shakespeare.lit'" and "node='jabber:iq:kids'" will yield the list shown above (absent the 'action' attributes).
+ +If the server or service does not support persistent storage, it MUST respond to IQ-set requests with a &feature; error.
+ +In order to retrieve full information about an entity and its associated items, the requesting application needs to "walk the tree" of items. Naturally, this can result in a large number of requests and responses. The requesting application SHOULD NOT send follow-up requests to all items associated with an entity if the list of such items is long (e.g., more than twenty items). Entities that will routinely host a large number of items (e.g., IRC gateways or NNTP services) SHOULD structure nodes into hierarchies and/or provide more robust searching capabilities, for example via &jep0055;; they SHOULD NOT return extremely large result sets via Service Discovery.
+This JEP does not require that a responding entity must return the same results in response to the same request from different requesting entities (e.g., an entity could return a different list of items or features based on the degree to which it trusts the requesting entity, or based on the known capabilities of the requesting entity). However, the responding entity SHOULD return the same <identity/> element (category+type) to all disco#info requests sent to the same JID+node combination.
+If a specific entity (JID or JID+node) does not support the disco namespace, refuses to return disco results to the specific requesting entity, or refuses to return disco results to any requesting entity, it SHOULD return an appropriate error message (such as &unavailable;, &forbidden;, or ¬allowed;, respectively). One example is shown below.
+Other error conditions may be appropriate depending on the application.
+The following table summarizes the common error conditions that can have special meaning in the context of Service Discovery (for information regarding error condition syntax and semantics, see &jep0086;).
+Condition | +Cause | +
---|---|
&feature; | +The sender has attempted to publish items but the server does not support the Publishing Available Items feature. | +
¬found; | +The JID or JID+NodeID of the specified target entity does not exist and that fact can be divulged in accordance with privacy and security considerations and policies. | +
&unavailable; | +The target entity does not support this protocol, or the specified target entity does not exist but that fact cannot be divulged because of pricacy and security considerations. | +
The other error conditions specified in XMPP Core MAY be returned as well (&forbidden;, ¬allowed;, ¬authorized;, etc.), including application-specific conditions.
+As noted above, if an entity has no associated items, it MUST return an empty &QUERY; element (rather than an error) in response to a disco#items request.
+Certain attacks may be made easier when an entity discloses (via disco#info responses) that it supports particular protocols or features; however, in general, service discovery introduces no new vulnerabilities, since a malicious entity could discover that the responding entity supports such protocols and features by sending requests specific to those protocols rather than by sending service discovery requests.
+A responding entity is under no obligation to return the identical service discovery response when replying to service discovery requests received from different requesting entities, and MAY perform authorization checks before responding in order to determine how (or whether) to respond.
+A server MUST carefully control access to any functionality that would enable directory harvesting attacks or that would leak information about connected or available resources; this functionality consists of the server's replies to disco#info and disco#items requests sent to bare JIDs (addresses of the form account@domain.tld) hosted on the server, since the server responds to such requests on behalf of the account. The following rules apply to the handling of service discovery requests sent to bare JIDs:
+In response to a disco#info request, the server MUST return a &unavailable; error if one of the following is true:
+In response to a disco#items request, the server MUST return an empty result set if:
+This JEP requires no interaction with &IANA;.
+The ®ISTRAR; includes the 'http://jabber.org/protocol/disco#info' and 'http://jabber.org/protocol/disco#items' namespaces in its registry of protocol namespaces.
+The Jabber Registrar shall maintain a registry of values for the 'category' and 'type' attributes of the <identity/> element in the 'http://jabber.org/protocol/disco#info' namespace; see <http://www.jabber.org/registrar/disco-categories.html>.
+
+ the name of the category (all lower-case)
+ a natural-language description of the category
+
+ the name of the specific type (all lower-case)
+ a natural-language description of the type
+ the document (e.g., JEP) in which this type is specified
+
+
+ ]]>
+ The registrant may register more than one category at a time, each contained in a separate <category/> element. The registrant may also register more than one type at a time, each contained in a separate <type/> child element. Registrations of new types within an existing category must include the full XML snippet but should not include the category description (only the name).
+This JEP defines a "hierarchy" category that contains two and only two types: "branch" and "leaf"; the associated registry submission is as follows:
+
+ hierarchy
+
+ An entity that exists in the context of a
+ service discovery node hierarchy.
+
+
+ branch
+
+ A "container node" for other entities in a
+ service discovery node hierarchy.
+
+ JEP-0030
+
+
+ leaf
+
+ A "terminal node" in a service discovery
+ node hierarchy.
+
+ JEP-0030
+
+
+ ]]>
+ The Jabber Registrar shall maintain a registry of features for use as values of the 'var' attribute of the <feature/> element in the 'http://jabber.org/protocol/disco#info' namespace; see <http://www.jabber.org/registrar/disco-vars.html>.
+
+ a natural-language description of the feature
+ the document (e.g., JEP) in which this feature is specified
+]]>
+ The registrant may register more than one feature at a time, each contained in a separate <feature/> element.
+This JEP defines a "publish" feature that is not associated with either of the protocol namespaces listed above; the registry submission for this feature is as follows:
+
+ the service discovery "publish" feature
+ JEP-0030
+
+ ]]>
+ A using protocol may specify one or more service discovery nodes that have a special and well-defined meaning in the context of that protocol. For the purpose of reserving these node names globally across all Jabber protocols, the Jabber Registrar shall maintain a registry of well-known service discovery nodes; see <http://www.jabber.org/registrar/disco-nodes.html>.
+
+ the name of the node
+ a natural-language description of the node
+ the document (e.g., JEP) in which this node is specified
+
+ ]]>
+ The registrant may register more than one node at a time, each contained in a separate <node/> element.
+As authorized by &jep0147;, the Jabber Registrar maintains a registry of queries and key-value pairs for use in XMPP URIs (see &QUERYTYPES;).
+The "disco" querytype is defined herein for service discovery interactions, with three keys: (1) "node" (the optional node to query), (2) "request" (with values of "info" to retrieve service discovery information and "items" to retrieve service discovery items), and (3) "type" (with values of "get" for IQ-gets and "set" for IQ-sets).
+The following submission registers the "disco" querytype.
+
+ disco
+ http://jabber.org/protocol/disco
+ enables interaction for the purpose of service discovery
+ JEP-0030
+
+
+ node
+ the (optional) service discovery node
+
+
+ request
+ the service discovery request type
+
+
+ info
+ a service discovery information (disco#info) request
+
+
+ items
+ a service discovery items (disco#items) request
+
+
+
+
+ type
+ the IQ type
+
+
+ get
+ an IQ get
+
+
+ set
+ an IQ set (disco publish)
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0030: http://www.jabber.org/jeps/jep-0030.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0030: http://www.jabber.org/jeps/jep-0030.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+ Peter Millard, a co-author of this specification from version 0.1 through version 2.2, died on April 26, 2006.
++Instant messaging has clearly crossed the chasm from experimental +to mainstream in a short amount of time. It is particularly +interesting to note the extent to which the employees and +affiliates of large enterprises have adopted instant messaging as +part of their daily professional lives. IM is no longer simply +used on Friday evening to select which movie to watch; it's now +used on Monday morning to select which company to acquire. +
+ ++While the benefits of IM are clear and compelling, the risks +associated with sharing sensitive information in an IM +environment are often overlooked. We need a mechanism that +permits communities of users to protect their IM conversations. +This document presents an extension protocol that can be +incorporated into the existing Jabber protocol to provide such a +mechanism. We hope that this protocol spurs both interest +and further investigation into mechanisms to protect Jabber +conversations. We also hope that the Jabber community can +accelerate the adoption of standardized security mechanisms. +
+ ++In addition to its ability to protect traditional messaging data, +the proposed protocol may also serve as a foundation for securing +other data transported via other Jabber extensions. +
+ ++We use the following terms throughout this document to describe +the most relevant aspects of the IM environment that we wish to +address: +
+ ++user. A user is simply any Jabber user. Users are uniquely +identified by a JID; they connect to Jabber hosts using a +Jabber node. +
++Users produce and consume information, and we wish to +provide them with mechanisms that can be used to protect +this information. +
++community. A community is a collection of users who wish to +communicate via Jabber. No restrictions or assumptions are +made about the size of communities or the geographical, +organizational, or national attributes of the members. +Communities are assumed to be dynamic and ad-hoc. Users +typically join communities by the simple act of invitation. +All members of a community are assumed to be peers. +
++The members of communities share information among +themselves, and we wish to provide them with mechanisms +that can permit information to only be shared by community +members. +
++conversation. A conversation is the set of messages +that flows among the members of a community via some +network. Conversations consist of both the actual +conversation data produced and consumed by the various +users as well as the Jabber protocol elements that +transport it. Members participate in a conversation when +they are the source or destination of this traffic. +
++In hostile network environments, like the Internet, +conversation data is vulnerable to a variety of well-known +attacks. +
++Other Jabber and IM terms are used in a traditional, intuitive +fashion. +
+ ++The proposed protocol is designed to address the specific +requirements and considerations presented in this section. +
+ ++A secure IM system must permit conversation participants to +preserve the following properties of their conversation data: +
+ ++confidentiality. Conversation data must only be disclosed +to authorized recipients +
++integrity. Conversation data must not be altered +
++data origin authentication. Recipients must be able to +determine the identity of the sender and trust that the +message did, in fact, come from the sender. It is important +to note that this requirement does not include the +requirement of a durable digital signature on conversation +data. +
++replay protection. Recipients must be able to detect and +ignore duplicate conversation data. +
++These are established, traditional goals of information security +applied to the conversation data. In the IM environment, these +goals protect against these attacks: +
+ ++eavesdropping, snooping, etc. +
++masquerading as a conversation participant +
++forging messages +
++Preserving the availability of conversation data is not addressed +by this protocol. +
+ ++Preserving the anonymity of conversation participants is an +interesting topic which we defer for future exploration. +
+ ++Finally, note that this protocol does not concern any authentication +between a Jabber node and a Jabber host. +
+ ++A secure IM system must support a data classification feature through the use +of security labeling. Conversation participants must be +able to associate a security label with each piece of +conversation data. This label may be used to specify a data +classification level for the conversation data. +
+ ++It is easy to imagine Jabber systems in which the servers play +active, fundamental roles in the protection of conversation +data. Such systems could offer many advantages, like: +
+ ++allowing the servers to function as credential issuing +authorities, +
++allowing the servers to function as policy enforcement +points. +
++Unfortunately, such systems have significant disadvantages when +one considers the nature of instant messaging: +
+ ++Many servers may be untrusted, public servers. +
++In many conversation communities, decisions of trust and +membership can only be adequately defined by the members +themselves. +
++In many conversation communities, membership in the +community changes in real time based upon the dynamics of +the conversation. +
++In many conversation communities, the data classifaction of +the conversation changes in real time based upon the +dynamics of the conversation. +
++Furthermore, the widespread use of gateways to external IM +systems is a further complication. +
+ ++Based on this analysis, we propose that security be entirely +controlled in an end to end fashion by the conversation +participants themselves via their user agent software. +
+ ++We believe that, ultimately, trust decisions are in the hands of +the conversation participants. A security protocol and +appropriate conforming user agents must provide a mechanism for them to make +informed decisions. +
+ ++One of the accepted axioms of security is that people must avoid +the temptation to start from scratch and produce new, untested +algorithms and protocols. History has demonstrated that such +approaches are likely to contain flaws and that considerable time +and effort are required to identify and address all of these +flaws. Any new security protocol should be based on existing, +established algorithms and protocols. +
+ ++Any new IM security protocol must integrate smoothly into the +existing IM environment, and it must also recognize the nature of +the transactions performed by conversation participants. These +considerations are especially important: +
+ ++dynamic communities. The members of a community are defined +in near real time by the existing members. +
++dynamic conversations. Conversations may involve any +possible subset of the entire set of community members. +
++Addressing these considerations becomes especially crucial when +selecting a conference keying mechanism. +
+ ++Given the requirement to place the responsibility for the +protection of conversation data in the hands of the participants, +it is imperative to address some fundamental usability issues: +
+ ++First, overall ease of use is a requirement. For protocol +purposes, one implication is that some form of +authentication via passphrases is necessary. While we +recognize that this can have appalling consequences, +especially when we realize that a passphrase may be shared +by all of the community members, we also recognize the +utility. +
++PKIs are well established in many large organizations, and +some communities will prefer to rely on credentials issued +from these authorities. To ensure ease of use, we must +strive to allow the use of existing PKI credentials and +trust models rather than impose closed, Jabber-specific +credentials. +
++Finally, performance must not be negatively impacted; this +is particularly true if we accept that most communities are +composed of human users conversing in real time. For +protocol purposes, one obvious implication is the desire to +minimize computationally expensive public key operations. +
++We note that, in practice, the design and construction of user +agents will also have a major impact on ease of use. +
+ ++To successfully integrate into the existing Jabber environment, +an extension protocol for security must satisfy the following: +
+ ++It must be an optional extension of the existing Jabber protocol. +
++It must be transparent to existing Jabber servers. +
++It must function gracefully in cases where some community +members are not running a user agent that supports the +protocol. +
++It must make good use of XML. +
++It must avoid encumbered algorithms. +
++It must be straightforward to implement using widely +available cryptographic toolkits. +
++It must not require a PKI. +
++Failure to accommodate these will impede or prohibit adoption of +any security protocol. +
+ ++Ultimately, conversation data is protected by the application of +keyed cryptographic operations. One operation is used to provide +confidentiality, and a separate operation is used to provide +integrity and data origin authentication. The keys used to +parameterize these operations are called conversation keys. Each +conversation should have its own unique set of conversation keys +shared among the conversation participants. +
+ ++Conversation keys are transported among the conversation +participants within a negotiated security session. A security session allows +pairs of conversation participants to securely share conversation keys +throught all participants in the conversation as required. +
+ ++The following terms are used throughout this specification: +
+ ++initiator. The initiator is the user who requested a security session +negotiation. Initiator's are identified by their JID. +
++responder. The responder is the user who responded to a security session +negotiation request. Responder's are identified by their JID. +
++hmac. This indicates the HMAC algorithm. The notation hmac (key, value) +indicates the HMAC computation of value using key. +
++concatentation operator. The '|' character is used in character or octet +string expressions to indicate concatenation. +
++security session ID. A character string that uniquely identifies a +security session between two users. Security session IDs MUST only +consist of Letters, Digits, and these characters: '.', '+', '-', +'_', '@'. Security session IDs are case sensitive. +
++SS. This term indicates the security session secret that is agreed to +during a security session negotiation. +
++SKc. This term indicates the keying material used within a security session +to protect confidentiality. The SKc is derived from the security session secret, SS. +
++SKi. This term indicates the keying material used within a security session +to protect integrity and to provide authnetication. The SKi is derived from the +security session secret, SS. +
++conversation key ID. A character string that uniquely identifies a +conversation key shared by a community of users. Conversation key IDs MUST only +consist of Letters, Digits, and these characters: '.', '+', '-', +'_', '@'. Conversation key IDs are case sensitive. Conversation key IDs SHOULD +be generated from at least 128 random bits. +
++passphrase ID. A character string that uniquely identifies a +passphrase shared by a community of users. Passphrase IDs MUST only +consist of Letters, Digits, and these characters: '.', '+', '-', +'_', '@'. Passphrase IDs are case sensitive. +
++Since cryptographic operations are applied to data that is +transported within an XML stream, the protocol defines a set of +rules to ensure a consistent interpretation by all conversation +participants. +
+ ++Binary data, such as the result of an HMAC, is always transported +in an encoded form; the two supported encoding schemes are base64 +and hex. +
+ ++Senders MAY include arbitrary white space within the character +stream. Senders SHOULD NOT include any other characters outside +of the encoding set. +
+ ++Receivers MUST ignore all characters not in the encoding set. +
+ ++Encrypted data, including wrapped cryptographic keys, are always +wrapped per XML Encryption. +
+ + ++HMACs are computed over a specific collection of attribute values +and character data; when computing an HMAC the following rules +apply: +
+ ++All characters MUST be encoded in UTF-8. +
++The octets in each character MUST be processed in network +byte order. +
++For a given element, the attribute values that are HMACed +MUST be processed in the specified order regardless of the +order in which they appear in the element tag. +
++For each attribute value, the computation MUST only include +characters from the anticipated set defined in this +specification; in particular, white space MUST always be +ignored. +
++For character data that is represented in an encoded form, +such as base64 or hex, the computation MUST only include +valid characters from the encoding set. +
++The following algorithm is used to encrypt a character string, such as +an XML element: +
+ ++The character string MUST be encoded in UTF-8. +
++The octets in each character MUST be processed in network byte order. +
++Appropriate cryptographic algorithm parameters, such as an +IV for a block cipher, are generated. +
++In order to integrate smoothly with the existing Jabber protocol, +this protocol utilizes a new XML namespace, jabber:security. +
+ ++A security session is a pair-wise relationship between two users +in which the users have achieved the following: +
+ ++They have mutually authenticated each other using credentials acceptable to both. +
++They have agreed on a set of key material known only to both. +
++Security sessions are identified by a 3-tuple consisting of the following items: +
+ ++initiator. This is the JID of the user who initiated the session. +
++responder. This is the JID of the user who responded to the initiator's request. +
++sessionId. A label generated by the initiator. +
++Security sessions are used to transport conversation keys between the conversation participants. +
+ ++Scalabilty is an immediate, obvious concern with such an approach. We expect this +approach to be viable in practice because: +
+ ++The number of participants in typical, interactive conversations is generally on the order of 10^1. +
++New participants are usually invited to dynamically join a +conversation by being invited by an existing participant; +this existing participant is the only one who needs to +establish a security session with the new participant, +because this single security session can be used to +transport all of the required conversation keys. +
++User agents can permit the lifetime of security sessions to +last long enough to allow transport of conversation keys +for a variety of converstions. +
++Conversation keys can be established with a suitable lifetime. +
++Other approaches, including the incorporation of more +sophisticated conference keying algorithms, are a topic for +future exploration. +
+ ++Security sessions are negotiated using an authenticated Diffie-Hellman key agreement +exchange. The two goals of the exchange are to perform the mutual authentication +and to agree to a secret that is know only to each. +
+ ++The exchange also allows the parties to negotiate the various algorithms +and authentication mechanisms that will be used. +
+ ++Once the pair agree on a shared secret, they each derive key material from the +secret; this key material is used to securely transport the conversation keys, +which are used to actually protect conversation data. +
+ ++The protocol data units (PDUs) that comprise the exchange are transported +within existing Jabber protocol elements. +
+ ++The initiator's user agent employs the following algorithm to generate the session1 PDU: +
+ ++Appropriate values for the version, initiator, responder, +sessionId, and hmac attributes are assembled. The version of +this specification is '1.0'. The values of initiator and +responder MUST be the JIDs of the two participants, +respectively. +
++The nonce is prepared by first generating a string of 20 +random octets (160 random bits). The octets are then +encoded into a string of 40 hex characters representing the +random string. +
++A Diffie-Hellman group is selected. The appropriate values +for g and p will be used to generate the initiator's public +key. +
++An ephemeral private key, x, is generated using g and p +for the selected group. This key MUST be generated using an +appropriate random number source. The corresponding public +key, g^x, is generated and encoded. +
++The desired set of confidentiality and HMAC cryptographic +algorithms is selected. The manner in which these +algorithms are selected and all related policy issues are +outside the scope of this specification. +
++The desired set of authentication algorithms is selected. +The manner in which these algorithms are selected and all +related policy issues are outside the scope of this +specification. When the digital signature form of +authentication is selected, the relevant end-entity +certificate and, optionally, a chain of CA certificates +representing a validation path, is assembled and encoded. A +set of trusted CA certificates MAY optionally be included +via caCertificate elements; if so, the set MUST include the +issuer of the initiator's end-entity certificate. +
++These values are then used to prepare the XML session1 element; +this element is transmitted via the existing Jabber iq mechanism: +
+ ++The responder's user agent employs the following algorithm to process each session1 PDU: +
+ ++The version and hmac attributes are checked against the +values supported by the user agent. An unsupported version +results in an error code of 10000, and an unsupported hmac +results in an error code of 10001. The responder attribute MUST +match the JID of the receiver; a mismatch results in an error code of 10009 +
++The nonce is decoded, and its length is checked. The nonce +may also be checked to detect replays. An invalid nonce +results in an error code of 10002. +
++The Diffie-Hellman group is checked against the values +supported by the user agent. An unsupported group results +in an error code of 10003 +
++The desired confidentiality and HMAC cryptographic +algorithms are selected from the proposed set. The manner +in which these algorithms are selected and all related +policy issues are outside the scope of this specification. +If none of the proposed algorithms are supported, an error +code of 10004 occurs. +
++The desired authentication algorithm is selected from the +proposed set. The manner in which this algorithm is +selected and all related policy issues are outside the +scope of this specification. In the digital signature case, +the responder's end-entity +certificate MUST be issued by one of the trusted CAs listed +in the session1 PDU or by the same issuer as the +initiator's end-entity certificate. If none of the proposed +algorithms are supported, an error code of 10005 results. +If the responder does not have acceptable credentials, an +error code of 10006 occurs. +
++If any errors occur during processing, the session negotiation +fails, and the error is communicated via the existing Jabber iq +mechanism: +
+ ++If no errors occur, then the responder's user agent proceeds with +the session2 PDU. +
+ ++The responder's user agent employs the following algorithm to generate the session2 PDU: +
+ ++Appropriate values for the version, initiator, responder, +sessionId, and hmac attributes are assembled. The version of +this specification is '1.0'. The values of initiator and +responder MUST be the JIDs of the two participants, +respectively. The sessionId and hmac values MUST match the +sessionId and hmac values contained in the session1 PDU. +
++The nonce is prepared by first generating a string of 20 +random octets (160 random bits). The octets are then +encoded into a string of 40 hex characters representing the +random string. +
++An ephemeral private key, y, is generated using g and p +for the group indicated by the session1 PDU. This key MUST +be generated using an appropriate random number source. The +corresponding public key, g^y, is generated and encoded. +
++The desired pair of confidentiality and HMAC cryptographic +algorithms is selected. The manner in which this pair is +selected and all related policy issues are outside the +scope of this specification. +
++The desired authentication algorithm is selected. The +manner in which this algorithm is selected and all related +policy issues are outside the scope of this specification. +When the digital signature form of authentication is +selected, the relevant end-entity certificate and, +optionally, a chain of CA certificates representing a +validation path, is assembled and encoded. +
++Based on the selected authentication algorithm, the +responder's authenticator is constructed. A digital signature algorithm +requires calculating: +
++HK = hmac (initiator's nonce | responder's nonce, g^xy) +
++HASH_R = hmac (HK, version | sessionId | g^y | g^x | responder's JID) +
++HASH_R is signed using the responder's private key and encoded in PKCS#1 format. +The PKCS#1 octets are then further encoded in base64 or hex. +
++The passphrase algorithm requires calculating: +
++HK = hmac (hash (passphrase), initiator's nonce | responder's nonce) +
++HASH_R = hmac (HK, version | sessionId | g^y | g^x | responder's JID) +
++The octets of HASH_R are simply encoded in base64 or hex. +
++The manner in which the responder's user agent gains access +to the responder's credentials is outside the scope of this +specification. +
++These values are then used to prepare the XML session2 element; +this element is transmitted via the existing Jabber iq mechanism: +
+ ++The initiator's user agent employs the following algorithm to process each session2 PDU: +
+ ++The attribute values are checked against the values sent in +the session1 PDU. A mismatch results in an error code of +10008. +
++The nonce is decoded, and its length is checked. The nonce +may also be checked to detect replays. An invalid nonce +results in an error code of 10002. +
++The Diffie-Hellman group is checked against the value sent +in the session1 PDU. A mismatch results in an error code of 10003 +
++The confidentiality and HMAC cryptographic algorithms are +validated against the set proposed in the session1 PDU. A +mismatch results in an error code of 10004. +
++The authentication algorithm is validated against the set +proposed in the session1 PDU. A mismatch results in an +error code of 10005. +
++The authenticator is verified. A failure results in an error code of 10007. +
++If any errors occur during processing, the session negotiation +fails, and the error is communicated via the existing Jabber iq +mechanism: +
+ ++If no errors occur, then the initiator's user agent proceeds with the session3 PDU. +
+ ++The initiator's user agent employs the following algorithm to generate the session3 PDU: +
+ ++Appropriate values for the version, initiator, responder, +sessionId, and hmac attributes are assembled. The version of +this specification is '1.0'. The values of initiator and +responder MUST be the JIDs of the two participants, +respectively. The sessionId and hmac values MUST match the +sessionId and hmac values contained in both the session1 and +session2 PDUs. +
++Based on the selected authentication algorithm, the +initiator's authenticator is constructed. A digital signature algorithm +requires calculating: +
++HK = hmac (initiator's nonce | responder's nonce, g^xy) +
++HASH_I = hmac (HK, version | sessionId | g^x | g^y | initiator's JID) +
++HASH_I is signed using the responder's private key and encoded in PKCS#1 format. +The PKCS#1 octets are then further encoded in base64 or hex. +
++The passphrase algorithm requires calculating: +
++HK = hmac (hash (passphrase), initiator's nonce | responder's nonce) +
++HASH_I = hmac (HK, version | sessionId | g^x | g^y | initiator's JID) +
++The octets of HASH_I are simply encoded in base64 or hex. +
++The manner in which the initiator's user agent gains access +to the initiator's credentials is outside the scope of this +specification. +
++A set of conversation keys may optionally be included in +the response. This should typically be the case since +security sessions are negotiated for the sole purpose of +key transport. +
++These values are then used to prepare the XML session3 element; +this element is transmitted via the existing Jabber iq mechanism: +
+ ++The responder's user agent employs the following algorithm to process each session3 PDU: +
+ ++The attribute values are checked against the values sent in +the session2 PDU. A mismatch results in an error code of +10008. +
++The authenticator is verified. A failure results in an error code of 10007. +
++Any keys included in the PDU are processed and added to the user agent's key store. +
++If any errors occur during processing, the session negotiation +fails, and the error is communicated via the existing Jabber iq +mechanism: +
+ ++TBA +
+ ++Conversation keys are used to protect conversation data. +
+ ++Conversation keys are transported using the symmetric key wrap feature of +XML Encryption embedded in the keyTransport PDU. +
+ ++The sender's user agent employs the following algorithm to generate the keyTransport PDU: +
+ ++Appropriate values for the version, initiator, responder, and +sessionId attributes are assembled. The version of +this specification is '1.0'. The values of initiator and +responder MUST be the JIDs of the two participants who negotiated the +security session, respectively, and they +MUST correspond to an existing security session. +
++The key's identifier, convId, is assembled. +
++The payload, which consists of the confidentiality key and the integrity key, is wrapped +in instances of xenc:EncryptedKey as follows: +
++The Type attribute of the xenc:EncryptedKey element MUST indicate 'content'. +
++The Id, MimeType and Encoding attributes of the xenc:EncryptedKey element MUST NOT +be present. +
++The xenc:EncryptionMethod element MUST be present, and the Algorithm attribute +MUST indicate a valid symmetric key wrap algorithm. Furthermore, the +algorithm MUST be the same as was negotiated for the security session. +
++The ds:KeyInfo element MUST NOT be present. The key to use is SKc of the +security session. +
++The xenc:CipherData element MUST be present, and it MUST use the CipherValue choice. +
++The HMAC is computed using SKi of the security session over the following values: +
++the version attribute of the keyTransport element +
++the initiator attribute of the keyTransport element +
++the responder attribute of the keyTransport element +
++the sessionId attribute of the keyTransport element +
++the character string used to construct the body of the convId element +
++These values are then used to prepare the XML keyTransport element; +this element is transmitted via the existing Jabber iq mechanism: +
+ ++The receiver's user agent employs the following algorithm to process each keyTransport PDU: +
+ ++The values of the version, initiator, responder, and sessionId are validated; initiator, +responder, and sessionId MUST indicate an existing security session. +A version mismatch results in an error code of 10000; an invalid security session +results in an error of 10010. +
++The payload, which consists of the confidentiality key and the intergrity key, is unwrapped. +Any failures result in an error code of 10012. +
++The body of the HMAC element is decoded into the actual HMAC octet string. +
++The HMAC is validated. An invalid HMAC results in an error code of 10011. +
++The keys are added to the user agent's key store. +
++If any errors occur during processing, the error is communicated via the existing Jabber iq +mechanism: +
+ ++The ultimate goal is, of course, the protection of conversation data. The protocol exchanges +described above allow the conversation participants to cryptographically protect their conversation data using the conversation keys that they share. +
+ ++A protected message is defined as a traditional Jabber message whose body content +is extended to include the transport of a cryptographically protected message body. +The two key features are +
+ ++First, the usual body element contains some arbitrary text. Those familiar with the +evolution of email protocols will recognize this trick as the same one used +when MIME was introduced. +
++Second, the message contains a Jabber x element defining the Jabber:security:message +namespace; this element transports the protected message. +
++This mechanism has the advantages of allowing transparent integration with existing +Jabber servers and existing Jabber clients. +
+ ++The sender's user agent employs the following algorithm to generate the protectedMessage PDU: +
+ ++Appropriate values for the version, from, to, convId, and +seqNum attributes are assembled. The version of +this specification is '1.0'. The value of convId MUST correspond to an existing, valid key. +
++The actual message body is encoded into a character string corresponding to a Jabber message body element. This character string is then wrapped in an instance of xenc:EncryptedData as follows: +
++The Type attribute of the xenc:EncryptedData element MUST indicate 'element'. +
++The Id, MimeType and Encoding attributes of the xenc:EncryptedData element MUST NOT +be present. +
++The xenc:EncryptionMethod element MUST be present, and the Algorithm attribute +MUST indicate a valid block encryption algorithm. +
++The ds:KeyInfo element MUST NOT be present. The key to be used is the confidentiality +key indicated by the convId attribute. +
++The xenc:CipherData element MUST be present, and it MUST use the CipherValue choice. +
++Using the HMAC key indicated by the convId attribute, the HMAC is computed +over the following values: +
++the version attribute of the protectedMessage element +
++the from attribute of the protectedMessage element +
++the to attribute of the protectedMessage element +
++the convId attribute of the protectedMessage element +
++the seqNum attribute of the protectedMessage element +
++any securityLabel element +
++the character string used to construct the body of the payload element +
++These values are then used to prepare the XML protectedMessage element; +this element is transmitted via the existing Jabber message mechanism: +
+ ++The receiver's user agent employs the following algorithm to process each protectedMessage PDU: +
+ ++The values of the version, from, to, convId, and seqNum are validated. +A version mismatch results in an error code of 10000. An unknown convId +results in an error code of 10015. If replay protection is utilized, a +duplicate seqNum results in an error code of 10016. +
++The body of the HMAC element is decoded into the actual HMAC octet string. +
++The payload, which consists of the actual message body, is unwrapped. +Any failures result in an error code of 10012. +
++The HMAC is validated. An invalid HMAC results in an error code of 10011. +
++If any errors occur during processing, the error is communicated via the existing Jabber iq +mechanism: +
+ ++The following block encryption algorithms are required, as +specified by XML Encryption: +
+ ++http://www.w3.org/2001/04/xmlenc#tripledes-cbc +
++http://www.w3.org/2001/04/xmlenc#aes128-cbc +
++http://www.w3.org/2001/04/xmlenc#aes256-cbc +
++The following symmetric key wrap algorithms are required, as +specified by XML Encryption: +
+ ++http://www.w3.org/2001/04/xmlenc#kw-tripledes +
++http://www.w3.org/2001/04/xmlenc#kw-aes128 +
++http://www.w3.org/2001/04/xmlenc#kw-aes256 +
++This protocol makes use of the following Diffie-Hellman groups adopted from IKE. +
+ ++The hexidecimal value of the prime, p, is +
+ ++The decimal value of the generator, g, is 2. +
+ ++The hexidecimal value of the prime, p, is +
+ ++The decimal value of the generator, g, is 2. +
+ ++The hexidecimal value of the prime, p, is +
+ ++The decimal value of the generator, g, is 2. +
+ ++The hexidecimal value of the prime, p, is +
+ ++The decimal value of the generator, g, is 2. +
+ ++This entire document is about security. +
+ ++This version of the protocol deliberately incorporates only a minimal amount +of cryptographic choice. Examples of possible choices that can readily +added in future drafts include: +
+ ++Support for the Digital Signature Standard +
++Support for Elliptic Curve Cryptography +
++Additional symmetric algorithms +
++Additional hash algorithms +
++Furthermore, additional credential formats, such as OpenPGP, may be addressed +in future drafts. +
+ ++This version of the protocol includes a mechanism that derives a cryptographic key from a +passphrase shared by a community of users. It is impossible to overstate the security +issues that such a mechanism raises. +
+ ++This version of the protocol does not include a specific rekeying capability. Data volumes +in IM environments are expected to be small, and the protocol prefers to simply instantiate +new conversation keys. It is straightforward to extend the security session protocol to +enable negotiation of a new key. +
+ ++"XML Encryption Syntax and Processing"; http://www.w3.org/TR/xmlenc-core +
+ ++more to be added +
+ +It is widely acknowledged that it would be good to be able to express a Jabber Identifier (JID)
Although XMPP enables a wide range of functionality, the authors propose that a Jabber URI scheme needs to support only a limited subset of the possible Jabber functionality. In particular, we see the following as core functions that need to be supported:
+The syntactic components of a Jabber URI are as follows:
+<xmpp>:[<node-identifier>@]<domain-identifier>[?<query>]
+ This scheme is similar to the mailto URI scheme
Per the JID definition in JEP-0029, the node identifier is optional (i.e., a mere domain identifier is a valid JID). However, the proposed Jabber URI scheme forbids the inclusion of a resource identifier in the JID, even though JEP-0029 defines this as valid. This is partly because the authors see no compelling reason to include a resource identifier in the Jabber URI scheme, and also because including a resource would necessitate the inclusion of a slash character in an opaque URI, which is contrary to RFC 3986. Finally, the query component is optional.
+RFC 3986 limits the characters included in a URI to US-ASCII characters, and further defines a number of US-ASCII characters as reserved or otherwise excluded. Reserved characters are special characters used as delimiters withing URIs and whose usage is limited to their reserved purpose as defined in RFC 3986 or a specific URI scheme. Excluded characters are control characters, spaces, and other common (non-URI-specific) delimiters such as angle brackets, double quotes, the number sign, and the percent sign. Reserved characters must be escaped if their usage in a specific context would conflict with their reserved purpose, and excluded characters must always be escaped. The set of disallowed charaacters for any specific URI component consists of the reserved and excluded characters for that component. These are defined below for each component of a Jabber URI.
+The scheme component for a Jabber URI is 'xmpp'. This component is delimited from the remainder of the URI by a colon character (':').
+The node identifier component of a Jabber URI is equivalent to the "userinfo" component of a generic URI. Section 2.3 of JEP-0029 stipulates that a node identifier may contain any Unicode character higher than #x20 with the exception of the following:
+#x22 (") | #x26 (&) | #x27 (') | #x2F (/) |
+#x3A (:) | #x3C (<) | #x3E (>) | #x40 (@) |
+#x7F (del) | #xFFFE (BOM) | #xFFFF (BOM)
+ In addition, Section 2.2 of RFC 3986 stipulates that the following additional characters are reserved:
+#x24 ($) | #x2B (+) | #x2C (,) | #x3B (;) | #x3D (=) | #x3F (?)
+ Section 2.4.3 of RFC 3986 further stipulates that the following characters are excluded from URIs in their unescaped form:
+#x23 (#) | #x25 (%)
+ Finally, because the generic URI syntax does not provide a way to specify a character encoding other than US-ASCII (see Section 2.1 of RFC 3986), the characters in the node identifier component of a Jabber URI must contain only US-ASCII characters.
+Therefore, in order to ensure that a Jabber URI containing a node identifier is a valid URI, the characters disallowed by RFC 3986 (reserved, excluded, and non-ASCII characters) must be escaped in the node identifier component of a Jabber URI.
+A domain identifier is a standard DNS hostname as specified in RFC 952
The query component of a Jabber URI may contain any US-ASCII character higher than #x20 with the exception of the following:
+#x22 (") | #x23 (#) | #x24 ($) | #x25 (%) |
+#x26 (&) | #x27 (') | #x2B (+) | #x2C (,) |
+#x2F (/) | #x3A (:) | #x3B (;) | #x3C (<) |
+#x3D (=) | #x3E (>) | #x3F (?) | #x40 (@) |
+#x7F (del) | #xFFFE (BOM) | #xFFFF (BOM)
+ Thus the most basic Jabber URI is user@host (sometimes referred to as a "bare JID") prepended by 'xmpp:', as shown in the following example.
+
+xmpp:user@host
+
+ A URI containing bare JID and no query component should trigger an application to present a user with an appropriate interface to complete an action such as sending a message, sending presence, or managing a subscription. In order to make this possible, some basic queries must be included in the protocol.
+The authors propose three allowable query types in a Jabber URI: message, presence, and subscribe
If no parameters are passed along with the message query type, an application should present a user with an appropriate interface to complete the sending of a message.
+The query component may include parameters that further specify the message to be sent to the intended recipient. The following parameters are allowed:
+If no parameters are passed along with the presence query type, an application should present a user with an appropriate interface to complete the act of sending presence.
+The query component may include parameters that further specify the presence to be sent to the intended recipient (e.g., a user-defined status message). The following parameters are allowed:
+If no parameters are passed along with the subscribe query type, an application should present a user with an appropriate interface to complete the subscription request.
+The query component may include parameters that further specify the subscription request to be sent to the intended recipient. Only the 'type' parameter is deemed useful in the limited Jabber URI spec, with valid values of 'subscribe', 'subscribed', 'unsubscribe', or 'unsubscribed'.
+On the existing Jabber network, there are many opportunities to optimize stanza traffic. For example, clients that want to send the same stanza to multiple recipients currently must send multiple stanzas. Similarly, when a user comes online the server sends many nearly-identical presence stanzas to remote servers.
+ +The 'http://jabber.org/protocol/address' specification provides a method for both clients and servers to send a single stanza and have it be delivered to multiple recipients, similar to that found in &rfc0822;. As a side-effect, it also provides all of the functionality specified by the old 'jabber:x:envelope'
Support for Extended Stanza Addressing in a given server instance SHOULD be determined using &jep0030;. A conforming server MUST respond to disco#info requests.
+ +To determine if a server or service supports Extended Stanza Addressing, the requesting entity SHOULD send a disco#info request to it.
+ +If the server supports Extended Stanza Addressing, it MUST include a "http://jabber.org/protocol/address" feature in the response.
+The IM service MAY implement multicast directly, or it MAY delegate that chore to a separate service. A client can use the following approach to find a multicast-capable service hosted by its domain:
+The multicast service MAY choose to limit which local users can use the service. The server MAY choose to limit whether non-local servers can send address headers that require the local server to send to third parties (relaying). In either case, if the server chooses to disallow the request, the server MUST return a Forbidden error (see the Error Conditions section below). In the relaying case, the server SHOULD NOT deliver to any of the addresses (even the local ones) if the sender is disallowed.
+Implementations MAY choose to cache the disco response. + Positive responses MAY be cached differently than negative + responses. The result SHOULD NOT be cached for more than 24 + hours, unless some sort of time-to-live information is + added to the Service Discovery protocol in the future.
+For multicast processing, the stanza containing an address header + (the 'outer stanza') MUST be addressed to the multicast service, + with no username or resource in the 'to' attribute.
+ +When used for additional information in a one-to-one stanza + (e.g. using the 'node' attribute), the outer stanza SHOULD be + addressed directly to the recipient, not to the multicast + service.
+ +A multicast service MUST NOT change the 'from' address on + the outer stanza. Note that this will limit third-party + relaying across server-to-server connections as a side-effect.
+ +Address headers MAY be included in message or presence + stanzas. They MUST NOT be included as the direct child of an + IQ stanza.
+Address values are packaged together into an + <addresses/> element.
+ +Each address to which the sender wants the stanza to be re-sent will show up as an <address/> in the <addresses/> element. There are several different types of address, shown below.
+ +An <address/> element MUST possess a 'type' attribute, and MUST possess at least one of the 'jid', 'uri', 'node', and 'desc' attributes. An <address/> element MUST NOT possess both a 'jid' attribute and a 'uri' attribute. If sending through a multicast service, an address MUST include a 'jid' or a 'uri' attribute, unless it is of type 'noreply'.
+ +The 'jid' attribute is used to specify a simple Jabber ID associated with this address. If the 'jid' attribute is specified, the 'uri' attribute MUST NOT be specified. Support for the 'jid' attribute is REQUIRED.
+The 'uri' attribute is used to specify an external system address, such as a sip:, sips:, or im: URI. If the 'uri' attribute is specified, the 'jid' and 'node' attributes MUST NOT be specified. These URIs MUST be formatted as specified in their respective RFCs, however with the characters & < > ' " replaced by their equivalent XML escapes, & < > ' ". If a receiving entity does not understand the given URI scheme, or if the URI is not formatted correctly, a "JID Malformed" error SHOULD be returned. Support for the 'uri' attribute is OPTIONAL.
+The 'node' attribute is used to specify a sub-addressable unit at a particular JID, corresponding to a Service Discovery node. A node attribute MAY be included if a 'jid' attribute is specified. If a 'uri' attribute is specified, a 'node' attribute MUST NOT be specified. Support for the 'node' attribute is RECOMMENDED.
+The 'desc' attribute is used to specify human-readable information for this address. This data may be used by clients to provide richer address-book integration. This information is in the language of the sender, which MAY be identified using the standard xml:lang rules from &xmppcore;. Support for the 'desc' attribute is RECOMMENDED.
+When a multicast service delivers the stanza to a non-bcc address, it MUST add a delivered='true' attribute to the address element. A multicast service MUST NOT deliver to an address that was marked with a delivered='true' attribute when the service received the stanza. A multicast service SHOULD attempt to deliver to all addresses that are not marked with a delivered='true' attribute. The delivered attribute is used to prevent loops. See the Multicast Usage section below for more details. Support for the 'delivered' attribute is REQUIRED.
+The 'type' attribute is used to specify the semantics of a particular address. Support for the 'type' attribute is REQUIRED.
+ +These addressees are the primary recipients of the stanza.
+These addressees are the secondary recipients of the stanza.
+These addressees should receive 'blind carbon copies' of the stanza. This means that the server MUST remove these addresses before the stanza is delivered to anyone other than the given bcc addressee or the multicast service of the bcc addressee.
+This is the address to which all replies are requested to be sent. Clients SHOULD respect this request unless an explicit override occurs. There MAY be more than one replyto or replyroom on a stanza, in which case the reply stanza MUST be routed to all of the addresses.
+This is the JID of a &jep0045; room to which responses should be sent. When a user wants to reply to this stanza, the client SHOULD join this room first. Clients SHOULD respect this request unless an explicit override occurs. There MAY be more than one replyto or replyroom on a stanza, in which case the reply stanza MUST be routed to all of the addresses.
+This address type contains no actual address information. Instead, it means that the receiver SHOULD NOT reply to the message. This is useful when broadcasting messages to many receivers.
+As specified herein, the <address/> element is empty. Implementations or future protocols MAY extend the <address/> element for additional functionality, but any extensions are out of scope for this JEP. Such extensions SHOULD be appropriately qualified with a new namespace, and any extensions that are not understood by an implementation MUST be ignored.
+ +The following usage scenario shows how messages flow through both address-enabled and non-address-enabled portions of the Jabber network.
+ +Note: the logic associated with how to perform the following tasks is purely informational. A conforming service MUST generate output as if these rules had been followed, but need not (and probably will not) use this algorithm.
+ +Assume for these examples that header1.org and header2.org + support address headers, and noheader.org does not.
+ +When replying to a message stanza that contains an extended + address, the following rules apply:
+ +The following error conditions are to be used by implementations (for further information regarding error syntax, see &jep0086;):
+XMPP Condition | +Purpose | +
---|---|
<forbidden/> | +The sending user does not have permission to use this multicast service. | +
<jid-malformed/> | +A URI attribute was invalid or not understood (note that support for the 'uri' attribute is optional). | +
<not-acceptable/> | +Too many receiver fields were specified. Servers MAY have configurable limits for this, but the limit MUST be at least 50. | +
A recipient SHOULD trust a stanza's extended addressing headers only as much as it trusts the sender of the stanza.
+Furthermore, there exists the potential for abuse related to the 'replyto' and 'replyroom' features (e.g., an entity could send messages with 'replyroom' set to the address of a room that hosts salacious content or with 'replyto' set to the address of a spambot that harvests Jabber addresses). Therefore if a human user's receiving application receives a message with extended stanza addressing that specifies a 'replyto' or 'replyroom' address other than that of the sender, it SHOULD inform the user of that fact. (Naturally, the receiving application MAY also limit the entities to which the recipient can reply using privacy lists as specified in &xmppim;.)
+This JEP requires no interaction with &IANA;.
+The ®ISTRAR; shall include 'http://jabber.org/protocol/address' in its registry of protocol namespaces.
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ JEP-0033: http://www.jabber.org/jeps/jep-0033.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+ Sections of this document were inspired by RFC 822.
+The Simple Authentication and Security Layer (SASL) (see &rfc4422;) provides a generalized method for adding authentication support to connection-based protocols. This document describes a generic XML namespace profile for SASL, that conforms to section 4 of RFC 4422, "Profiling requirements".
+ +This profile may be used for both client-to-server and server-to-server connections. For client connections, the service name used is "jabber-client". For server connections, the service name used is "jabber-server". Both these names are registered in the IANA service registry.
+ +The reader is expected to have read and understood the SASL specification before reading this document.
+In these examples, "client" refers to the remote entity that initiated the connection, either a Jabber client or a Jabber server. "Server" refers to the server that the remote entity is attempting to connect and authenticate to.
+ +The steps involved for a SASL negotiation are as follows:
+ +This series of challenge/response pairs continues until one of three things happens:
+ +After authentication has completed, the client sends a packet to begin the session.
+ +The namespace identifier for this protocol is http://www.iana.org/assignments/sasl-mechanisms.
+ +The following examples show the dialogue between a client [C] and a server [S].
+ ++
+The client begins by requesting SASL authentication as part of the normal Jabber stream negotiation.
Next, the client selects an authentication mechanism:
+ +The server responds with a mechanism-specific challenge, which the client must respond to. More than one challenge/response pair can take place; this is mechanism-specific.
+ +Challenges and responses are Base64
For mechanisms that require the client to send data first (ie the first challenge from the server is empty), the client may optionally send its first response as part of the mechanism selection:
+ +The handshake continues until authentication completes successfully, authentication fails, or the client aborts the handshake:
+ +Optionally, the server or client may send an informative message along with the success, failure or abort command:
+ +Following a failure or client abort, the client may start a new handshake. Following a successful authentication, any further attempts by the client to begin a new authentication handshake will automatically result in the server sending a failure.
+Note: that this section only applies to client-to-server connections.
+ +Following successful authentication, the client must send a standard IQ set packet in the jabber:iq:auth namespace to start a session. The client must supply a username and resource for the session along with this packet.
+ +If the client attempts to start a session before authenticating, or the username given in the jabber:iq:auth packet does not match the username given in the authentication credentials (when the SASL mechanism supports it), the server will return a 401 (Unauthorized) error packet.
+Traditionally, Jabber servers have supported two authentication models - jabber:iq:auth for client-to-server authentication, and dialback for server-to-server authentication.
+ +Until SASL authentication is in widespread use, clients and servers may support both SASL and the legacy jabber:iq:auth authentication system for client-to-server connections. Note that neither the client nor the server are required to support legacy authentication; it is simply a courtesy to users until the majority of clients and servers support SASL authentication.
+ +If a client connects and does not request the use of SASL (that is, the SASL profile namespace identifier does not appear in the stream initializer response), then the server should disable SASL for this connection; that is, it should not add the SASL profile namespace identifier to the stream initialization response, nor should it offer any SASL mechanisms.
+ +If a client connects to a server that does not support SASL (identified by the lack of the SASL profile namespace identifier in the stream initializer response, even though the client requested it), the client may choose to fall back to use legacy authentication.
+SASL authentication for server-to-server connections is not intended to replace dialback, as there are uses for both. Dialback is useful in an uncontrolled environment, such as the global Internet, where it is necessary to verify the identity of the remote server. SASL authentication has uses in a more controlled environment, where the administrator wishes to restrict access to a certain number of known remote servers.
+ +To this end, the use of dialback is not deprecated. If a remote server connects and requests the use of dialback (by specifying the "jabber:server:dialback" namespace, the the local server shall not offer SASL authentication. Similarly, if the remote server connects and requests the use of SASL authentication, then the local server shall not offer dialback. In the event that the remote server requests both, the local server should terminate the stream immediately and close the connection. If the remote server requests neither, then the local server may choose to support the pre-dialback server-to-server stream, but it is recommended that the local server terminate the stream and close the connection.
+The TLS protocol
Traditionally, Jabber servers has supported TLS by utilising a "wrapper" around the standard protocol stream. This wrapper usually listens on a port other than those listed in the IANA registry
This document describes an extension to the Jabber XML stream that provides a "STARTTLS" command which clients may invoke on an insecure stream to secure it. This extension is modelled on RFC 2595, which describes the STARTTLS extension for the IMAP
This protocol operates over the standard Jabber client connection on port 5222.
+ +The namespace identifier for this protocol is http://www.ietf.org/rfc/rfc2595.txt.
+ +The following examples show the dialogue between a client [C] and a server [S].
+ ++
+The client begins by requesting the use of STARTTLS as part of the normal Jabber stream negotiation. The server responds by informing the client whether or not it supports STARTTLS. It does this in the normal stream negotiation response:
+ +In the event that a server does not support the STARTTLS extension, it will respond with the normal stream negotiation response:
+ +To begin the TLS negotiation, the client issues the STARTTLS command:
+ +When the server is ready to begin the TLS negotiation, it will close the XML stream, but will keep the underlying connection to the client open:
+ +The client now begins a normal TLS negotiation by sending the TLS ClientHello command. Upon completion of the TLS negotiation, the client reissues the XML stream initialization:
+ +This is necessary, since any information about the stream presented by the server or the client may have been modified by an attacker.
+ +Note that once the secure channel has been established, the server must not advertise or allow the use of the STARTTLS command.
+TLS allows clients to be authenticated by verifying the certificate that they present during the TLS negotiation. This can be done in conjunction with the Jabber SASL profile
If a client authenticates with a certificate using the TLS authentication, and the client requests the use of SASL in the second XML stream negotiation (over the secure channel), servers supporting certificate-based authentication should add the EXTERNAL mechanism to the list of supported authentication mechanisms. If the client then requests this mechanism, the server should automatically inform the user that authentication was successful. See RFC 2222 and JEP-0034 for more information.
+ +Servers implementing STARTTLS functionality are not required to implement certificate-based authentication.
+The Jabber community needs a cohesive standard for publish-subscribe functionality. Certainly there is interest in developing such a standard, as witness the number of JEPs written on this topic.
Traditional pub-sub consists of event notification. This makes it possible for entities to publish data and for other interested entities to receive notification when the data is published. The following are some likely applications of pub-sub functionality within Jabber:
+In such systems, a subscriber would request to receive notifications about data the subscriber is interested in. We define a "topic" as an object that defines the relationship between a publisher and its subscribers. Specifically, a topic contains three essential collections of information:
+We define an "item" as an instance of data published by the publisher that fits the description associated with a topic. Each item MAY possess a unique identifier that enables the data to be tracked. (NOTE: This JEP does not address the durability of items, i.e., data storage.)
+A topic is addressed by means of a unique "topic ID". A topic ID is simply a string with no required semantic meaning. While a topic ID may have semantic meaning (e.g., '/instruments/guitars/electric' or 'rec.music.dylan'), such meaning is not necessary and a topic ID may be any random string (e.g., 'a1gh83jfn342092'). The only requirement is that a topic ID be unique within the context of a specific pub-sub domain (e.g., pubsub.jabber.org).
+Data Stream Proxy Service (DSPS) is designed to be a common stream protocol for multicast (unicast as special case) over P2S2P (P2P as special case) connections.
+ +This document follows DSPS protocol version 0.5. Any XML data not explicitly defined or mentioned will be ignored without error. On startup, full fledged DSPS starts listening on port 5290 (and 80 if HTTP handshake implemented).
+ +(optional) Creating or modifying stream is done like so:
+ +Possible failure messages:
+ +Code | Message | Description |
---|---|---|
405 | Method Not Allowed | Attempt at reconnect to relay without existing credentials, relay still connected, <peer/> block present in reconnect request, or feature not supported |
504 | Gateway Timeout | All destination DSPS are unreachable. |
DSPS creates "id" (empty string is legal), used in "who" replies and notifies client of waiting connection like so:
+ +Upon receipt of message as per section "Connection waiting", client can either ignore it and connection will timeout, or connect to the DSPS directly via any supported connection method or via relay. There may be a maximum of 1 (one) established connection to DSPS from any Client_full_JID + DSPS_full_JID pair, deviations are handles as per section "Connecting to DSPS via default method". DSPS will not discriminate method via which direct connection is made, even if prior to "disconnect" a different method was used. Any packet from an unauthorized connection is ignored without reporting an error.
+ +Client may request another DSPS to relay this connection as per section "Stream Creation/Relay", utilizing the "create" body. There is no limit on length of relay chain. Upon initiation of handshake with destination, DSPS reports key like so (message sequence unrelated to current DSPS handshake):
+ +Client must send said key to destination as per section "Connecting to DSPS via default method" and send response to DSPS (which will be transmitted to destination) like so:
+ +Client must connect to DSPS on port 80 and initiate handshake. This may be attempted after "create" result received or "disconnect" occurred, and prior to "wait" timeout expiring, then send HTTP request like so:
+ +And will receive reply from DSPS before the start of data stream, like so:
+ +Upon completion, Client must resume DSPS handshake as per either section "Connecting to DSPS via default method" or section "Connecting to DSPS via SSL method" (if applicable). Subsequent data will not follow HTTP protocol. On error connection closed immediately with optional error messages.
+ +Possible failure messages:
+ +Code | Message | Description |
---|---|---|
401 | Unauthorized | (optional) Returned if any error in HTTP handshake. |
Client must connect to DSPS on specified port and initiate handshake. This may be attempted after "create" result received or "disconnect" occurred, and prior to "wait" timeout expiring, then send following on stream:
+ +Next, regular TLS handshake is initiated. Upon completion, Client must resume DSPS handshake as per section "Connecting to DSPS via default method". On error connection closed immediately with optional error messages.
+ +Possible failure messages:
+ +Code | Message | Description |
---|---|---|
401 | Unauthorized | (optional) Returned if any error in SSL handshake. |
Client must connect to DSPS on specified port and initiate handshake. May be attempted after "create" result received or "disconnect" occurred, and prior to "wait" timeout expiring. Standard and SSL handshakes are identical in decrypted state and take the form of:
+ +For example, the appropriate string for the above request would be:
+ +If Client_full_JID and DSPS_full_JID do not have an associated stream, are no longer valid, (e.g. timeout reached or client removed from stream), or connection from said Client_full_JID + DSPS_full_JID pair is in use (i.e. client is still connected to it), connection is closed immediately with possible optional error messages reported. Otherwise DSPS returns uniquely generated key followed by a <CR> like so:
+ +Client must now send key to DSPS via XML stream like so:
+ +DSPS will now check key, if not valid, close connection, report possible optional error message and resume waiting on original key. If valid, generate new key and send to client like so:
+ +Client must now send received key to DSPS via the stream followed by a <CR>. Once received, DSPS checks key, on mismatch connection is closed immediately with possible optional error messages reported, waiting on key is resumed. Upon successful handshake a message is sent to members of the stream in accordance with the following rules; If the client had type "master" connection, all members of the stream get notified. If the client had type "slave" connection, only other type "master" members get notified. The message takes the form of:
+ +Possible failure messages:
+ + +Code | Message | Description |
---|---|---|
401 | Unauthorized | (optional) Returned if the DSPS is not aware of said Client_full_JID + DSPS_full_JID pair. Where "from" contains DSPS_full_JID that was used in the handshake and "to" contains Client_full_JID that was used in the handshake. |
409 | Conflict | (optional) Returned if connection from said full client JID and full DSPS JID is in use (i.e. client is still connected to it). Where "from" contains DSPS_full_JID that was used in the handshake and "to" contains Client_full_JID that was used in the handshake. |
DSPS protocol allows multiple peers to use the same stream. Manipulation of the authorized peer list is done through admin functionality described in next several subsections. DSPS protocol allows for three types of peer connections: "master", "slave", and "relay". "master" peers get full control of the stream, "slave" peers get limited control of the stream, and "relay" are treated similar to "slave" except in reporting of JIDs where the resource must be omitted.
+ +"master" peers are allowed to invite any other user to the stream and drop any peer registered with the stream, including themselves. "slave" peers are only allowed to drop themselves from the stream. Any administrative changes coming from a "slave" peer that are not for the peer's own connection are ignored. Dropping one's own connection is the preferred way of permanently disconnecting from the stream.
+ +Any data received from a "master" gets copied to every other peer on the stream. Any data received from a "slave" peer gets copied to all "master" peers on the stream only.
+ +Stream administration request looks like so:
+ +Possible optional errors include the following:
+ +Possible failure messages:
+ +Code | Message | Description |
---|---|---|
403 | Forbidden | (optional) Returned if peer with "slave" rights attempts to use "master" admin privileges. |
Upon invite DSPS will attempt to invite each of the peers like so:
+ +Upon drop DSPS will immediately closes the connection to the dropped peer. It then will totally forget this peer right after sending it a notification message like so:
+ +For every successfully dropped peer a message is sent to all other stream members, following the rules stated for the "presence" message, and takes the form of:
+ +An invited peer has the option to accept or reject an invitation to a stream.
+ +To accept an invitation to a stream, the peer must reply like so:
+ +Upon receipt of this reply the DSPS creates a unique resource for this client JID/resource pair. It then prepares the "create" message as described in section "Connection waiting".
+ +Rejecting an invitation can be done in two ways. A peer can forget about the invitation and let the invitation "expire", or preferably a message can be sent like so:
+ +Regardless of the way a rejection was achieved a notification message is sent to the inviting peer, as was described in section "Stream administration". If unknown "type" is sent, it will be interpreted as a reject. A maximum of one "acknowledge" is allowed during the lifetime of an invitation. If multiple such tags are sent, the first tag takes precedence. Any rejection of a public connection will be ignored.
+ +If a peer ever disconnects without first dropping themselves, the following policy applies:
+ +The peer may reconnect within the "wait" timeout provided in the "create" reply in section "Connection waiting". The peer may choose any supported mode of reconnection supplied in "create" reply, regardless of mode previously used. The "wait" timeout is not cumulative over multiple disconnects. After reconnect, peer will not receive any data that exists on the stream while it was disconnected.
+ +Upon such disconnection DSPS notifies all other members of the stream, following the rules stated for the "presence" message, and takes the form of:
+ +Upon reaching "wait" timeout the procedure is the same if the peer dropped its own connection.
+ +Permanent termination of connection can be done in two ways: peer may disconnect from the stream and let the "wait" timeout expire, or more preferably the peer will drop itself from the stream via an "admin" message. The "admin" is still allowed to contain multiple "peer" blocks.
+ +The use policy for the stream follows the standard rules described in this document. Type and structure of the data must be negotiated by the peers separately (presumably via the normal XML message stream or within <comment/> blocks). The DSPS stream operates at the speed of the slowest connection (or slower if it is so configured in its internal configuration).
+ +Data read from peer in a unit of transfer (decided by DSPS) is sent to other peers in a format like so:
+ +For example, the appropriate string for the above block would be:
+ +First block received after connection will always be full block. If discrepancy occurs, receiving peer should disconnect and reconnect back to stream.
+ +Two mechanisms exists to gain information about the stream configuration and its members. They are described within next few subsections.
+ +To retrieve listing of all registered peers of this stream and their respective connection status any registered peer sends a message like so:
+ +The query follows the standard rules: query originating from a "master" peer will return listing of all registered peers and their associated statuses, query originating from a "slave" peer will only return listing of all registered "master" peers and their associated statuses. Returned results do not have any strict order. If multiple "who" queries were requested by a peer that have not yet received a reply, only one reply need be sent.
+ +The query reply is formatted like so:
+ +To retrieve listing of all stream configuration/statistics values or public streams, any registered peer sends a message like so:
+ +The query reply is formatted like so:
+ +All "status" attributes are required. Any other undefined blocks with any multiplicity, are legal in this block as long as their tags are not identical to any tag within the protocol. Results returned do not have any strict order. If "to" in original request contained no resource, multiple "stats" blocks are allowed, where each contains at least one <peer/> block which has "maxpublic" greater than 0. To join a public stream a client must send message as per section "Accepting an invite".
+ +Stream exists from its "create"ion time to the time when there are no more "master" peers registered with the stream.
+ +When last "master" peer is dropped from the stream, DSPS will make sure that all the data sent by all the "master" peers was actually copied to all the "slave" peers still present. For every remaining "slave" peer DSPS will initiate a drop event. Once stream is void of any peers it will be totally forgotten by the DSPS and all associated data is released.
+ +Error messages look like so:
+ +File transfer can be easily accomplished over DSPS. Where one user invites another user to a DSPS stream. File details can be transfered in the invitation comment as such: <meta type='file' name='myfile.txt' size='500K' crc32='12345' sha1='23451' mime='application/octet-stream' timestamp='12345' date='20020412T00:00:00'/>. Where the "size" would be in bytes. All properties should reflect their appropriate values for this instance. Once the second peer has accepted, it can simply put a CR on the stream stating that transfer can begin. then the first party simply dumps the contents of file on the stream, closes the stream and "drop"s itself from the stream. DSPS will make sure the second party gets everything that the first party sent before closing the connection. If multiple recipients of the file are required, the sending client can save a lot of bandwidth and transmit only one copy if the file to the DSPS which in term will transmit the data over to all the other connected clients.
+ +Same idea as the file transfer. However if more then two parties are involved, every party must have a "master" connection.
+ +A server has a JID which it registers with a stream. Any client wishing to join the multicast sends an XML message to the server, which then invites the client with a "slave" connection. Thus everything the server sends is received by every client on the stream. If there are multiple back-up servers, they can be invited with a "master" connection, thus if one of them goes down, the others can take over.
+ +It has long been discussed in many Jabber places that a file storage facility is desired. The communication with such a facility can be easily accommodated with DSPS, as such a facility would merely appear as a user to DSPS which can either be "invite"ed or "invite" other users onto personal streams to transfer files as described in 6.1.
+ +PASS has the following design flaws that make it unsuitable for its stated purpose of providing raw data-streams to all classes of users, including those behind firewalls or NAT.
+ +PASS requires the use of a large number of individual ports, which on a heavily loaded server can lead to the number of spare ports dropping to zero, causing connections to be refused.
+ +This is also problematic if PASS is situated behind a firewall. Firewall administrators are typically loathe to allow incoming connections to a large range of ports.
+ +DSPS only uses one port, and so resolves the first problem, while making the second almost a non-issue.
+ +PASS requires the client to have some knowledge of IP, which immediately forces the assumption that the XML stream's underlying protocol is in fact, IP. While at the time of writing this is always the case, it may not always be this way.
+ +DSPS uses the Jabber ID to do its routing, and so avoids these problems. And while DSPS does use the concept of a TCP connection and an IP port, this information is never actually used anywhere on the XML stream, making the actual connection to the DSPS implementation-defined.
+ +PASS makes the IP address of the remote client available to the local client. While it is rare that this is an actual problem, many users and administrators prefer that IP address information is never actually revealed.
+ +DSPS never transmits IP address information across the XML stream, and so does not have this problem.
+ +PASS requires a client to initiate a connection by opening a (proxied) listening socket, and then soliciting connections. However, TCP works by having the client connect to a remote resource directly. This difference can make the operation of PASS difficult to understand. Also, it is left to the client to distribute the information about this listening socket, which places an additional burden on the client.
+ +DSPS, while it uses listening sockets to do its work, does all the work of setting up the connection after a client initiates it. All the initiating client has to do is request a connection, connect to the DSPS, and wait - everything else is handled automatically.
+ +Due to the master/slave design, DSPS is already able to handle multicasts of streams or such, whilst PASS was only designed for simple p2p stream connections. This will becoming increasingly more important as more emphasis is made on streaming capabilities, for technologies such as audio and video conferencing.
+ +Due to DSPS generality, the protocol can be easily used for either P2P or P2S2P needs. This eliminates the need for a separate protocol for each of the tasks.
+ +It is not mandated for DSPS to reside beside a Jabber server. It is entirely possible for any client to implement a stripped down version of such a server. In such a case the only sections that are required are any error reporting, invitation acknowledgment and statistical responses. Any other area of the protocol becomes optional since the recipient peer will not have the ability to use it anyway.
+ +Any client may, but is not required to utilize the striped down functionality. When utilizing such functionality the serving client sends an invitation to the recipient client to join the serving client's DSPS stream. Thus the "create" message would list the serving client as the DSPS and would utilize the "host" attribute to tell the recipient client where to connect to the DSPS.
+ +This ability is advantageous since the recipient client only needs to know one protocol for data transmission over P2P or P2S2P connections, and would not see a difference between the two. The proposed method is for one side to fist try serving a connection to the other. If that fails the other side may attempt to serve the connection. If the second attempt fails the clients may utilize an external DSPS server. The negotiation of who will serve is done outside DSPS protocol. DSPS has no functionality to decide when a P2P connection is possible or desirable, nor does it have enough information to do so reliably.
+ +This proposal standardizes the use of graphical emoticons and "genicons" in Jabber IM clients to prevent confusion and competing conventions that will soon arise, enabling client developers to spend their energy on more important parts of their projects.
+Emoticons are the text string 'smiley' or 'frowny' faces such as :-) and :-( that people often use in email or instant messaging to represent emotions. Genicons are a term being coined here to mean non-emotive text pictures (often called 'ASCII Art') that serve to replace typing the full word or to simply be cute or creative in the conversation.
+Many new Internet users demand graphical emoticon and genicon support in their IM clients. We should satisfy their needs if we ever wish to see them use Jabber instead of another IM system.
+While traditionally emoticons and genicons have been typed and displayed as text, the recent trend of using graphics, and sometimes sounds, instead of text to represent these pictures will be assumed for purposes of this proposal. Also, the term "icon" will be used in place of "emoticon" and "genicon" for purposes of convenience.
+The following issues must be solved for in this specification.
+Because icons in Jabber should be easy to use, extensible, and customizable, they will be created using style definition files which can be exchanged between users and supporting clients. The specification will not allow external data, in order to protect the privacy of users, and will not rely on file transfers or directory services in order to not break old clients or components.
+To find out if an entity supports Jabber Icon Styles, look for the feature category of http://jabber.org/protocol/icon-styles using jabber:iq:browse or http://jabber.org/protocol/disco. The same feature category can be used with feature negotiation.
+Because icons in Jabber should be easy to use, extensible, and customizable, they will be created using style definition files which can be exchanged between users and supporting clients. The specification will not require external data, in order to protect the privacy of users, and will not rely on file transfers or directory services in order to not break old clients or components. How these icon styles are exchanged - as well as advertised - is out of the scope of this specification. The text strings representing the icons will be sent like any other text (this JEP doesn't require extra tags or attributes in the messages being sent).
+All icons are created by defining each icon then grouping them together into "Icon Definition Files". These files, along with the object files associated with the icons, are called "icon styles". Icon styles may be traded and shared among users of all supporting clients like skins or themes, similar to WinAmp, XMMS, GNOME, and other customizable applications. This creates a platform-independent system, providing a great degree of customization for the user, and allowing client developers to focus on other features.
+ +Each icon in a style is defined and grouped together in an XML document, the "Icon Definition File". Each definition file for all styles is named "icondef.xml". There is only one such Icon Definition File per style. The W3C Schema for the Icon Definition File plus an example finished Icon Definition File can be found under Schema, below.
+The meta elements contain information about the Icon Style itself, rather that the individual icons. They are contained within the <meta> element, which is directly under the root element. There is one and only one the <meta> element.
+The <text/> element defines what text string(s) are recognized by the client as an icon. There may be multiple <text/> elements in an <icon/>, such as for different languages or simply for multiple text strings producing the same result (for example: :-) and :))
+ +Each may have an xml:lang attribute, as defined in Section 2.12 in the official XML 1.0 reference document. The xml:lang attribute allows for two-letter language codes, dialects, and custom "languages" to define foreign IM protocols, for example.
+In order to be more accurate in recognizing text strings intended to be icons from those that are just coincidences in normal conversation, the client should follow the "whitespace rule" of making sure there is some form of whitespace on at least one side of the text string. This is only a guideline; individual clients can implement different rules as needed. A newline and tabs count as whitespace in addition to spaces. This is to make sure that chunks of code and URIs are not accidentally converted into graphical pictures. Also, text strings cannot include newlines or tabs. All characters must be on the same line with only spaces within the string, and extra spaces should not be ignored. This is to make it much easier on text parsers looking for these text strings.
+The text strings must be case sensitive. This is a rule that compliant clients must follow. "Cat" cannot be used in place of "cat" or "CAT". All three are separate text strings, and therefore must have separate <text/> elements, although they may of course use the same objects.
+The <object/> element defines what multimedia objects are inserted into the displayed message, replacing the text string(s) defined in <text/>. An object may be a bitmap graphic, vector graphic, audio clip, rich text formatting rules, or any other media that can be stored in a separate file. The <object/> element is identical to the OBJECT element used in XHTML 2.0, and the specification used there should be used to govern the <object/> element here. Note that because the XHTML 2.0 OBJECT specification is quite complex (although very flexible and future-proof), client developers are encouraged to only implement compliant sub-sets of the OBJECT specification for their clients. There may be one or multiple <object/> elements in an <icon/>, such as for alternative file formats (such as + GIF vs. PNG), or multiple objects to use at the same time (such as graphic and sound files).
+The <x/> element allows any type of extensions to the icondef.xml file, such as to specify how the user's nickname can be colored in multi-user chat windows or defining additional data about the style or authors. Each must have an xmlns attribute with a namespace that the extension operates under. Multiple <x/> elements may be in the <icon/> or <icondef/> elements. This functionality is optional for clients to support, and clients should ignore all extensions they do not understand.
+The icondef.xml file must all be located in the root directory, which is named after the style and version (example: ./happy_days-1.2 or ./gold_angelic-1.0.0). There is only one root directory per style. The object files may either be in the root directory as well, or be in sub-directories for categorization and easier maintenance reasons. If sub-directories are used, they must match the URIs used in the <object/> element in the icondef.xml file.
+ +The icondef.xml file and all object files must be packaged in the ZIP format following the above hierarchy (the directory must exist in the package, with all files in it). The package must have the file extension .jisp (Jabber Icon Style Package), and the MIME type application/vnd.jisp as defined in the official IANA registration. This allows Jabber clients to automatically install icon styles through web browsers. When the client installs the package, it should probably be kept in the archived format, instead of unzipped. This not only saves disk space, but also makes the packages easier to manage and exchange.
+Icons styles should be easy to create, distribute, and most importantly, use. The packaging and official MIME type helps with the first steps, but it is ultimately up to the client developers to fully support the specification and make sure it is easy for users to manage.
+ +The procedure for using Jabber icons is simple and straightforward.
+Because icons may have multiple text strings associated with them, clients need to be able to figure out which one to use when a user selects the desired icon from their GUI. This is ultimately completely up to the implementation, but here is a suggestion:
+Like multiple text strings, icons can have multiple object data files associated with them, and therefore clients also need to be able to figure out which ones to use when a user selects the desired icon from their GUI. Here is a suggestion of how those files can be chosen among multiple options, although this is completely an implementation issue (as with multiple text strings).
+The Rules for processing objects in the XHTML 2.0 OBJECT specification may also be of help in coding the procedure of choosing an object to use, especially when it comes to nested and author-preferred objects.
+The client should also take note of the file sizes. The client should set (possibly as a user-defined option) the maximum file size in kilobytes for object files. Anything above this amount implies the file will be too big to properly render, and the icon style developer is probably being abusive.
+Also, if you are developing an icon style, please make sure the MIME types specified in your icondef.xml file are correct. And also make sure that the files you use are reasonable in any byte, pixel, and timelength size. And although any file format can be supported, try to use BMP, PNG, SVG, WAV, OGG formats because they are open, free, and becoming increasingly supported in developer tools and programming languages.
+A client may permit the user to activate multiple icon styles at one time. This would be useful for styles which make use of different text strings, and the user wants them all. The client should force the user to rank the multiple styles for purposes of conflict resolution between icons. The highest ranking style gets preference over lower ranking styles. This ranking doesn't have to be anything more than simply dragging the style names into top-to-bottom rows, with the styles on top being higher ranked than those below.
+Although any text string can be turned into an icon by defining it in an icondef.xml file, it is highly reccomended they either follow traditional ASCII Art (smileys and frownys, for example) or full keywords in simple markup such as double-colons. If you want to design icons, always keep in mind that not every Jabber user uses graphics to "translate" this to something visual, as explained in the "Meaningful" requirement, above. Here is a short list of recommended "core" icons that should be in most definitions, as well as possibly be used by transports:
+There are no security features or concerns related to this proposal.
+The JSF shall register and maintain a MIME type and file extension for icon style packages with the IANA. Ones have already been registered by Sebastiaan Deckers (aka 'CBAS') as application/vnd.jisp and .jisp, respectively. The registration can be found at http://www.iana.org/assignments/media-types/application/vnd.jisp. Sebastiaan's registration shall be considered the official MIME type and file extension of this specification.
+Also, this specification uses other MIME types that are maintained by IANA for the object and xml files that are included in the icon style packages.
+JANA shall register the namespace http://jabber.org/protocol/icon-styles as an official feature category.
+Also, JANA may choose to define IM-specific xml:lang "language codes" for use within Jabber (in addition to those defined in the XML specification). Such language codes would allow Jabber developers to support icons from MSN, Yahoo, and popular web message programs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+ Gold Angelic
+ 1.0.0
+ Angelic faces and themes with gold highlights.
+ Adam Theo
+ Sebastiaan Deckers
+ Mattias Campe
+ 2002-10-31
+ http://icon-styles.jabberstudio.org/Gold_Angelic
+
+
+ :-)
+ :)
+
+
+
+
+ :-(
+ :(
+
+
+
+
+ :-O
+ :O
+
+
+
+ ::man::
+ ::mann::
+ ::muz::
+ (z)
+
+
+
+ ::woman::
+ (x)
+
+
+
+
+ ::alert::
+
+
+
+
+
+ ]]>
+ As things currently stand it is not possible to obtain statistics + from a jabber component or server without resorting to parsing the + various log files. This makes it extremely difficult to obtain statistics + that are of any use in real world situations. This JEP attempts to + rectify this situation by defining a new namespace that would be used + to obtain statistics from a component or server so that they may be + manipulated and used in a useful manner. For the purposes of this namespace + a statistic is anything that maybe expressed in a numeric form, such as the + uptime of a server, the number of registered users and the + number of packets sent. Things such as a list of currently online users or + a list of registered users are beyond the scope of this namespace and + properly belong within browse or disco.
+This is a pretty simple namespace. It consists of a <stat/> tag with + three attributes. name, units and value.
+
+ <query xmlns='http://jabber.org/protocol/stats'>
+ <stat name='' units='' value=''/>
+ </query>
+
+ There is one variation in the case of an error invalidating one or + more errors in a single returned query that does not actually + invalidate the whole query.
+
+ <query xmlns='http://jabber.org/protocol/stats'>
+ <stat name=''><error code=''>...</error></stat>
+ </query>
+
+ The name of the statistic. The format for this attribute is the
+ generic statistic type such as bandwidth, users, time etc. followed by
+ a '/' character and then then the name of the actual statistic. For
+ example bandwidth/packets-in, time/uptime and users/online. This will
+ be assigned and administered by JANA
This is the units type of the statistic. As with the name attribute it
+ will be assigned and administered by JANA
This is the actual returned value of the queried statistic. The value returned is in + multiples of the unit described by the units attribute.
+To query a component or server a client sends an iq packet of + the type 'get' to the component or server. The component or + server responds with the list of statistics that it supports.
+ +Once a client knows which statistics a component or server + supports it may now request the actual statistics by sending an iq + packet of the type 'get' containing a request for the specific + statistics and sending that to the component or server.
+ +If an error occurs with one or more of the requests for + statistics the component or server should return one of the + following error codes.
+Code | String | Reason |
---|---|---|
401 | Unauthorized | Querying JID is not + authorized to perform that query |
404 | Not Found | The statistic was not + found for some reason |
501 | Not Implemented | Although statistic + is advertised as available it has not been implemented |
503 | Service Unavailable | Statistic is + temporarily unavailable |
Because we wish to be able to collect groups of statistics + within a single returned packet errors must be handled in a two + tier way with authorization and core errors that would render + all the statistics meaningless being indicated + with a type='error' in the returned packet.
+ +Errors in a query that only invalidate one or more of the + requested statistics are indicated with an </error> tag + embedded inside the </stat> tag. +
+ +All statistic names, returned data units types and other + pertinent statistic information will be assigned and registered with + the Jabber Naming Authority in the category stat. + Unfortunately at this time such a body does not exist so we will + have to rely on component and server authors diligently + researching to ensure that their desired name is not already + in use and that they adequately document the returned units + type and anything else that would normally be registered. + Hopefully by the time this JEP is formally adopted + a central naming authority for the Jabber protocol will be in + place and functional and authors will be then able to register + their names. +
+Stat | Description | Returned Units | +
---|---|---|
registered name | description of + statistic/reason | unit type returned by + query | +
+ Although components and servers are free to support whichever statistics they + feel are justified for their particular component or server it is + suggested that the following set of three core statistics are + implemented by all components and servers.
+ +Stat | Description | Returned Units | +
---|---|---|
time/uptime | uptime of component or + server | Seconds | +
bandwidth/packets-in | packets received by component or server | packets | +
bandwidth/packets-out | packets transmitted by component or server | packets | +
For several reasons the + http://jabber.org/protocol/stats namespace does not + support human readable labels for the returned values. Generally the + application querying the statistic should already know what the + statistic is and in what units the value is returned. However if the + application really wants some form of human readable label for the + returned value although not an optimal solution or even recommended by + the authors of this JEP it should be safe for + it to convert the value of the units attribute into a string and use + that as a label for the returned statistic value.
+In most cases the http://jabber.org/protocol/stats would be tied to the component or + servers admin JID so that only that JID may query the statistics + however there are advantages to having a three tier system where + some statistics are available to all JIDs, some to an arbitrary + JID listed in the configuration file and all available to the + listed admin JID. As the first case can be emulated by the + second I propose that when implemented the http://jabber.org/protocol/stats + namespace is configured to use the three tier method of + authorizing queries.
+Supporting industry accepted standards and procedures
+
Note: This JEP has been superseded by &jep0060;; please refer to that document for the successor protocol.
+This document introduces and lays out a preliminary protocol for a robust form of publish-subscribe over the Jabber messaging environment -- Jabber Robust Publish Subscribe (JRPS).
+Implementation issues in the environment are appended, covering Permissioning and Contributions. Both are likely to require separate JEPs, but need to be constructed sympathetically.
+In creating this addition, I have an underlying philosophy to sustain a "fractal" world of publish-subscribe components, such that a subscriber to a pubsub component may well be a pubsub component in itself, representing its own community of subscribers. This will allow Jabber to support organic scalability found on other platforms.
+Publish-Subscribe and other messaging environments that exist are often classified as providing one or more of the following three levels of service.
+This document concerns itself with level 2 Publish Subscribe -- "Robust".
+JRPS is required in environments where there is a higher demand for guaranteed delivery in high throughput, low latency environments where data has value and can contain business intelligence, but does not demand a full transactional (e.g. 2-phase commit) strength environment.
+Such environments often exercise business logic upon data received, so the notion of updates to all or part of data, the expression of the definitive, full compliment of a particular set of related data, the correction of data in full or in part and the notification that data is no longer valid needs to be supported. The existing type="set", though very suitable in a wide range of applications, does not provide suitable granularity in all environments.
+Robust environments require that a receiver can tell when data has been lost and that a receiver also has the means to request the repair of any gaps efficiently. This must be done whilst keeping delay or disruption to ongoing data flow to a minimum. Jabber does not provide the means to detect or repair gaps, and traditional ACKing of each packet is slow and costly.
+It would be advantageous to permit forms of permissioning and access control upon data that has value. Such permissioning and control should not be overly burdensome on the rapid transmission of data. It should allow a suitable level of abstraction to keep changes to a data item"s expression of permission coding/level to a minimum, to avoid the need for excessive changes to such codes. Abstraction will also permit permission coding to be kept compact, as it will, in effect, be tokenised.
+JRPS then requires the ability to detect and repair gaps in the stream, to provide a means to convey richer information about the nature of the data in context to what has come before and to enable the publisher to have control over who sees what.
+In addition, a pubsub component should be able to provide information and parameters about its implementation of JRPS to subscribers. Subscribers must inquire about such information from the pubsub component to gain the full benefit of a JRPS service.
+JRPS is a layer on Jabber Publish-Subscribe (JEP0024, JEP0036) and should interoperate with them and support namespaces and topics. Included in this document is the capability for permission tokens. It is included as the author believes that such tokens should exist within the <publish> tag, being a means to identify data much as the namespace or topic does.
+JRPS is different from other IM systems in that the publisher and pubsub components send out the data so that downstream entities can detect if problems occur. As a comparison, a sender in, say, MSN is told that the packet they sent cannot be delivered but in JRPS, the receiver knows that a packet or packets have not been delivered and can ask for retransmissions. The sender need not normally know about such events as the intermediate components can usually cater for it. Thus JRPS has a future in areas such as Multicasting, large distributed and proxy-based environments where the end subscribers may be very remote from the publisher.
+Existing commercial middlewares provide such facilities and it is especially necessary when data is pushed between applications and may not have an obvious "context" in the stream to data immediately before or after. Thus, JRPS may seem over-the-top for a chatroom world, but is a basic requirement for, say, distributing real-time process states, events or persistent, mutable data.
+This can be achieved by the use of packet sequence numbering and heartbeats whilst avoiding the necessity to positively ACK each packet.
+Multiple levels of sequence numbers are envisaged and will be used in different circumstances. Multiple levels allow a rapid repair of short "transient" breaks whilst catering for longer breaks, recoveries and resynchronisations without placing too great a burden on either subscriber or pubsub component. This discussion explains the use of a dual sequence number environment: link and source.
+Sequence numbers will be sent in each publish thus:
+The above shows sequence numbers placed in the <publish/> node or element. This is to abstract the publishing from any packet construction algorithms that may occur and thus allow a recovery to make use of network capacity as it sees fit and to interleave recovery and ongoing publishing data.
+The subscriber stub is responsible for ordering information and detecting and repairing any gaps to provide sequential data for consumption by the application, which should not concern itself with such issues.
+The operation of LINK and SOURCE sequence numbers are described below.
+This will concern itself with data sent on each channel. A +channel can be, but is not limited to the following:
+Each publish received should contain an incremental sequence number to the previous or Zero. Zero is used to reset (or resynchronise) the sequence numbering. Zero should not be used in the situation of sequence number wrapping/rollover, wherein the value1 should be used. Sequence numbering bit resolution should be ascertained by querying the pubsub component in an <iq/> before subscription requests are levied.
+E.g., in a 16-bit sequence number resolution channel, the sequence numbers would run as follows
+1, 2, 3, 65533, 65534, 65535, 1, 2,
+For information on sequence number bit resolution, see section 4, Source Queries.
+This will indicate the sequence number of messages sent from the publisher to the pubsub component. Should a link be lost, timeout or other such eventuality where the context of link sequence number be lost (e.g. the pubsub component decides the subscriber has disappeared and discards context), the pubsub component is still in a position to re-filter and retransmit data cached locally or even refer back to its source to maintain integrity and temporal ordering of data to the subscriber.
+To repair larger gaps, the pubsub component may provide the capability to request upwards to the source using the source sequence number, or the pubsub component may draw upon local or remote journaling services to repair the gap. The source sequence number seen by the subscriber may be the link level sequence number between publisher and pubsub component, may be the ultimate publisher sequence number or even an internal sequence number given to the incoming published data to the pubsub component on a per source basis.
+The subscriber need not know how the source sequencing operates, only notify from when the link last gave a contiguous datastream.
+One can now see that the pubsub component's conversation to the source is akin to that of a subscriber to a pubsub component.
+When a subscriber detects a gap on its link, it can request for the data to be resent thus:
+The values represent the missed link sequence numbers. For a gap of 1, the linkfrom and linkto are the same.
+Should the pubsub have lost the link context and thus is unable to plug the gaps it will return an error <iq/> packet.
+All is not lost. The subscriber has a last-ditch repair scenario by sending last-received source sequence numbers.
+Due to the non-contiguous nature of source sequence numbers from the subscriber point of view, the values sent must represent not the gap, but the last valid sequence number received. Each source may have a separate sequence number stream. This allows the pubsub component to manage and, if necessary, request gaps itself from the publisher to resynchronise the subscriber. The pubsub or publishing source should have the ability to refuse a rebuild/resynchronise.
+It should be possible for the subscriber to send the link and source sequence numbers in the initial request. However, if link information has been discarded by the pubsub component (e.g. the connection was dropped and presence set offline) the link sequence numbers will be reset to zero (re-synchronised) thus:
+During times of low traffic, an active circuit can be provided with regular heartbeat transmissions. Heartbeats will increment the link level sequence numbers. Subscribers missing or detecting overdue heartbeats will thus be able to detect gaps or delays even in low traffic scenarios. If the data is simply delayed, the subscriber stub is in a position to take action (and/or alert the application/user). If data is lost or heartbeats do not arrive in time, the subscriber can decide to request retransmission, disconnect or wait.
+No source sequence numbering exists here, as it is purely a link-level entity.
+To be able to interpret published data in a more logical manner, more meaning needs to be given to data received.
+When a publish packet arrives with a topic or data namespace, there is currently no way of knowing how to interpret the tags therein. Do they replace existing tag values seen? Should previously sent tags that are not in the publish be kept or discarded? Are tag values being updated or was the previous value incorrect?
+To resolve this a type field may be added to the <publish/> tag.
+This option is preferable to extending the <iq/> type field as there will then be no need to split <iq/> packets if <publish/> elements have different types.
+The following extensions would be used in environments where topic/namespaces define discrete sets of data items and/or data items changing over time, as opposed to only referring to a topic datastream consisting of atomic, unrelated data. Other types can be defined as the need arises.
+'update' - partial update of data. Replaces the values of the fields of the topic/namespace it contains. Other fields held/cached downstream for this data item are still valid.
+'correction' - previous data for contained fields was incorrect - e.g. paragraph in a news story, but, as per update, unsent items are still valid.
+'image' - payload contains ALL the data for a data item/topic/namespace. All existing values should be dropped and replaced with the new data. Previously received fields not now contained within the image should be discarded.
+'drop' - namespace/topic item is now dead and all data in it should be deleted and purged from cache.
+'snapshot' - requested by subscriber and is a request for data (an image if empty of granular topics/namespaces) and no further updates, as distinct from a get, which is an on-going subscription in pubsub world.
+'add' - new topic/data item on publisher's feed. Note that an "image" publish for an item can be interpreted in the same way. Previous systems have had the ADD mechanism, but use of "add" has been discontinued, with the role taken up by the "image". (thoughts?)
+The above states (except "add") are very important for downstream caches and for applications that apply business logic to the datastreams.
+As touched on above, subscribers should be able to enquire of the publisher regarding what capabilities it provides and what to expect. Some items of use for JRPS are as follows:
+Permissioning protocols should be open to permit a multitude of permissioning schemas. Data providers may wish to enforce their schemes in ways that suit their particular business models. The protocol should not bind or dictate such mechanisms.
+The implementation of permissioning systems and regimes over time has repeatedly shown that it is especially dangerous to assume the behaviour of data and to disregard how information is used, protected, valued and owned or to force a scheme that is rigid and assumes a narrow problem domain. Thus the scheme should permit explicit and tokenised permissioning mechanisms.
+Tokenised permissioning allows sets of data can be treated en masse. By permitting the concept of "grant" and "deny" permissions simultaneously (settings that define who CAN see something or defining who CANNOT) individual publishers can manage access both broadly and down to very fine granularity.
+Permission tokens, if used, should be sent in-band with the data. This will allow data to change its coding online and thus immediately affect permissioning without a redistribution of the permissioning information.
+This does not prevent namespace/topic permissioning systems from being applied, nor should the permtoken be compulsory1.
+The pubsub systems should be able to <iq/> the publisher for the permissioning regime that applies.
+The definition of the XML carrying permissioning tables/information should be regime specific.
+Further information on why tokenised grant and deny permissioning is advantageous can be provided upon request.
Contributions in this context are when a subscriber publishes to one or more sources for redistribution so that it may reach the communities that subscribe to that source. By doing this, the subscriber reaches large communities, focus on specific communities and can abstract itself from delivery issues. The publisher gains information and broadens its appeal. Delivery abstraction is valuable, as a subscriber can then connect once to the publisher to gain access to all systems, networks, technologies, subscribers and media that the publisher and contributor agree upon. As you may guess, there is a need for content, flow control/throttling and ongoing permissioning to be specified and handled over time.
+Contributions requires a separate JEP, but the issues are important to the implementation of pubsub and of its permissions (Contributors have specific, complex and business-critical reasons to tightly control who sees data -- e.g. only customers, not competition!)
+Reliable Entity Link (or simply 'REL'), is a system for coordinating reliable bytestreams between two Jabber entities for the purpose of keeping applications (and application specifications) simple. However, this proposal does not define any specific bytestream protocol. It is expected that there will be multiple ways to obtain a bytestream between Jabber entities (thru-server and peer-to-peer are two methods that come to mind), but applications can refer to REL instead of some particular stream transport.
+A REL-compatible stream transport must have the following properties:
+Code | +Description | +
---|---|
INIT | +Initiation | +
GOOD | +Successful initiation (connected) | +
BAD | +Unsuccessful initiation (stream is closed, no further state) | +
CLOS | +Successful closure after establishment (stream is closed, no further state) | +
ERR | +Link failure after establishment (stream is closed, no further state) | +
The following stream transports that meet these guidelines are:
+Short name | +Protocol | +
---|---|
ibb | +&jep0047; | +
s5b | +&jep0065; | +
Before using REL, ensure it is a supported service of the remote entity by using &jep0030;:
+ +To use REL, the entities must obtain a REL Context ID (or cid) through some action. A cid is simply an opaque alphanumeric string. For example, perhaps the link is needed for a file transfer:
+ +All high-level protocols that use Reliable Entity Link MUST have a way of providing such a cid. The cid must be unique among all other REL cids between the two entities.
+The next step is to ask the remote entity which stream method it would like to use. We will use &jep0020; for this. The streams are listed using the short names from the table of supported streams.
+ +The keepAlive attribute indicates that the initiator is planning on trying another method if the one selected here is to fail. An entity SHOULD use keepAlive for all attempts but the last for a given application. If keepAlive is omitted, then it is considered false.
+ +The remote entity will then agree on a method:
+Or maybe an error:
+If the entity returns error, then the REL cid is invalidated and the application fails. If a stream method has been chosen successfully, then now it must be initiated using the REL cid as the stream's identifier (the stream goes into INIT state).
+ +On GOOD: This indicates the stream is ready for use within the original context, and data exchanged over the stream is to be left up to the application.
+ +On BAD: If the keepAlive="true" attribute was specified, then the initiator MUST repeat this section over again to attempt with a different method. If keepAlive was not specified, then the REL cid is invalidated and the application fails.
+ +On CLOS or ERR, the REL cid is invalidated.
+There are no security considerations.
+This JEP requires no interaction with &IANA;.
+The ®ISTRAR; shall register the 'http://jabber.org/protocol/rel' namespace as a result of this JEP.
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+Distributing data out-of-band (OOB) to one or more end-points is a requirement for many Jabber clients. The Jabber OOB Broadcast Service (JOBS) is a mechanism to allow end-points to open uni-directional data streams between each other, on top of which any number of applications can be built
The aim of this JEP is to define a process of connecting a sender to one or more receivers through a secondary TCP port.
+As the name implies, JOBS is designed to enable multicast, uni-directional OOB connections. These connections are usually between a "sender" client, a JOBS "service", and one or more "receiver" clients. Each such set of connections is collectively called a session. JOBS is designed to allow a single service to handle multiple sessions over a single host/port combination.
+ +To address a large number of typical uses efficiently, JOBS can multicast the data from a sender to multiple receivers. In order to keep the protcol as simple as possible, it only allows data to flow in one direction.
+ +JOBS utilizes a "two-band" authentication mechanism. This allows the end-points to know practically nothing about each other, yet still be assured that the OOB connection is really to/from the Jabber entity its intended to be. The authentication system is then backed-up with explicit authorization requests.
+ +For the OOB portion, clients connect to the host/address and port of the JOBS service for a given session. Once connected, a client-initiated handshake process occurs, and (if successful), then data is routed from the sender's connection to each receiver's connection. The only point at which any error information may be conveyed over the OOB connection is during the handshake process.
+ +Term | +Description | +
---|---|
OOB | +Out-Of-Band. Any network connection that exists outside of the normal Jabber protocol traffic. | +
session | +A session registered with a "server" for clients to connect to. | +
client | +An end-point on a JOBS session. | +
service | +The JOBS Jabber component/server. | +
server | +A particular host/port of the JOBS service. | +
sender | +The client sending data. | +
receiver | +A client receiving data. | +
Discovering support for JOBS involves either "jabber:iq:browse"
To determine support for JOBS via jabber:iq:browse, look for an item with a nested <ns/> with a value of "http://jabber.org/protocol/jobs":
+The JOBS protocol supports various scenarios to create sessions. Most of these scenarios allow an entity to determine the possible parameters to create a session with. To actually create a session, the (would-be) sender sends an "iq-set" with a <session action="create"/>. This returns the details of the newly created session, including the ID and OOB host/port.
+ +This use-case can be completely ignored for true "peer-to-peer" systems.
+ +The simplest create request is:
+ +This creates a session between sender@domain/resource and any one receiver. At this point, the JOBS service is ready to accept connections for this session. The <session/> element describes the details for the session. The value returned in the "id" attribute is the JOBS session ID
When creating a session, parameters to <session/> can be supplied, explicitly requesting that certain parameters be met (such as buffer size, time to expire, and receiver limit). Since these parameters have lower- and upper-bounds specific to the JOBS service, a sender may need to determine these limits.
+ +To determine the limits, the sender sends an "iq-get" with a <session action="create"/>:
+ +The returned <session/> is also prefilled with default values for all known parameters.
+ +To create a session with specific parameters, the sender sends an "iq-set" as in the "simple" use-case, but then specifying the parameter values desired:
+The above example creates a session that does not timeout. A JOBS service uses values from the default information set for any parameters that are missing.
+ +Any parameters that exceed the minimums/maximums causes an error.
+In some cases, the session creation process requires an interface more suitable for human consumption. In such cases the JOBS protocol helps by allowing for contained elements governed by other namespaces. For form-based creation, a "jabber:x:data" form
To create a session using forms, send a <session action="create"/> with an embedded <x xmlns="jabber:x:data"/>:
+ +The exact fields present in the form are dependent upon the JOBS implementation. The form SHOULD allow a user to at least specify the <session/> attributes.
+Using the form-based approach, the session is then created by sending a <session action='create'/> with a form submission (as defined for "jabber:x:data"):
+ +Once the session is created, the sender invites receivers to connect. The sender can invite receivers either directly, or via the JOBS service. Most invitations are distributed via <message/>.
+ +The sender can invite receivers directly. This is done using a <message/>:
+When inviting directly, the <session/> MUST contain enough information for a receiver to connect OOB. The required information is:
+Alternatively, a sender can invite receivers via the JOBS service. This is also done using a <message/>, with a <session action="notify"/> containing one or more <item action="invite" type="connection"/>:
+This results in the JOBS service sending the <message/> to each <item/>. Any additional elements (such as a <body/>) are passed onto those invited:
+At any time, a client can request information about sessions for a JOBS service. The request can be directed for "all" sessions, or a specific session
A client can request all the sessions for a JOBS service by sending an "iq-get" containing a <session action="info"/> with no ID:
+The JOBS service responds with all the sessions within the "iq-result". This is the only case where a result can have more than one <session/>.
+Alternatively, a client can request the information for a specific session by sending an "iq-get" containing a <session action="info"/> with the ID:
+The service responds with an "iq-result" of just the requested session.
+When a client connects (sender or receivers), a client-initiated handshake takes place. The purpose of this handshake is to authenticate the OOB connection, in relation to the client's JID. This authentication utilizes both in-band and OOB packets.
+ +To start the handshake, the client sends an "init" packet on its established connection:
+ +If the session exists, and the client's JID is not automatically rejected, the JOBS service responds with an auth-challenge packet, containing an unique, arbitrary token:
+ +Once received, the client then sends an "iq-set" containing a <session action="authenticate"/>, which itself contains an <item type='auth' action='confirm'/> with this confirm key:
+ +The service then compares this confirm key to that sent with the "auth-challenge" OOB packet. If this matches correctly, and the service determines this connection is authorized, the session will respond with a <session action="authenticate"/> containing a <item type="auth" action="accept"/> with the accept key:
+ +At this point, the client responds on the OOB data stream with an "auth-response" packet:
+ +If the connection is accepted, the JOBS service sends a "connected" packet:
+ +and after this, the data transfer occurs. If this connection is the sender, they may start sending data now (regardless if receivers are connected). If this connection is a receiver, the sender's data immediately follows the terminating "newline".
+Authenticating ensures the OOB connection matches a particular JID. Authorizing ensures to the service that receiver is allowed to be connected to the session. To determine if the session connection should be accepted or rejected, the JOBS service first checks if the JID matches the sender. This matches against the "full" JID, including node, domain, and resource. If this connection is the sender, it is allowed. Otherwise, the service confirms the connection with the sender.
+ +If a confirmation is required, the service sends an "iq-get" to the sender, with a <session action="authorize"/> containing an <item type"connection" action="confirm"/> with the full JID of the receiver:
+ +One or more <item type="connection" action="confirm/> elements, each specifying a JID to accept/reject. To accept (or reject) a connection, the sender responds with an "iq-result", wrapping each JID in either an <item type="connection" action="accept"/> or <item type="connection" action="reject"/>.
+ +If the connection is rejected, the service drops the connection, and notifies the sender and receiver of the dropped connection.
+The sender may drop a connection at any time. To drop a connection, the sender sends an "iq-set" with the <session/> containing the "connection" to drop:
+ +If the connection is successfully dropped, the service returns an "iq-result":
+ +The service also sends notification messages to the sender and the JID of the dropped connection (detailed in the "Being Notified about Events" section).
+Sessions are deleted either by timeout or explicitly. Sessions are deleted by timeout automatically under certain conditions. Sessions can also be deleted explicity by their senders, at any time. Regardless of the method of deletion, a notice is sent to all connected.
+ +This use-case can be completely ignored for true "peer-to-peer" systems.
+The exact conditions that expire a session are mostly up to the implementation. At a minimum, a session SHOULD be expired when there are less than two connections, and the "expires" time is reached.
+To explictly delete a session, the sender sends an "iq-set" containing a <session action="delete"/>:
+ +When a connection is accepted, the service sends a "notify" message to the sender and (if appropriate) the accepted receiver, with a <item type='connection' action='accept'/>:
+ +If the notification is not about the recipient of the message, then the <item/> contains the JID this notification pertains to.
+When a connection is rejected, the service sends a "notify" message to the sender and (if appropriate) the accepted receiver, with a <item type='connection' action='reject'/>:
+ +If the notification is not about the recipient of the message, then the <item/> contains the JID this notification pertains to.
+When a connection is dropped, the service sends a "notify" message to the sender and (if appropriate) the accepted receiver, with a <item type='connection' action='drop'/>:
+ +If the notification is not about the recipient of the message, then the <item/> contains the JID this notification pertains to.
+When a session is deleted, any clients connected to the session are immediately disconnected. The "notify" message is sent to the sender and any receivers still connected, with the <session action="notify"/> containing an <item type="status"/>:
+ +The reason the session is deleted is specified by the action attribute. A value of "delete" means it was explicitly deleted. A value of "expire" means it timed out.
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+ The <session/> element is the core element to the protocol. This element provides both information about a session and the action applied to it. It has a large number of attributes, and contains zero or more <item/> elements, zero or more <connect/> elements, and zero or three <limit/> elements. It may also contain elements governed by other namespaces.
+The "action" attribute specifies the action to apply or being applied to the session. From clients, this attribute MUST be specified. From the service this attribute MAY be specified (to prevent ambiguity). The value of "action" MUST be one of the following:
+Value | +Description | +
---|---|
authenticate | +Authenticating one or more connections. | +
authorize | +Authorizing one or more connections. | +
create | +Create a new session. | +
delete | +Delete an existing session. | +
notify | +Notification about the session. | +
The "status" attribute specifies the current status of the session. This attribute MUST NOT be present if the session does not have an identifier (i.e. does not yet exist). Only the service can provide this attribute. The value of "status" MUST be one of the following:
+Value | +Description | +
---|---|
active | +The session is active, but not yet in use. | +
closed | +The session has closed. | +
in-use | +The session is in use (e.g. data is being transferred). | +
pending | +The session is ready, but not yet active (e.g. not enough connections). | +
The "host" attribute specifies the OOB hostname for the session. This attribute SHOULD be specified when possible. The value of this attribute can either be the "raw" dotted-decimal address or a fully-qualified domain name.
+The "id" attribute identifies the session. This attribute is required for all uses of <session/> except the request to create a session. This value is any string that the service and clients can use to uniquely identify it.
+The "port" attribute specifies the OOB port number for the session. This attribute SHOULD be specified when possible.
+The "sender" attribute specifies the JID of the sender. This attribute SHOULD be specified when possible. The value of this attribute MUST be the full JID of the sender, including node and resource (if possible).
+The "buffer" attribute specifies the size of a temporary transfer buffer. This attribute MAY be present at any time, and SHOULD be presented by the service wherever possible. The value of this attribute MUST be a non-negative number. A value of 0 means there is no buffer. This value has limits defined by the "jobs:buffer" parameter statistic.
+The "expires" attribute specifies the number of seconds before this session times out. This attribute MAY be present at any time, and SHOULD be presented by the service wherever possible. The value of this attribute MUST be either a positive number or -1. A value of -1 means this session does not expire. This value has limits defined by the "jobs:expires" parameter statistic.
+The "receivers" attribute specifies the maximum number of receivers this session can have. this attribute MAY be present at any time, and SHOULD be presented by the service wherever possible. The value of this attribute MUST be either a positive number of -1. A value of -1 means this session can (theoretically) have any number of receivers. This value has limits defined by the "jobs:receivers" parameter statistic.
+The <item/> element is used for detailed information about specific items of a session. It is used to contain authentication keys, to define connections, and provide more detailed status for a session. It has attributes for the type of item and the action associated with this item. This element contains only character data.
+The "action" attribute specifies the action to apply or being applied to this item. From clients, this attribute SHOULD be specified. From the service, this attribute MUST be specified (to prevent ambiguity). The value of "action" MUST be one of the following:
+Value | +Description | +Notes | +
---|---|---|
accept | +The item is accepted. | +This value MUST only be used when the type is "auth" or "connection". | +
confirm | +The item needs confirmation. | +This value MUST only be used when the type is "auth" or "connection". | +
delete | +The item is deleted. | +This value MUST only be used when the type is "status". | +
drop | +The item is dropped. | +This value MUST only be used when the type is "connection". | +
expire | +The item has expired. | +This value MUST only be used when the type is "status". | +
invite | +The item is invited to the session. | +This value MUST only be used when the type is "connection". | +
reject | +The item is rejected. | +This value MUST only be used when the type is "auth" or "connection". | +
The "type" attribute specifies the type of item. This attribute MUST be present. The value of "type" MUST be one of the following:
+Value | +Description | +
---|---|
auth | +The item pertains to authentication keys. | +
connection | +The item details a session connection. The CDATA is the JID that is connected. | +
status | +The item details a session status event. | +
The <connect/> element specifies a valid host/port combination for a session. An instance of this element MUST be present for each host/port combination possible. This element SHOULD only be present when information on creating sessions is requested. It has attributes to define the OOB hostname and port number. This element is empty.
+The "host" attribute specifies the OOB hostname. This attribute MUST be present. The value is either the "raw" dotted-decimal IP address, or the fully-qualified domain name.
+The "port" attribute specifies the OOB port number. This attribute MUST be present. The value MUST be a positive integer in the range (0 < port <= 1024).
+The <limit/> element specifies a valid host/port combination for a session. An instance of this element MUST be present for each "type". This element SHOULD only be present when information on creating sessions is requested. It has attributes to define the type of limit, the default value, the minimum value, and the maximum value. This element is empty.
+The "type" attribute specifies the type of limit. This attribute MUST be present. Each type corresponds to an attribute of <session/>. The value of "type" MUST be one of the following:
+Value | +Description | +
---|---|
buffer | +The buffer size limits. The units for "default", "max", and "min" are bytes. | +
expires | +The expires time limits. The units for "default", "max", and "min" are seconds. | +
receivers | +The receiver count limits. The units for "default", "max", and "min" are number of connections. | +
The "default" attribute specifies the default value for this limit. This attribute MUST be present. The value of "default" MUST be a number.
+The "max" attribute specifies the maximum value for this limit. This attribute MUST be present. The value of "max" MUST be a number. A value of -1 means there is no maximum value.
+The "min" attribute specifies the minimum value for this limit. This attribute MUST be present. The value of "min" MUST be a number. A value of -1 means there is no minimum value.
+Code | +Message | +Cause | +
---|---|---|
400 | +Bad Request | +The JOBS service did not understand the request. | +
403 | +Forbidden | +The JOBS service cannot accept the authentication request from the requesting JID. | +
404 | +Not Found | +The JOBS service could not find the given session. | +
406 | +Not Acceptable | +The authentication is not valid. | +
Code | +Message | +Cause | +
---|---|---|
400 | +Bad Request | +The JOBS service did not understand the request. | +
403 | +Forbidden | +The JOBS service cannot accept the authorization request from the requesting JID. | +
404 | +Not Found | +The JOBS service could not find the given session. | +
406 | +Not Acceptable | +The authorization is not valid. | +
Code | +Message | +Cause | +
---|---|---|
400 | +Bad Request | +The JOBS service did not understand the request. | +
403 | +Forbidden | +The JOBS service cannot accept any creation requests from this JID. | +
406 | +Server Not Acceptable | +The JOBS service cannot accept any creation requests using the requested <server/> parameters. | +
406 | +Restrictions Not Acceptable | +The JOBS service cannot accept any creation requests using the requested <accept/>, <confirm/>, and/or <reject/> parameters. | +
503 | +Service Unavailable | +The JOBS service cannot accept any additional sessions at this time. Future requests may be accepted. | +
Code | +Message | +Cause | +
---|---|---|
400 | +Bad Request | +The JOBS service did not understand the request. | +
403 | +Forbidden | +The JOBS service cannot accept deletion requests from the requesting JID. | +
404 | +Not Found | +The JOBS service could not find a given session. | +
Code | +Message | +Cause | +
---|---|---|
400 | +Bad Request | +The JOBS service did not understand the request. | +
403 | +Forbidden | +The JOBS service denied the connection for any reason. | +
404 | +Not Found | +The JOBS service could not find a given connection and/or JID. | +
406 | +Not Acceptable | +The JOBS service denied the notify for some reason. | +
504 | +Remote Server Timeout | +The JOBS connection timed out. | +
The OOB protocol consists of a series of hanshaking headers, then the normal data transfer process. The syntax of the hanshake packets is similar to HTTP and SIP, in that it includes a "version and method" line, followed by zero or more "headers". The end of a packet is marked by two adjacent carriage returns (i.e. a single "empty" line). The primary difference is with the first line ("version and method"), where the protocol name and version precede the method.
+
+OCTET :=
+CTL :=
+UALPHA :=
+LALPHA :=
+DIGIT :=
+SP :=
+CR :=
+LF :=
+BINDATA :=
+ ]]>
Comand-line (example) | +jobs/0.4 init |
+
---|---|
Expected header-fields | +
|
+
Comand-line (example) | +jobs/0.4 auth-challenge |
+
---|---|
Expected header-fields | +
|
+
Comand-line (example) | +jobs/0.4 auth-response |
+
---|---|
Expected header-fields | +
|
+
Comand-line (example) | +jobs/0.4 connected |
+
---|---|
Expected header-fields | +NONE | +
Comand-line (example) | +jobs/0.4 error |
+
---|---|
Expected header-fields | +
|
+
Accessing a RDBMS in a generic fashion is a complex and difficult + task. Consequently, this will not be an attempt to XMLize a generic + Database API or query language. Instead, it will providing a + simple mechanism for a JID to read/write data that it has access to + and specifying a model for those schemas to use in xml.
+ +This JEP has two aims.
+ +Although designed for use with an RDBMS this JEP is not + restricted to such uses. It may be used with any data storage + system that can be broken down to a simple table, column/row + format. for example comma delimited files.
+To understand the following sections of this JEP the reader + must be aware of the following.
+ +The current namespace of http://openaether.org/projects/jabber_database.html + will be used until this becomes a jep. Once officially accepted as + a jep and approved as final by the council, it will become + http://www.jabber.org/jeps/jep-0043.html.
+There are a limited subset of data types available:
+All SQL/RDBMS units will be scoped in the xml hierarchy:
+ +
+<database>
+ <table>
+ <col/>
+ </table>
+</database>
+
+
+ All examples will assume the existence of the following rdbms setup. A + database named 'testdb' with tables created with following SQL + script:
+ +
+ create table tbl_one
+ (
+ a_int int,
+ a_float float,
+ a_char char(10)
+ )
+ create table tbl_two
+ (
+ a_date datetime,
+ a_numeric numeric(9,3)
+ )
+
+ This is a simple request to discover what tables/procedures + exist on the database testdb. And what permissions are available + to the user. All schema requests will respond within the scope that + was asked for. This is to prevent unnecessary data from flooding + the network. So the response for the above request would look + something like:
+ +The response is scoped to only the 'children' of the request. + Since the request was for the testdb database, only the tables + within that database were returned in the result. The reason for + the limitation is to prevent excessively large packets from filling + the network from large schemas.
+ +The response indicates that the user has both read and write + permissions on the table 'tbl_one' and only read permissions on + the table 'tbl_two'. Consequently, the user may only perform get + requests on 'tbl_two'.
+ +The response would look like:
+ +The schema response for tbl_one is quite intuitive. Three + columns exist, one called a_int of type int (integer), another + a_float of type float and a third called a_char of type char + with a size of ten characters.
+ + +Manipulation of data (select, insert, update, delete) will + definitely not be elegant or easy. SQL allows for some fairly + complex queries on any fully functional RDBMS. Consequently, + the data manipulation will be relatively limited since it is + not a goal to translate SQL into xml.
+ +To indicate a select like query, specify an <iq> of + type get. The table that the query is to be performed against + must be specified. The columns that are to be returned in + the result set must be scoped within the relative table. + Any attribute on the <col> element besides name will be + ignored. e.g. it is not required nor recommended to specify + the data types or the sizes while performing a get.
+ +It is also possible to specify a limit on the number of rows + returned in the result set by specifying a value for the limit + attribute.
+ +In this case a limit of two rows will be returned in the result set.
+ +The result set which is returned will contain all the rows + that met the criteria of the select. There is no schema + information beyond the column names included in the result set. + Each 'row' in the result set is scoped within the corresponding + <table> element. This allows for queries on multiple + tables to be used in one <iq> packet.
+ +It would be impractical to request the entire contents of the + table every time you needed one row or a subset of the data. You + can constrain the result set by specifying a where clause.
+ +Attributes only used in the <col> element within a + <where> element are the op (for operator) and conj for + (conjunction). The op is used for comparison operators such + as <, >, =, <>, <=, >= + +
The conjuction attribute is used to combined constraints in the where clause + +
Result
+ +Inserting or altering the stored data in anyway requires + setting the type attribute to a value of set. This indicates + that the user wants to perform a 'insert/update'. The + differentiating factor between an insert and an update operation + is whether a <where> element is used. If there is no +<where> element then it must be interpreted as an insert. + If a <where> element does exist, then it must be + interpreted as an update.
+ +Result
+ +If there is no result set for the query, as in an update, + insert, delete, then the response must indicate success or + failure within the <table> element scope. An empty +<table> element indicates success, and a <table> + element containing an <error> element indicates a failure.
+ +The insert into tbl_one succeeded since the response has an + empty <table> element. However, the insert into tbl_two + failed with a permission denied error. Which is indicated with a + non-empty <table> element.
+As stated previously, if the type attribute has a value of + set and a <where> element exists, then it must be interpreted as an update.
+ +Result
+ +Again, if there is no result set returned by the query, then + success or failure must be indicated.
+ +If the type attribute has a value of set and there are no + <col> elements scoped within the <table> element, + then the query must be interpreted as a delete.
+ +Result
+ +Again, if a result set is not generated by a query, then + success or failure must be indicated by the <table> element
+ + Procedures, or stored procedures
The <proc> element will be used to indicate a procedure. + It has similar characteristics to the <table> element. The + core differences are that the <col> elements have permissions + and a <result> element can be used to indicate the value + returned by the procedure.
+ +The permission attribute on a <col> element is used to + indicate whether the parameter is in (read), out (write) or in/out (both).
+ +The only result set acceptable from a procedure is that of the + parameters or <col> element. If the procedure produces a + result set outside of the parameters this should be ignored.
+ +The server must be able to let the client know when an error + occurs, instead of just being silent.
+ +Code | +Message | +Description | +
---|---|---|
399 | +Invalid Database Name | +Returned when the client has requested information from a + database which does not exist according to the component. | +
398 | +Invalid Table Name | +Returned when the client has requested information from a + table/procedure which does not exist according to the component. | +
397 | +Invalid Column Name | +Returned when the client has requested information from a + column which does not exist according to the component. | +
380 | +Permission Denied on Table | +Returned when the requested action is not allowed for the + user on the table | +
401 | +Access Denied | +Returned when the user does not have permission to use the + component. | +
If the user requests an action on a table which they do not have + permission to do the following should be returned
+ +If the user is not allowed to access the component the following should be returned
+ +There are requirements which can be provided by other jabber + components/namespaces, namely the jabber:iq:browse namespace + in-place of Version Negotiation. Due to the inherent limitations + of the above data retrieval mechanisms more sophisticated querying + techniques might be desired. The <query> element will extend + the functionality
+ +The abilities described in the Basics section are just that, + basic. To provide more flexibility and allow for the full power + of SQL without xmlifying everything, a <sql> element may + be implemented to provide this feature.
+ +The <sql> element must be scoped within the <database> element.
+ +Result
+ +Since SQL is so flexible, the result set schema is not known + until it is returned as a result of the query. Consequently, it + must be sent as the first 'row' of the returned result. Each + following row will be the actual data queried for.
+ +If multiple tables are used within one SQL statement, then + then name attribute within the <table> element can not be + accurately denoted with a single table name. The best way to deal + with this situation is to simply use a unique identifier within + the scope of the <database> element. This will allow for + multiple <sql> results to be scoped within the same result.
+ +It is expected that this protocol will grow and be extended
+ to meet various demands. Therefore, version
+ negotiation
When the connection initiator, client end-user or + server/transport, starts a session, it must first send + the version number it expects to use, otherwise, behavior + is undefined.
+ +
+<iq id="000" type="get" to="db.host">
+ <database
+ xmlns="http://openaether.org/projects/jabber_database.html">
+ <version>0.1</version>
+ </database>
+</iq>
+
+
+ Three responses are possible from the server.
+
+<iq id="000" type="result" from="db.host">
+ <database
+ xmlns="http://openaether.org/projects/jabber_database.html">
+ <version>0.1</version>
+ </database>
+</iq>
+
+ The type of 'result' indicates that the version request was
+ successful and if the client is satisfied with the version number,
+ may continue with schema requests or whatever.
+<iq id="000" type="error" from="db.host">
+ <database
+ xmlns="http://openaether.org/projects/jabber_database.html"/>
+</iq>
+
+ The type of 'error' indicates a failure in conforming to the
+ desired version number. The server may optionally send an
+ alternative option.
+
+<iq id="000" type="error" from="db.host">
+ <database
+ xmlns="http://openaether.org/projects/jabber_database.html">
+ <version>0.2</version>
+ </database>
+</iq>
+
Thanks to Russell Davis (ukscone) for fine tuning the layout and wording of this jep. It would probably have been unreadable if it wasn't for him.
+
+<!ELEMENT version (#PCDATA)>
+<!ELEMENT error (#PCDATA)>
+<!ELEMENT sql(#PCDATA)>
+<!ELEMENT database (table | sproc | sql | error)*>
+<!ELEMENT table (col | where | error)*>
+<!ELEMENT where (col+)>
+<!ELEMENT col (#PCDATA)>
+<!ELEMENT proc(col | result | error)*>
+<!ELEMENT result (#PCDATA)>
+<!ATTLIST error code CDATA #IMPLIED>
+<!ATTLIST database name CDATA #IMPLIED>
+<!ATTLIST table
+name CDATA #IMPLIED
+ permission (read | write | both) #IMPLIED
+ limit CDATA #IMPLIED
+>
+<!ATTLIST proc name CDATA #IMPLIED>
+<!ATTLIST col
+ name CDATA #IMPLIED
+ size CDATA #IMPLIED
+ op (eq | neq | lt | gt | let | get | null) #IMPLIED
+ conj (not | or | and ) #IMPLIED
+ permission (read | write | both) #IMPLIED
+ type (bit | tinyint | integer | utinyint | uinteger |
+ float | numeric | date | datetime | timestamp |
+ time | char | vchar | text | blob) #IMPLIED
+>
+
+ Anyone care to do this?
+Jabber has traditionally supported a subset of the XML Namespaces specification
This is convenient for client and server implementors, since they only need to check the element name to determine both the name and the context of the element. However, these restrictions mean that developers are unable to take advantage of some of the features that namespaces provide.
+ +Many developers have expressed an interest in having Jabber fully support namespaces - a desire which is likely to increase as time goes on. This support consists of allowing any namespace prefix to be used with any namespace, and also to allow namespace prefixes to be pre-declared on the stream root.
+ +This document outlines the semantics required for servers and clients to support namespaces fully, and also discusses implementation techniques and methods for providing compatibility with older "fixed-prefix" implementations.
+A typical XML stream is a pair of XML documents, one for each direction of communication between the two peers. An simple example of these might look like this:
+ +Note that there may also be additional namespaces specified in the stream header, to select or inform of various server features:
+ +Currently, the prefix for each namespace is fixed; it cannot vary at all, since implementations use it for matching. The desire is to be able to use arbitrary prefixes:
+ +Also, since there exist streams in both directions, it should be possible for prefixes to differ between the two streams:
+ +Additionally, it should be possible to declare namespaces on the stream header so that they don't need to be declared later:
+ +And of course, any combinations of these should be valid, as long as they conform to the XML Namespaces specification.
+ +In order to implement namespaces correctly, implementations will need to check both the namespace of an element (or attribute), and its namespace, in order to match it. An implementation will need to maintain some sort of mapping between prefixes and namespaces, though some parsers, such as recent versions of Expat, can do this for the implementor.
+ +Implementations should, wherever possible, adhere to the IETF maxim "be liberal in what you accept, and conservative in what you send". This means accepting any valid namespace prefix, but using only the traditional prefixes (i.e. "stream" for "http://etherx.jabber.org/streams", "sasl" for "http://www.iana.org/assignments/sasl-mechanisms", and no prefix for the application namespace). For servers, this has the added benefit of getting compatibility with non-namespace-aware clients for free.
+ +In server components that may have to forward packets received from one stream to another stream, it may be necessary for the application namespace to be rewritten before the packet is forwarded. Examples of this are client-to-server and server-to-server components, which must convert "jabber:client" and "jabber:server" components, respectively, into "jabber:component:accept" packets before they are forwarded to the router.
+ +Harmonized ability to kick and ban users, and clarified that a user cannot be kicked or banned by a moderator or admin with a lower affiliation.
Specified how to send multiple invitations simultaneously; corrected some errors regarding consistency of affiliation state changes; changed message events prohibition from MUST NOT to SHOULD NOT; corrected error handling related to the #traffic disco node; allowed <password/> as a child of <destroy/>; changed max users error from ¬allowed; to &unavailable;; specified that the maxchars attribute counts characters in complete XML stanzas; added disco features for FORM_TYPEs; defined registry for status codes; split Create Instant Room into separate use case for protocol compliance purposes; adjusted XML schemas to reflect the foregoing changes; re-wrote the introduction; clarified small textual matters throughout.
Corrected several errors in the affiliation state chart and in the examples (wrong FORM_TYPE values); mentioned /me command.
Added text about allowable extension namespaces and related service discovery mechanisms; specified well-known service discovery nodes; added conformance terms to clarify some descriptions; modified affiliation state chart to allow more flexible state changes; per list dicussion, added ability to convert a one-to-one chat into a conference, including sending of history; specified error to use when max users limit is reached; specified form for admin approval of user registration requests and modified FORM_TYPE from http://jabber.org/protocol/muc#user to http://jabber.org/protocol/muc#register; modified FORM_TYPE for room configuration from http://jabber.org/protocol/muc#owner to http://jabber.org/protocol/muc#roomconfig.
Added example and registry submission for service discovery extension.
Removed jabber:iq:browse references; clarified order of presence stanzas sent to new occupant on entering room; specified format of in-room messages (type='groupchat', from='room@service'); clarified allowable attributes in various list-related operations; made admin/owner revocation text and examples consistent with state chart; clarified ownership revocation conflict scenarios; changed the 'muc#roomconfig_inviteonly' field to 'muc#roomconfig_membersonly'; changed attribute order in examples to match XML canonicalization rules; corrected several errors in the schemas.
Corrected discovery of registered roomnicks; added note about error to return if nicks are locked down.
Fixed an error in the muc#user schema.
Corrected a few errors in the examples; added IQ results in order to clarify workflows.
Clarified JID matching rules (same as for privacy lists in XMPP IM).
Added XMPP error handling; fully specified all conformance terms.
Removed protocol for requesting voice in a moderated room (should be performed using Ad-Hoc Commands).
Added protocol for requesting voice in a moderated room; added (informational) mapping of IRC commands to MUC protocols.
Added room configuration option for restricting presence broadcast to certain roles.
Added history management protocol on entering a room.
Specified that ban occurs by JID, not roomnick; allowed privileged users to send messages to the room even if not present in the room; added note that service should remove occupant if a delivery-related stanza error occurs; enabled user to disco the room in order to discover registered roomnick; specified that "banning" by domain or regex is a service-level configuration matter and therefore out of scope for MUC; specified that role should be decremented as appropriate if affiliation is lowered; added some clarifying text to room creation workflow; added implementation note about sending an out-of-band message if a user's affiliation changes while the user is not in the room; fixed stringprep references (room nicks use Resourceprep); clarified relationship between Room ID (i.e., node identifier of Room JID, which may be opaque) and natural-language Room Name; specified Field Standardization profile per JEP-0068; defined Jabber Registrar submissions; added schema locations.
Added XML schemas.
Added reference to nodeprep Internet-Draft.
Commented out revision history prior to version 1.0 (too long); clarified business rules regarding when nicks, full JIDs, and bare JIDs are used in reference to roles and affiliations; consistently specified that extended presence information in the muc#user namespace must include the full JID as the value of the 'jid' attribute in all cases; cleaned up text and examples throughout; added open issue regarding syntax of room nicknames.
Added protocol for declining an invitation; replaced <created/> element with status code 201; modified the destroy room protocol so that <destroy/> is a child of <query/>; clarified usage of 'nick' attribute when adding members; prohibited use of message events.
Per a vote of the Jabber Council, revision 0.23 was advanced to Draft on 2002-11-21. (For earlier revision history, refer to XML source.)
Added examples for disco#items queries sent to a room; prohibited 'type' attribute on invite messages sent from client to room; added dependencies for JEPs 11 and 30; changed 'room user' to 'occupant'; fixed many small errors throughout.
Added example for disco#items; added support for cancellation of room configuration using type='cancel' from JEP-0004; noted 403 error for invites sent by non-admins in members-only room.
Clarified several small ambiguities; made <body/> optional on invites sent from the service to the invitee; added error scenarios for changing nickname and for destroying the room; specified that the service must return the full member list for a members-only room (not only the members in the room); updated the disco examples to track protocol changes.
Specified that messages sent to change the room subject must be of type "groupchat"; updated the legal notice to conform to the JSF IPR policy.
Added ability to create an instant room within MUC (not by using gc-1.0 protocol); cleaned up disco examples.
Added experimental support for disco; added sections for security, IANA, and JANA considerations; corrected typographical errors; cleaned up some DocBook formatting.
Added the optional <actor/> element (with 'jid' attribute) to <item/> elements inside presence stanzas of type "unavailable" that are sent to users who are kicked or banned, as well as within IQs for tracking purposes; reverted all list editing use cases (ban, voice, member, moderator, admin, owner) to use of MUC format rather than 'jabber:x:data' namespace; added several guidelines regarding generation and handling of XML stanzas; cleaned up the change room subject use case; changed several ambiguous uses of 'would', 'can', and 'will' to 'should', 'may', or 'must'; fixed several small errors in the text, examples, and DTDs.
Added the <item/> element to presence stanzas of type "unavailable" in order to improve the tracking of user states in the room; consolidated <invitee/> and <invitor/> elements into an <invite/> element with 'from' and 'to' attributes; made <reason/> element always a child of <item/> or <invite/> in the muc#user namespace; moved the alternate room location in room destruction to a 'jid' attribute of the <alt/> element; further specified several error messages; disallowed simultaneous modifications of both affiliations and roles by a moderator or admin; added several more rules regarding handling of XML stanzas; added use cases for granting and revoking administrative privileges; adjusted DTD to track all changes.
Fully incorporated the change to affiliations + roles; moved a number of admin use cases to a new section for moderator use cases; added participant use case for requesting membership; added admin use cases for adding members, removing members, granting and revoking moderator privileges, and modifying the moderator list; organized the sections in a more logical manner.
Significantly modified the privileges model by distinguishing between in-room "roles" and long-lived "affiliations"; specified the privileges of the various roles and affiliations; included state transition charts for both roles and affiliations; removed use of MUC protocol for editing ban, voice, and admin lists (but not for the actions of banning users and granting/revoking voice); added delivery rule regarding IQ stanzas; changed kick so that the action is based on changing the role to "none".
Corrected the change nickname examples (newnick sent on unavailable, no nick sent on available).
Removed SHA1 passwords; specified that room shall add passwords on invitations to password-protected rooms (not supplied by invitor).
Changed 'participant' to 'room user' and 'discussant' to 'participant'; clarified presence rule about client generation of extended presence information; added role of 'none'.
Fixed extended presence on entering or creating a room (plain '...muc' with no fragment); harmonized #user with #admin regarding the use of the <item/> element and associated attributes (jid, nick, etc.), and added 'role' attribute; modified management of voice, ban, admin, and member lists to use <query/> wrapper and new <item/> structure; changed the 'member' role to 'discussant', added 'outcast' role for banned users, and added new 'member' role to enable management of member lists; changed invitation-only rooms to members-only rooms and made appropriate adjustments to apply member lists to both members-only rooms and open rooms; modified nickname change protocol slightly to send the old nickname in the unavailable presence and the new nickname in the available presence; removed prohibition on members-only rooms that are password-protected; removed the <query/> wrapper for the <destroy/> element; updated the DTDs.
Added extended presence ('...#user') on entering a room for MUC clients; changed namespace on room creation request to '...#owner'; added a service discovery example using jabber:iq:browse; added information about discussion history; made small fixes to several examples; further defined the presence rules; transferred all implementation notes to a dedicated section; added a Terminology section.
Made further changes to the room creation workflow (finally correct); removed feature discovery use case (this needs to be addressed by a real service discovery protocol!); added ability for room owners to edit the admin list; removed <body/> from invitations generated by the service; removed messages sent to kicked and banned users (handled by unavailable presence with status code); added a number of implementation notes; converted all examples to Shakespeare style.
Fixed the room creation workflow; changed some terminology ("join" to "enter" and "leave" to "exit").
Specified and improved the handling of invitation-only rooms. In particular, added the ability for room admins to edit the invitation list and added a configuration option that limits the ability to send invitations to room admins only.
Changed namespaces from http://jabber.org/protocol/muc/owner etc. to http://jabber.org/protocol/muc#owner etc. per Jabber Council discussion.
Changed namespaces to HTTP URIs; left role handling up to the implementation; further clarified presence rules.
Disallowed kicking, banning, and revoking voice with respect to room admins and room owners; replaced <x/> with <query/> in the Discovering Room Features and Destroying a Room use cases; corrected some small errors and made many clarifications throughout.
Removed <whois/> command (unnecessary since participants with appropriate privileges receive the full JID of all participants in presence stanzas); completed many small fixes throughout.
More clearly delineated participant roles and defined the hierarchy thereof (owner, admin, member, visitor); replaced <voice/> element in extended presence with <item role='member'/>; changed initial room configuration to use IQ rather than message; adjusted presence rules (especially regarding extended presence information); cleaned up examples throughout; updated DTD to track changes.
More clearly defined the scope; removed fully anonymous rooms; changed meaning of semi-anonymous rooms and of non-anonymous rooms; added mechanism for notification of full JIDs in non-anonymous rooms; replaced the <admin/> element in extended presence with a <role/> element (more extensible); changed room passwords to cleartext; added status codes for various messages received from the service; added lists of valid error and status codes associated with the 'http://jabber.org/protocol/muc#user' namespace; added a <reason/> element for invitations; made kick and ban reasons child elements rather than attributes; replaced stopgap feature discovery mechanism with jabber:iq:negotiate; added extended presence element to room creation request and clarified the room creation process; specified presence reflection rules; added method for destroying a room; adjusted DTDs to track all changes.
Added DTDs; changed feature discovery to use <x/> element rather than query and made service response come in IQ result; fixed reference to JEP 29; changed 'grant' to 'add' and 'revoke' to 'remove' for consistency in the item attributes; made several other small changes.
Changed the kick, ban, and voice protocols; added a few more configuration options; specified the restrictions for roomnicks; and added a stopgap service discovery protocol.
Changed all non-GC-1.0 use cases to jabber:gc:* namespaces or jabber:x:data; added use cases for ban list management and room moderation; added protocol for sending notice of admin and voice privileges in presence; cleaned up text and many examples.
Changed admin use cases; cleaned up participant and owner use cases.
Broke content out into three actors (participant, owner, and admin) and added more detail to owner and admin use cases.
Initial version.
Traditionally, instant messaging is thought to consist of one-to-one chat rather than many-to-many chat, which is called variously "groupchat" or "text conferencing". Groupchat functionality is familiar from systems such as Internet Relay Chat (IRC) and the chatroom functionality offered by popular consumer IM services. The Jabber community developed and implemented a basic groupchat protocol as long ago as 1999. This "groupchat 1.0" protocol provided a minimal feature set for chat rooms but was rather limited in scope. This specification builds on the older "groupchat 1.0" protocol in a backwards-compatible manner but provides advanced features such as invitations, room moderation and administration, and specialized room types. These extensions are implemented using protocol elements qualified by the 'http://jabber.org/protocol/muc' namespace (and the #owner, #admin, and #user fragments on the main namespace URI).
+This document addresses common requirements related to configuration of, participation in, and administration of individual text-based conference rooms. All of the requirements addressed herein apply at the level of the individual room and are "common" in the sense that they have been widely discussed within the Jabber community or are familiar from existing text-based conference environments outside of Jabber (e.g., Internet Relay Chat as defined in &rfc1459; and its successors).
+This document explicitly does not address the following:
+This limited scope is not meant to disparage such topics, which are of inherent interest; however, it is meant to focus the discussion in this document and to present a comprehensible protocol that can be implemented by Jabber client and component developers alike. Future specifications may of course address the topics mentioned above.
+This document addresses the minimal functionality provided by existing multi-user chat services in Jabber. For the sake of backwards-compatibility, this document uses the original "groupchat 1.0" protocol for this baseline functionality, with the result that:
+The additional features and functionality addressed in this document include the following:
+In addition, this document provides protocol elements for supporting the following room types:
+Affiliation -- a long-lived association or connection with a room; the possible affiliations are "owner", "admin", "member", and "outcast" (naturally it is also possible to have no affiliation); affiliation is distinct from role. An affiliation lasts across a user's visits to a room.
+Ban -- to remove a user from a room such that the user is not allowed to re-enter the room (until and unless the ban has been removed). A banned user has an affiliation of "outcast".
+Bare JID -- the <user@host> by which a user is identified outside the context of any existing session or resource; contrast with Full JID and Room JID.
+Full JID -- the <user@host/resource> by which an online user is identified outside the context of a room; contrast with Bare JID and Room JID.
+GC -- the minimal "groupchat 1.0" protocol
History -- a limited number of message stanzas sent to a new occupant to provide the context of current discussion.
+Invitation -- a special message sent from one user to another asking the recipient to join a room.
+IRC -- Internet Relay Chat.
+Kick -- to temporarily remove a participant or visitor from a room; the user is allowed to re-enter the room at any time. A kicked user has a role of "none".
+Logging -- storage of discussions that occur within a room for public retrieval outside the context of the room.
+Member -- a user who is on the "whitelist" for a members-only room or who is registered with an open room. A member has an affiliation of "member".
+Moderator -- a room role that is usually associated with room admins but that may be granted to non-admins; is allowed to kick users, grant and revoke voice, etc. A moderator has an role of "moderator".
+MUC -- the multi-user chat protocol for text-based conferencing specified in this document.
+Occupant -- any Jabber user who is in a room (this is an "abstract class" and does not correspond to any specific role).
+Outcast -- a user who has been banned from a room. An outcast has an affiliation of "outcast".
+Participant -- an occupant who does not have administrative privileges; in a moderated room, a participant is further defined as having voice (in contrast to a visitor). A participant has a role of "participant".
+Private Message -- a message sent from one occupant directly to another's room JID (not to the room itself for broadcasting to all occupants).
+Role -- a temporary position or privilege level within a room, distinct from a user's long-lived affiliation with the room; the possible roles are "moderator", "participant", and "visitor" (it is also possible to have no defined role). A role lasts only for the duration of an occupant's visit to a room.
+Room -- a virtual space that Jabber users figuratively enter in order to participate in real-time, text-based conferencing with other users.
+Room Administrator -- a user empowered by the room owner to perform administrative functions such as banning users; however, is not allowed to change defining room features. An admin has an affiliation of "admin".
+Room ID -- the node identifier portion of a Room JID, which may be opaque and thus lack meaning for human users (see Business Rules for syntax); contrast with Room Name.
+Room JID -- the &ROOMJID; by which an occupant is identified within the context of a room; contrast with Bare JID and Full JID.
+Room Name -- a user-friendly, natural-language name for a room, configured by the room owner and presented in Service Discovery queries; contrast with Room ID.
+Room Nickname -- the resource identifier portion of a Room JID (see Business Rules for syntax); this is the "friendly name" by which an occupant is known in the room.
+Room Owner -- the Jabber user who created the room or a Jabber user who has been designated by the room creator or owner as someone with owner privileges (if allowed); is allowed to change defining room features as well as perform all administrative functions. An owner has an affiliation of "owner".
+Room Roster -- a Jabber client's representation of the occupants in a room.
+Server -- a Jabber server that may or may not have associated with it a text-based conferencing service.
+Service -- a host that offers text-based conferencing capabilities; often but not necessarily a sub-domain of a Jabber server (e.g., conference.jabber.org).
+Subject -- a temporary discussion topic within a room.
+Visit -- a user's "session" in a room, beginning when the user enters the room (i.e., becomes an occupant) and ending when the user exits the room.
+Visitor -- in a moderated room, an occupant who does not have voice (in contrast to a participant). A visitor has a role of "visitor".
+Voice -- in a moderated room, the privilege to send messages to all occupants.
+Fully-Anonymous Room -- a room in which the full JIDs or bare JIDs of occupants cannot be discovered by anyone, including room admins and room owners; such rooms are NOT RECOMMENDED or explicitly supported by MUC, but are possible using this protocol if a service implementation offers the appropriate configuration options; contrast with Non-Anonymous Room and Semi-Anonymous Room.
+Hidden Room -- a room that cannot be found by any user through normal means such as searching and service discovery; antonym: Public Room.
+Members-Only Room -- a room that a user cannot enter without being on the member list; antonym: Open Room.
+Moderated Room -- a room in which only those with "voice" may send messages to all occupants; antonym: Unmoderated Room.
+Non-Anonymous Room -- a room in which an occupant's full JID is exposed to all other occupants, although the occupant may choose any desired room nickname; contrast with Semi-Anonymous Room and Fully-Anonymous Room.
+Open Room -- a room that anyone may enter without being on the member list; antonym: Members-Only Room.
+Password-Protected Room -- a room that a user cannot enter without first providing the correct password; antonym: Unsecured Room.
+Persistent Room -- a room that is not destroyed if the last occupant exits; antonym: Temporary Room.
+Public Room -- a room that can be found by any user through normal means such as searching and service discovery; antonym: Hidden Room.
+Semi-Anonymous Room -- a room in which an occupant's full JID can be discovered by room admins only; contrast with Fully-Anonymous Room and Non-Anonymous Room.
+Temporary Room -- a room that is destroyed if the last occupant exits; antonym: Persistent Room.
+Unmoderated Room -- a room in which any occupant is allowed to send messages to all occupants; antonym: Moderated Room.
+Unsecured Room -- a room that anyone is allowed to enter without first providing the correct password; antonym: Password-Protected Room.
+Most of the examples in this document use the scenario of the witches' meeting held in a dark cave at the beginning of Act IV, Scene I of Shakespeare's Macbeth, represented here as the "darkcave@macbeth.shakespeare.lit" chatroom. The characters are as follows:
+Room Nickname | +Full JID | +Affiliation | +
---|---|---|
firstwitch | +crone1@shakespeare.lit/desktop | +Owner | +
secondwitch | +wiccarocks@shakespeare.lit/laptop | +Admin | +
thirdwitch | +hag66@shakespeare.lit/pda | +None | +
There are two dimensions along which we can measure a user's connection with or position in a room. One is the user's long-lived affiliation with a room -- e.g., a user's status as an owner or an outcast. The other is a user's role while an occupant of a room -- e.g., an occupant's position as a moderator with the ability to kick visitors and participants. These two dimensions are distinct from each other, since an affiliation lasts across visits, while a role lasts only for the duration of a visit. In addition, there is no one-to-one correspondence between roles and affiliations; for example, someone who is not affiliated with a room may be a (temporary) moderator, and a member may be a participant or a visitor in a moderated room. These concepts are explained more fully below.
+There are four defined roles that an occupant may have:
+Roles are temporary in that they do not necessarily persist across a user's visits to the room and MAY change during the course of an occupant's visit to the room. An implementation MAY persist roles across visits and SHOULD do so for moderated rooms (since the distinction between visitor and participant is critical to the functioning of a moderated room).
+There is no one-to-one mapping between roles and affiliations (e.g., a member could be a participant or a visitor).
+A moderator is the most powerful occupant within the context of the room, and can to some extent manage other occupants' roles in the room. A participant has fewer privileges than a moderator, although he or she always has the right to speak. A visitor is a more restricted role within the context of a moderated room, since visitors are not allowed to send messages to all occupants.
+Roles are granted, revoked, and maintained based on the occupant's room nickname or full JID rather than bare JID. The privileges associated with these roles, as well as the actions that trigger changes in roles, are defined below.
+Information about roles MUST be sent in all presence stanzas generated or reflected by the room and thus sent to occupants.
+For the most part, roles exist in a hierarchy. For instance, a participant can do anything a visitor can do, and a moderator can do anything a participant can do. Each role has privileges not possessed by the next-lowest role; these privileges are specified in the following table as defaults (an implementation MAY provide configuration options that override these defaults).
+Privilege | +None | +Visitor | +Participant | +Moderator | +
---|---|---|---|---|
Present in Room | +No | +Yes | +Yes | +Yes | +
Receive Messages | +No | +Yes | +Yes | +Yes | +
Change Availability Status | +No | +Yes | +Yes | +Yes | +
Change Room Nickname | +No | +Yes* | +Yes | +Yes | +
Send Private Messages | +No | +Yes* | +Yes | +Yes | +
Invite Other Users | +No | +Yes* | +Yes* | +Yes | +
Send Messages to All | +No | +No** | +Yes | +Yes | +
Modify Subject | +No | +No* | +Yes* | +Yes | +
Kick Participants and Visitors | +No | +No | +No | +Yes | +
Grant Voice | +No | +No | +No | +Yes | +
Revoke Voice | +No | +No | +No | +Yes*** | +
* Default; configuration settings MAY modify this privilege.
+** An implementation MAY grant voice by default to visitors in unmoderated rooms.
+*** A moderator MUST NOT be able to revoke voice privileges from an admin or owner.
+The ways in which an occupant's role changes are well-defined. Sometimes the change results from the occupant's own action (e.g., entering or exiting the room), whereas sometimes the change results from an action taken by a moderator, admin, or owner. If an occupant's role changes, a MUC service implementation MUST change the occupant's role to reflect the change and communicate the change to all occupants. Role changes and their triggering actions are specified in the following table.
+> | +None | +Visitor | +Participant | +Moderator | +
---|---|---|---|---|
None | +-- | +Enter moderated room | +Enter unmoderated room | +Admin or owner enters room | +
Visitor | +Exit room or be kicked by a moderator | +-- | +Moderator grants voice | +Admin or owner grants moderator privileges | +
Participant | +Exit room or be kicked by a moderator | +Moderator revokes voice | +-- | +Admin or owner grants moderator privileges | +
Moderator | +Exit room | +Admin or owner changes role to visitor * | +Admin or owner changes role to participant or revokes moderator privileges * | +-- | +
* A moderator MUST NOT be able to revoke moderator privileges from an occupant who is equal to or above the moderator in the hierarchy of affiliations.
+Note: Certain roles are typically implicit in certain privileges. For example, an admin or owner is automatically a moderator, so if an occupant is granted admin status then the occupant will by that fact be granted moderator privileges; similarly, when an occupant is made a member in a moderated room, the occupant automatically has a role of participant. However, the loss of admin status does not necessarily mean that the occupant is no longer a moderator (since a "mere" participant can be a moderator). Therefore, the roles that are gained when an occupant is granted a certain affiliation are stable, whereas the roles that are lost when an occupant loses a certain affilitation are no hardcoded and are left up to the implementation. Since a client cannot predict what the role will be after revoking a certain affiliation, if it wants to remove both admin/owner privileges and the moderator role at the same time then it must specifically request the role change in addition to the affiliation change.
+There are five defined affiliations that a user may have in relation to a room:
+These affiliations are long-lived in that they persist across a user's visits to the room and are not affected by happenings in the room. In addition, there is no one-to-one mapping between these affiliations and an occupant's role within the room. Affiliations are granted, revoked, and maintained based on the user's bare JID.
+If a user without a defined affiliation enters a room, the user's affiliation is defined as "none"; however, this affiliation does not persist across visits (i.e., a service does not maintain a "none list" across visits).
+The member affiliation provides a way for a room owner or admin to specify a "whitelist" of users who are allowed to enter a members-only room. When a member enters a members-only room, his or her affiliation does not change, no matter what his or her role is. The member affiliation also provides a way for users to effectively register with an open room and thus be lastingly associated with that room in some way (one result may be that the user's nickname is reserved in the room).
+An outcast is a user who has been banned from a room and who is not allowed to enter the room.
+Information about affiliations MUST be sent in all presence stanzas generated or reflected by the room and sent to occupants.
+For the most part, affiliations exist in a hierarchy. For instance, an owner can do anything an admin can do, and an admin can do anything a member can do. Each affiliation has privileges not possessed by the next-lowest affiliation; these privileges are specified in the following table.
+Privilege | +Outcast | +None | +Member | +Admin | +Owner | +
---|---|---|---|---|---|
Enter Open Room | +No | +Yes* | +Yes | +Yes | +Yes | +
Register with an Open Room | +No | +Yes | +N/A | +N/A | +N/A | +
Enter Members-Only Room | +No | +No | +Yes* | +Yes | +Yes | +
Ban Members and Unaffiliated Users | +No | +No | +No | +Yes | +Yes | +
Edit Member List | +No | +No | +No | +Yes | +Yes | +
Edit Moderator List | +No | +No | +No | +Yes** | +Yes** | +
Edit Admin List | +No | +No | +No | +No | +Yes | +
Edit Owner List | +No | +No | +No | +No | +Yes | +
Change Room Definition | +No | +No | +No | +No | +Yes | +
Destroy Room | +No | +No | +No | +No | +Yes | +
* As a default, an unaffiliated user enters a moderated room as a visitor, and enters an open room as a participant. A member enters a room as a participant. An admin or owner enters a room as a moderator.
+** An admin or owner MUST NOT be able to revoke moderation privileges from another admin or owner.
+The ways in which a user's affiliation changes are well-defined. Sometimes the change results from the user's own action (e.g., registering as a member of the room), whereas sometimes the change results from an action taken by an admin or owner. If a user's affiliation changes, a MUC service implementation MUST change the user's affiliation to reflect the change and communicate that to all occupants. Affiliation changes and their triggering actions are specified in the following table.
+> | +Outcast | +None | +Member | +Admin | +Owner | +
---|---|---|---|---|---|
Outcast | +-- | +Admin or owner removes ban | +Admin or owner adds user to member list | +Owner adds user to admin list | +Owner adds user to owner list | +
None | +Admin or owner applies ban | +-- | +Admin or owner adds user to member list, or user registers as member (if allowed) | +Owner adds user to admin list | +Owner adds user to owner list | +
Member | +Admin or owner applies ban | +Admin or owner changes affiliation to "none" | +-- | +Owner adds user to admin list | +Owner adds user to owner list | +
Admin | +Owner applies ban | +Owner changes affiliation to "none" | +Owner changes affiliation to "member" | +-- | +Owner adds user to owner list | +
Owner | +Owner applies ban | +Owner changes affiliation to "none" | +Owner changes affiliation to "member" | +Owner changes affiliation to "admin" | +-- | +
A MUC implementation MUST support &jep0030;.
+A Jabber entity may wish to discover if a service implements the Multi-User Chat protocol; in order to do so, it sends a service discovery information ("disco#info") query to the component's JID:
+The service MUST return its identity and the features it supports:
+Note: Because MUC is a superset of the old "groupchat 1.0" protocol, a MUC service SHOULD NOT return a <feature var='gc-1.0'/> entry in a disco#info result.
+The service discovery items ("disco#items") protocol enables a user to query a service for a list of associated items, which in the case of a chat service would consist of the specific chat rooms hosted by the service.
+The service SHOULD return a full list of the rooms it hosts.
+If the full list of rooms is large (see JEP-0030 for details), the service MAY return only a partial list of rooms.
+Using the disco#info protocol, a user may also query a specific chat room for more detailed information about the room. A user SHOULD do so before entering a room in order to determine the privacy and security profile of the room configuration (see the Security Considerations for details).
+The room MUST return its identity and SHOULD return the features it supports:
+Note: Because MUC is a superset of the old "groupchat 1.0" protocol, a MUC room SHOULD NOT return a <feature var='gc-1.0'/> entry in a disco#info result. The room SHOULD return the materially-relevant features it supports, such as password protection and room moderation (these are listed fully in the feature registry maintained by the Jabber Registrar; see also the Jabber Registrar section of this document).
+A chatroom MAY return more detailed information in its disco#info response using &jep0128;, identified by inclusion of a hidden FORM_TYPE field whose value is "http://jabber.org/protocol/muc#roominfo". Such information might include a more verbose description of the room, the current room subject, and the current number of occupants in the room:
+Some extended room information may be dynamically generated (e.g., the URL for discussion logs, which may be based on service-wide configuration) whereas other information may be based on the room configuration.
+Note: The foregoing extended service discovery fields for the 'http://jabber.org/protocol/muc#roominfo' FORM_TYPE may be supplemented in the future via the mechanisms described in the Field Standardization section of this document.
+A user MAY also query a specific chat room for its associated items:
+An implementation MAY return a list of existing occupants if that information is publicly available, or return no list at all if this information is kept private.
+Note: These <item/> elements are qualified by the disco#items namespace, not the muc namespace; this means that they cannot possess 'affiliation' or 'role' attributes, for example.
+If a non-occupant attempts to send a disco request to an address of the form &ROOMJID;, a MUC service SHOULD return the request to the entity and specify a &badrequest; error condition. If an occupant sends such a request, the service MAY pass it through the intended recipient; see the Implementation Guidelines section of this document for details.
+A Jabber user may want to discover if one of the user's contacts supports the Multi-User Chat protocol. This is done using Service Discovery.
+The client SHOULD return its identity and the features it supports:
+A user may also query a contact regarding which rooms the contact is in. This is done by querying the contact's full JID (<user@host/resource>) while specifying the well-known Service Discovery node 'http://jabber.org/protocol/muc#rooms':
+Optionally, the contact MAY include its roomnick as the value of the 'name' attribute:
+
+ ...
+ ]]>
+ The main actor in a multi-user chat environment is the occupant, who can be said to be located "in" a multi-user chat room and to participate in the discussions held in that room (for the purposes of this specification, participants and visitors are considered to be "mere" occupants, since they possess no administrative privileges). As will become clear, the protocol elements proposed in this document to fulfill the occupant use cases fall into three categories:
+existing "groupchat 1.0" protocol for minimal functionality
straightforward applications of the "groupchat 1.0" protocol, for example to handle some of the errors related to new room types
additional protocol elements to handle functionality not covered by "groupchat 1.0" (room invites, room passwords, extended presence related to room roles and affiliations); these are qualified by the 'http://jabber.org/protocol/muc#user' namespace
Note: All client-generated examples herein are presented from the perspective of the service, with the result that all stanzas received by a service contain a 'from' attribute corresponding to the sender's full JID as added by a normal Jabber router or session manager. In addition, normal IQ result stanzas sent upon successful completion of a request (as required by &rfc3920;) are not shown.
+In order to participate in the discussions held in a multi-user chat room, a Jabber user MUST first become an occupant by entering the room. In the old "groupchat 1.0" protocol, this was done by sending presence to &ROOMJID;, where "room" is the room ID, "service" is the hostname of the chat service, and "nick" is the user's desired nickname within the room:
+In this example, a user with a full JID of "hag66@shakespeare.lit/pda" has requested to enter the room "darkcave" on the "macbeth.shakespeare.lit" chat service with a room nickname of "thirdwitch".
+If the user does not specify a room nickname, the service SHOULD return a &badjid; error:
+Compliant multi-user chat services MUST accept the foregoing as a request to enter a room from any Jabber client that knows either the "groupchat 1.0" (GC) protocol or the multi-user chat (MUC) protocol; however, MUC clients SHOULD signal their ability to speak the MUC protocol by including in the initial presence stanza an empty <x/> element qualified by the 'http://jabber.org/protocol/muc' namespace (note the absence of the '#user' fragment):
+Before attempting to enter the room, a MUC-compliant client SHOULD first discover its reserved room nickname (if any) by following the protocol defined in the Discovering Reserved Room Nickname section of this document.
+If the service is able to add the user to the room, it MUST send presence from all the existing occupants' room JIDs to the new occupant's full JID, including extended presence information about roles in an <x/> element qualified by the 'http://jabber.org/protocol/muc#user' namespace and containing an <item/> child with the 'role' attribute set to a value of "moderator", "participant", or "visitor", and with the 'affiliation' attribute set to a value of "owner", "admin", "member", or "none" as appropriate:
+In this example, the user from the previous example has entered the room, by which time two other people had already entered the room: a user with a room nickname of "firstwitch" (who is a room owner) and a user with a room nickname of "secondwitch" (who is a room admin).
+The service MUST also send presence from the new occupant's room JID to the full JIDs of all the occupants (including the new occupant):
+In this example, initial room presence is being sent from the new occupant (thirdwitch) to all occupants, including the new occupant. As shown in the last stanza, the presence sent by the room to a user from itself as an occupant SHOULD include a status code of 110 so that the user knows this presence refers to itself as an occupant.
+The service MAY rewrite the new occupant's roomnick (e.g., if roomnicks are locked down). If the service does not accept the new occupant's requested roomnick but instead assigns a new roomnick, it MUST include a status code of "210" in the presence broadcast that it sends to the new occupant.
+Note: The order of the presence stanzas sent to the new occupant is important. The service MUST first send the complete list of the existing occupants to the new occupant and only then send the new occupant's own presence to the new occupant. This helps the client know when it has received the complete "room roster".
+After sending the presence broadcast (and only after doing so), the service may then send discussion history, live messages, presence updates, and other in-room traffic.
+The following table summarizes the initial default roles that a service should set based on the user's affiliation (there is no role associated with the "outcast" affiliation, since such users are not allowed to enter the room).
+Room Type | +None | +Member | +Admin | +Owner | +
---|---|---|---|---|
Moderated | +Visitor | +Participant | +Moderator | +Moderator | +
Unmoderated | +Participant | +Participant | +Moderator | +Moderator | +
Members-Only | +N/A * | +Participant | +Moderator | +Moderator | +
Open | +Participant | +Participant | +Moderator | +Moderator | +
* Entry is not permitted.
+If the room is non-anonymous, the service MUST send the new occupant's full JID to all occupants using extended presence information in an <x/> element qualified by the 'http://jabber.org/protocol/muc#user' namespace and containing an <item/> child with a 'jid' attribute specifying the occupant's full JID:
+If the user is entering a room that is non-anonymous (i.e., which informs all occupants of each occupant's full JID as shown above), the service SHOULD allow the user to enter the room but MUST also warn the user that the room is not anonymous. This SHOULD be done by including a status code of "100" in the initial presence that the room sends to the new occupant:
+However, it MAY done by sending a message of type "groupchat" to the new occupant containing an <x/> child with a <status/> element that has the 'code' attribute set to a value of "100":
+The inclusion of the status code assists clients in presenting their own notification messages (e.g., information appropriate to the user's locality).
+If the room is semi-anonymous, the service MUST send the new occupant's full JID in the format shown above only to those occupants with a role of "moderator".
+(Note: All subsequent examples include the 'jid' attribute for each <item/> element, even though this information is not sent to non-moderators in semi-anonymous rooms.)
+If the room requires a password and the user did not supply one (or the password provided is incorrect), the service MUST deny access to the room and inform the user that they are unauthorized; this is done by returning a presence stanza of type "error" specifying a ¬authorized; error:
+Passwords SHOULD be supplied with the presence stanza sent when entering the room, contained within an <x/> element qualified by the 'http://jabber.org/protocol/muc' namespace and containing a <password/> child. Passwords are to be sent as cleartext; no other authentication methods are supported at this time, and any such authentication or authorization methods shall be defined in a separate specification (see the Security Considerations section of this document).
+If the room is members-only but the user is not on the member list, the service MUST deny access to the room and inform the user that they are not allowed to enter the room; this is done by returning a presence stanza of type "error" specifying a ®istration; error condition:
+If the user has been banned from the room (i.e., has an affiliation of "outcast"), the service MUST deny access to the room and inform the user of the fact that he or she is banned; this is done by returning a presence stanza of type "error" specifying a &forbidden; error condition:
+If the room already contains another user with the nickname desired by the user seeking to enter the room (or if the nickname is reserved by another user on the member list), the service MUST deny access to the room and inform the user of the conflict; this is done by returning a presence stanza of type "error" specifying a &conflict; error condition:
+However, if the bare JID (&BAREJID;) of the present occupant matches the bare JID of the user seeking to enter the room, then the service SHOULD allow entry to the user, so that the user has two (or more) in-room "sessions" with the same roomnick, one for each resource. If a service allows more than one occupant with the same bare JID and the same room nickname, it SHOULD route in-room messages to all of the user's resources and allow all of the user's resources to send messages to the room; it is up to the implementation to determine how to appropriately handle presence from the user's resources and how to route private messages to all or only one resource (based on presence priority or some other algorithm).
+If the room has reached its maximum number of users, the service SHOULD deny access to the room and inform the user of the restriction; this is done by returning a presence stanza of type "error" specifying a &unavailable; error condition:
+Alternatively, the room could kick an "idle user" in order to free up space. Also, a room MUST always allow entry by a room admin or owner.
+If a user attempts to enter a room while it is "locked" (i.e., before the room creator provides an initial configuration and therefore before the room officially exists), the service MUST refuse entry and return an ¬found; error to the user:
+