No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0133.xml 113KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Service Administration</title>
  10. <abstract>This document defines recommended best practices for service-level administration of servers and components using Ad-Hoc Commands.</abstract>
  11. &LEGALNOTICE;
  12. <number>0133</number>
  13. <status>Active</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>RFC 6120</spec>
  18. <spec>XEP-0050</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>admin</shortname>
  23. &stpeter;
  24. <revision>
  25. <version>1.2</version>
  26. <date>2017-07-15</date>
  27. <initials>XEP Editor: ssw</initials>
  28. <remark>Fix broken node value in example.</remark>
  29. </revision>
  30. <revision>
  31. <version>1.1</version>
  32. <date>2005-08-19</date>
  33. <initials>psa</initials>
  34. <remark>Added use cases for getting list of idle users and of active users (where online = active + idle), getting number (rather than list) of registered/disabled/online/active/idle users, getting list of disabled users, getting user statistics.</remark>
  35. </revision>
  36. <revision>
  37. <version>1.0</version>
  38. <date>2004-12-09</date>
  39. <initials>psa</initials>
  40. <remark>Per a vote of the Jabber Council, advanced status to Active.</remark>
  41. </revision>
  42. <revision>
  43. <version>0.8</version>
  44. <date>2004-12-06</date>
  45. <initials>psa</initials>
  46. <remark>Addressed Council feedback: folded add blacklist use case into edit blacklist use case; folded add whitelist use case into edit whitelist use case; changed jid-single to jid-multi in many of the use cases; added accountjid field to change password use case; removed grant administrative privileges and revoke administrative privileges use cases (need edit admin list use case only); added max_items field to get active users and get registered users use case.</remark>
  47. </revision>
  48. <revision>
  49. <version>0.7</version>
  50. <date>2004-12-02</date>
  51. <initials>psa</initials>
  52. <remark>Added use case for editing message of the day.</remark>
  53. </revision>
  54. <revision>
  55. <version>0.6</version>
  56. <date>2004-11-19</date>
  57. <initials>psa</initials>
  58. <remark>Further clarified message of the day per list discussion.</remark>
  59. </revision>
  60. <revision>
  61. <version>0.5</version>
  62. <date>2004-11-17</date>
  63. <initials>psa</initials>
  64. <remark>Changed firstname to given_name.</remark>
  65. </revision>
  66. <revision>
  67. <version>0.4</version>
  68. <date>2004-11-02</date>
  69. <initials>psa</initials>
  70. <remark>Added note clarifying concept of message of the day.</remark>
  71. </revision>
  72. <revision>
  73. <version>0.3</version>
  74. <date>2004-09-30</date>
  75. <initials>psa</initials>
  76. <remark>Changed command naming requirement from MUST to SHOULD.</remark>
  77. </revision>
  78. <revision>
  79. <version>0.2</version>
  80. <date>2004-07-22</date>
  81. <initials>psa</initials>
  82. <remark>Added several more use cases; defined complete protocol flows; specified XMPP Registrar considerations.</remark>
  83. </revision>
  84. <revision>
  85. <version>0.1</version>
  86. <date>2004-04-25</date>
  87. <initials>psa</initials>
  88. <remark>Initial version.</remark>
  89. </revision>
  90. </header>
  91. <section1 topic='Introduction' anchor='intro'>
  92. <p>There exists a set of common service-level tasks that administrators often need to perform in relation to Jabber/XMPP servers and components. Examples include creating users, disabling accounts, and blacklisting domains for inbound or outbound communications. Because such tasks can be performed with respect to a server or with respect to many kinds of add-on components (e.g., a text conferencing component that conforms to &xep0045;), it makes sense to define a generic protocol for such interactions. This document describes such a protocol by specifying a profile of &xep0050; and associated &xep0004; fields, rather than by defining a specialized and distinct protocol.</p>
  93. </section1>
  94. <section1 topic='Requirements' anchor='reqs'>
  95. <p>This document addresses the following requirements:</p>
  96. <ul>
  97. <li>Enable users with appropriate privileges to perform common administrative tasks with respect to Jabber/XMPP servers and components.</li>
  98. <li>Re-use existing XMPP and Jabber protocols wherever possible.</li>
  99. </ul>
  100. </section1>
  101. <section1 topic='Discovery' anchor='disco'>
  102. <p>A server or component MUST advertise any administrative commands it supports via &xep0030; (as described in <cite>XEP-0050: Ad-Hoc Commands</cite>); such commands exist as well-defined discovery nodes associated with the service in question.</p>
  103. <p>In order to interact with a particular component attached to a server, an administrator needs to first discover that component and the commands it support, then send the appropriate command to the component itself. A server SHOULD NOT process commands on behalf of associated components, just as it does not handle service discovery requests on behalf of such components.</p>
  104. </section1>
  105. <section1 topic='Use Cases' anchor='usecases'>
  106. <p>This document defines a profile of <cite>XEP-0050: Ad-Hoc Commands</cite> that enables a service-level administrator to complete the following use cases:</p>
  107. <ol>
  108. <li>Add User</li>
  109. <li>Delete User</li>
  110. <li>Disable User</li>
  111. <li>Re-Enable User</li>
  112. <li>End User Session</li>
  113. <li>Get User Password</li>
  114. <li>Change User Password</li>
  115. <li>Get User Roster</li>
  116. <li>Get User Last Login Time</li>
  117. <li>Get User Statistics</li>
  118. <li>Edit Blacklist</li>
  119. <li>Edit Whitelist</li>
  120. <li>Get Number of Registered Users</li>
  121. <li>Get Number of Disabled Users</li>
  122. <li>Get Number of Online Users</li>
  123. <li>Get Number of Active Users</li>
  124. <li>Get Number of Idle Users</li>
  125. <li>Get List of Registered Users</li>
  126. <li>Get List of Disabled Users</li>
  127. <li>Get List of Online Users</li>
  128. <li>Get List of Active Users</li>
  129. <li>Get List of Idle Users</li>
  130. <li>Send Announcement to Active Users</li>
  131. <li>Set Message of the Day</li>
  132. <li>Edit Message of the Day</li>
  133. <li>Delete Message of the Day</li>
  134. <li>Set Welcome Message</li>
  135. <li>Delete Welcome Message</li>
  136. <li>Edit Admin List</li>
  137. <li>Restart Service</li>
  138. <li>Shut Down Service</li>
  139. </ol>
  140. <p>Naturally, not all of these use cases apply to all service types (e.g., adding a user may not apply to a multi-user chat service). An implementation or deployment MAY support any subset of the use cases defined herein. In addition, although this document aims to define common use cases, an implementation or deployment MAY support additional commands not defined herein, which may or may not be publicly registered.</p>
  141. <p><em>Note:</em> The text that follows assumes that implementors have read and understood <cite>XEP-0050: Ad-Hoc Commands</cite> and <cite>XEP-0004: Data Forms</cite>.</p>
  142. <section2 topic='Add User' anchor='add-user'>
  143. <p>A user is defined as any entity that has a persistent relationship with a service (most commonly through the creation a registered account with the service) and whose account is in some sense hosted by the service. Adding a user MUST result in the creation of an account, along with any implementation-specific data for such an account (e.g., database entries or a roster file). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#add-user".</p>
  144. <p>A sample protocol flow for this use case is shown below.</p>
  145. <example caption='Admin Requests to Add a User'><![CDATA[
  146. <iq from='bard@shakespeare.lit/globe'
  147. id='add-user-1'
  148. to='shakespeare.lit'
  149. type='set'
  150. xml:lang='en'>
  151. <command xmlns='http://jabber.org/protocol/commands'
  152. action='execute'
  153. node='http://jabber.org/protocol/admin#add-user'/>
  154. </iq>
  155. ]]></example>
  156. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  157. <example caption='Service Returns Add User Form to Admin'><![CDATA[
  158. <iq from='shakespeare.lit'
  159. id='add-user-1'
  160. to='bard@shakespeare.lit/globe'
  161. type='result'
  162. xml:lang='en'>
  163. <command xmlns='http://jabber.org/protocol/commands'
  164. node='http://jabber.org/protocol/admin#add-user'
  165. sessionid='add-user:20040408T0337Z'
  166. status='executing'>
  167. <x xmlns='jabber:x:data' type='form'>
  168. <title>Adding a User</title>
  169. <instructions>Fill out this form to add a user.</instructions>
  170. <field type='hidden' var='FORM_TYPE'>
  171. <value>http://jabber.org/protocol/admin</value>
  172. </field>
  173. <field label='The Jabber ID for the account to be added'
  174. type='jid-single'
  175. var='accountjid'>
  176. <required/>
  177. </field>
  178. <field label='The password for this account'
  179. type='text-private'
  180. var='password'/>
  181. <field label='Retype password'
  182. type='text-private'
  183. var='password-verify'/>
  184. <field label='Email address'
  185. type='text-single'
  186. var='email'/>
  187. <field label='Given name'
  188. type='text-single'
  189. var='given_name'/>
  190. <field label='Family name'
  191. type='text-single'
  192. var='surname'/>
  193. </x>
  194. </command>
  195. </iq>
  196. ]]></example>
  197. <example caption='Admin Submits Add User Form to Service'><![CDATA[
  198. <iq from='bard@shakespeare.lit/globe'
  199. id='add-user-2'
  200. to='shakespeare.lit'
  201. type='set'
  202. xml:lang='en'>
  203. <command xmlns='http://jabber.org/protocol/commands'
  204. node='http://jabber.org/protocol/admin#add-user'
  205. sessionid='add-user:20040408T0337Z'>
  206. <x xmlns='jabber:x:data' type='submit'>
  207. <field type='hidden' var='FORM_TYPE'>
  208. <value>http://jabber.org/protocol/admin</value>
  209. </field>
  210. <field var='accountjid'>
  211. <value>juliet@shakespeare.lit</value>
  212. </field>
  213. <field var='password'>
  214. <value>R0m30</value>
  215. </field>
  216. <field var='password-verify'>
  217. <value>R0m30</value>
  218. </field>
  219. <field var='email'>
  220. <value>juliet@capulet.com</value>
  221. </field>
  222. <field var='given_name'>
  223. <value>Juliet</value>
  224. </field>
  225. <field var='surname'>
  226. <value>Capulet</value>
  227. </field>
  228. </x>
  229. </command>
  230. </iq>
  231. ]]></example>
  232. <example caption='Service Informs Admin of Completion'><![CDATA[
  233. <iq from='shakespeare.lit'
  234. id='add-user-2'
  235. to='bard@shakespeare.lit/globe'
  236. type='result'
  237. xml:lang='en'>
  238. <command xmlns='http://jabber.org/protocol/commands'
  239. node='http://jabber.org/protocol/admin#add-user'
  240. sessionid='add-user:20040408T0337Z'
  241. status='completed'/>
  242. </iq>
  243. ]]></example>
  244. <p>Notification of completion MAY include the processed data in a data form of type "result".</p>
  245. </section2>
  246. <section2 topic='Delete User' anchor='delete-user'>
  247. <p>An administrator may need to permanently delete a user account. Deleting a user SHOULD result in the termination of any active sessions for the user and in the destruction of any implementation-specific data for the account (e.g., database entries or a roster file). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#delete-user".</p>
  248. <p>A sample protocol flow for this use case is shown below.</p>
  249. <example caption='Admin Requests to Delete a User'><![CDATA[
  250. <iq from='bard@shakespeare.lit/globe'
  251. id='delete-user-1'
  252. to='shakespeare.lit'
  253. type='set'
  254. xml:lang='en'>
  255. <command xmlns='http://jabber.org/protocol/commands'
  256. action='execute'
  257. node='http://jabber.org/protocol/admin#delete-user'/>
  258. </iq>
  259. ]]></example>
  260. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  261. <example caption='Service Returns Delete User Form to Admin'><![CDATA[
  262. <iq from='shakespeare.lit'
  263. id='delete-user-1'
  264. to='bard@shakespeare.lit/globe'
  265. type='result'
  266. xml:lang='en'>
  267. <command xmlns='http://jabber.org/protocol/commands'
  268. node='http://jabber.org/protocol/admin#delete-user'
  269. sessionid='delete-user:20040408T0337Z'
  270. status='executing'>
  271. <x xmlns='jabber:x:data' type='form'>
  272. <title>Deleting a User</title>
  273. <instructions>Fill out this form to delete a user.</instructions>
  274. <field type='hidden' var='FORM_TYPE'>
  275. <value>http://jabber.org/protocol/admin</value>
  276. </field>
  277. <field label='The Jabber ID(s) to delete'
  278. type='jid-multi'
  279. var='accountjids'>
  280. <required/>
  281. </field>
  282. </x>
  283. </command>
  284. </iq>
  285. ]]></example>
  286. <p>Note: If the entity is an end user, the JID SHOULD be of the form &lt;user@host&gt;, not &lt;user@host/resource&gt;.</p>
  287. <example caption='Admin Submits Delete User Form to Service'><![CDATA[
  288. <iq from='bard@shakespeare.lit/globe'
  289. id='delete-user-2'
  290. to='shakespeare.lit'
  291. type='set'
  292. xml:lang='en'>
  293. <command xmlns='http://jabber.org/protocol/commands'
  294. node='http://jabber.org/protocol/admin#delete-user'
  295. sessionid='delete-user:20040408T0337Z'>
  296. <x xmlns='jabber:x:data' type='submit'>
  297. <field type='hidden' var='FORM_TYPE'>
  298. <value>http://jabber.org/protocol/admin</value>
  299. </field>
  300. <field var='accountjids'>
  301. <value>juliet@shakespeare.lit</value>
  302. </field>
  303. </x>
  304. </command>
  305. </iq>
  306. ]]></example>
  307. <example caption='Service Informs Admin of Completion'><![CDATA[
  308. <iq from='shakespeare.lit'
  309. id='delete-user-2'
  310. to='bard@shakespeare.lit/globe'
  311. type='result'
  312. xml:lang='en'>
  313. <command xmlns='http://jabber.org/protocol/commands'
  314. node='http://jabber.org/protocol/admin#delete-user'
  315. sessionid='delete-user:20040408T0337Z'
  316. status='completed'/>
  317. </iq>
  318. ]]></example>
  319. </section2>
  320. <section2 topic='Disable User' anchor='disable-user'>
  321. <p>An administrator may need to temporarily disable a user account. Disabling a user MUST result in the termination of any active sessions for the user and in the prevention of further user logins until the account is re-enabled (this can be thought of as "banning" the user). However, it MUST NOT result in the destruction of any implementation-specific data for the account (e.g., database entries or a roster file). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#disable-user".</p>
  322. <p>A sample protocol flow for this use case is shown below.</p>
  323. <example caption='Admin Requests to Disable a User'><![CDATA[
  324. <iq from='bard@shakespeare.lit/globe'
  325. id='disable-user-1'
  326. to='shakespeare.lit'
  327. type='set'
  328. xml:lang='en'>
  329. <command xmlns='http://jabber.org/protocol/commands'
  330. action='execute'
  331. node='http://jabber.org/protocol/admin#disable-user'/>
  332. </iq>
  333. ]]></example>
  334. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  335. <example caption='Service Returns Disable User Form to Admin'><![CDATA[
  336. <iq from='shakespeare.lit'
  337. id='disable-user-1'
  338. to='bard@shakespeare.lit/globe'
  339. type='result'
  340. xml:lang='en'>
  341. <command xmlns='http://jabber.org/protocol/commands'
  342. node='http://jabber.org/protocol/admin#disable-user'
  343. sessionid='disable-user:20040408T0337Z'
  344. status='executing'>
  345. <x xmlns='jabber:x:data' type='form'>
  346. <title>Disabling a User</title>
  347. <instructions>Fill out this form to disable a user.</instructions>
  348. <field type='hidden' var='FORM_TYPE'>
  349. <value>http://jabber.org/protocol/admin</value>
  350. </field>
  351. <field label='The Jabber ID(s) to disable'
  352. type='jid-multi'
  353. var='accountjids'>
  354. <required/>
  355. </field>
  356. </x>
  357. </command>
  358. </iq>
  359. ]]></example>
  360. <p>Note: If the entity is an end user, the JID SHOULD be of the form &lt;user@host&gt;, not &lt;user@host/resource&gt;.</p>
  361. <example caption='Admin Submits Disable User Form to Service'><![CDATA[
  362. <iq from='bard@shakespeare.lit/globe'
  363. id='disable-user-2'
  364. to='shakespeare.lit'
  365. type='set'
  366. xml:lang='en'>
  367. <command xmlns='http://jabber.org/protocol/commands'
  368. node='http://jabber.org/protocol/admin#disable-user'
  369. sessionid='disable-user:20040408T0337Z'>
  370. <x xmlns='jabber:x:data' type='submit'>
  371. <field type='hidden' var='FORM_TYPE'>
  372. <value>http://jabber.org/protocol/admin</value>
  373. </field>
  374. <field var='accountjids'>
  375. <value>juliet@shakespeare.lit</value>
  376. </field>
  377. </x>
  378. </command>
  379. </iq>
  380. ]]></example>
  381. <example caption='Service Informs Admin of Completion'><![CDATA[
  382. <iq from='shakespeare.lit'
  383. id='disable-user-2'
  384. to='bard@shakespeare.lit/globe'
  385. type='result'
  386. xml:lang='en'>
  387. <command xmlns='http://jabber.org/protocol/commands'
  388. node='http://jabber.org/protocol/admin#disable-user'
  389. sessionid='disable-user:20040408T0337Z'
  390. status='completed'/>
  391. </iq>
  392. ]]></example>
  393. </section2>
  394. <section2 topic='Re-Enable User' anchor='reenable-user'>
  395. <p>An administrator may need to re-enable a user account that had been temporarily disabled. Re-enabling a user MUST result in granting the user the ability to access the service again. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#reenable-user".</p>
  396. <p>A sample protocol flow for this use case is shown below.</p>
  397. <example caption='Admin Requests to Re-Enable a User'><![CDATA[
  398. <iq from='bard@shakespeare.lit/globe'
  399. id='reenable-user-1'
  400. to='shakespeare.lit'
  401. type='set'
  402. xml:lang='en'>
  403. <command xmlns='http://jabber.org/protocol/commands'
  404. action='execute'
  405. node='http://jabber.org/protocol/admin#reenable-user'/>
  406. </iq>
  407. ]]></example>
  408. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  409. <example caption='Service Returns Re-Enable User Form to Admin'><![CDATA[
  410. <iq from='shakespeare.lit'
  411. id='reenable-user-1'
  412. to='bard@shakespeare.lit/globe'
  413. type='result'
  414. xml:lang='en'>
  415. <command xmlns='http://jabber.org/protocol/commands'
  416. node='http://jabber.org/protocol/admin#reenable-user'
  417. sessionid='reenable-user:20040408T0337Z'
  418. status='executing'>
  419. <x xmlns='jabber:x:data' type='form'>
  420. <title>Re-Enable a User</title>
  421. <instructions>Fill out this form to re-enable a user.</instructions>
  422. <field type='hidden' var='FORM_TYPE'>
  423. <value>http://jabber.org/protocol/admin</value>
  424. </field>
  425. <field label='The Jabber ID(s) to re-enable'
  426. type='jid-multi'
  427. var='accountjids'>
  428. <required/>
  429. </field>
  430. </x>
  431. </command>
  432. </iq>
  433. ]]></example>
  434. <p>Note: If the entity is an end user, the JID SHOULD be of the form &lt;user@host&gt;, not &lt;user@host/resource&gt;.</p>
  435. <example caption='Admin Submits Re-Enable User Form to Service'><![CDATA[
  436. <iq from='bard@shakespeare.lit/globe'
  437. id='reenable-user-2'
  438. to='shakespeare.lit'
  439. type='set'
  440. xml:lang='en'>
  441. <command xmlns='http://jabber.org/protocol/commands'
  442. node='http://jabber.org/protocol/admin#reenable-user'
  443. sessionid='reenable-user:20040408T0337Z'>
  444. <x xmlns='jabber:x:data' type='submit'>
  445. <field type='hidden' var='FORM_TYPE'>
  446. <value>http://jabber.org/protocol/admin</value>
  447. </field>
  448. <field var='accountjids'>
  449. <value>juliet@shakespeare.lit</value>
  450. </field>
  451. </x>
  452. </command>
  453. </iq>
  454. ]]></example>
  455. <example caption='Service Informs Admin of Completion'><![CDATA[
  456. <iq from='shakespeare.lit'
  457. id='reenable-user-2'
  458. to='bard@shakespeare.lit/globe'
  459. type='result'
  460. xml:lang='en'>
  461. <command xmlns='http://jabber.org/protocol/commands'
  462. node='http://jabber.org/protocol/admin#reenable-user'
  463. sessionid='reenable-user:20040408T0337Z'
  464. status='completed'/>
  465. </iq>
  466. ]]></example>
  467. </section2>
  468. <section2 topic='End User Session' anchor='end-user-session'>
  469. <p>An administrator may need to terminate one or all of the user's current sessions, but allow future logins (this can be thought of as "kicking" rather than "banning" the user). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#end-user-session".</p>
  470. <p>A sample protocol flow for this use case is shown below.</p>
  471. <example caption='Admin Requests to End a User&apos;s Session'><![CDATA[
  472. <iq from='bard@shakespeare.lit/globe'
  473. id='end-user-session-1'
  474. to='shakespeare.lit'
  475. type='set'
  476. xml:lang='en'>
  477. <command xmlns='http://jabber.org/protocol/commands'
  478. action='execute'
  479. node='http://jabber.org/protocol/admin#end-user-session'/>
  480. </iq>
  481. ]]></example>
  482. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  483. <example caption='Service Returns End User Session Form to Admin'><![CDATA[
  484. <iq from='shakespeare.lit'
  485. id='end-user-session-1'
  486. to='bard@shakespeare.lit/globe'
  487. type='result'
  488. xml:lang='en'>
  489. <command xmlns='http://jabber.org/protocol/commands'
  490. node='http://jabber.org/protocol/admin#end-user-session'
  491. sessionid='end-user-session:20040408T0337Z'
  492. status='executing'>
  493. <x xmlns='jabber:x:data' type='form'>
  494. <title>Ending a User Session</title>
  495. <instructions>Fill out this form to end a user&apos;s session.</instructions>
  496. <field type='hidden' var='FORM_TYPE'>
  497. <value>http://jabber.org/protocol/admin</value>
  498. </field>
  499. <field label='The Jabber ID(s) for which to end sessions'
  500. type='jid-multi'
  501. var='accountjids'>
  502. <required/>
  503. </field>
  504. </x>
  505. </command>
  506. </iq>
  507. ]]></example>
  508. <p>Note: If the JID is of the form &lt;user@host&gt;, the service MUST end all of the user's sessions; if the JID is of the form &lt;user@host/resource&gt;, the service MUST end only the session associated with that resource.</p>
  509. <example caption='Admin Submits End User Session Form to Service'><![CDATA[
  510. <iq from='bard@shakespeare.lit/globe'
  511. id='end-user-session-2'
  512. to='shakespeare.lit'
  513. type='set'
  514. xml:lang='en'>
  515. <command xmlns='http://jabber.org/protocol/commands'
  516. node='http://jabber.org/protocol/admin#end-user-session'
  517. sessionid='end-user-session:20040408T0337Z'>
  518. <x xmlns='jabber:x:data' type='submit'>
  519. <field type='hidden' var='FORM_TYPE'>
  520. <value>http://jabber.org/protocol/admin</value>
  521. </field>
  522. <field var='accountjids'>
  523. <value>juliet@shakespeare.lit</value>
  524. </field>
  525. </x>
  526. </command>
  527. </iq>
  528. ]]></example>
  529. <example caption='Service Informs Admin of Completion'><![CDATA[
  530. <iq from='shakespeare.lit'
  531. id='end-user-session-2'
  532. to='bard@shakespeare.lit/globe'
  533. type='result'
  534. xml:lang='en'>
  535. <command xmlns='http://jabber.org/protocol/commands'
  536. node='http://jabber.org/protocol/admin#end-user-session'
  537. sessionid='end-user-session:20040408T0337Z'
  538. status='completed'/>
  539. </iq>
  540. ]]></example>
  541. </section2>
  542. <section2 topic='Get User Password' anchor='get-user-password'>
  543. <p>An administrator may need to retrieve a user's password. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-user-password".</p>
  544. <p>A sample protocol flow for this use case is shown below.</p>
  545. <example caption='Admin Requests to Get a User&apos;s Password'><![CDATA[
  546. <iq from='bard@shakespeare.lit/globe'
  547. id='get-user-password-1'
  548. to='shakespeare.lit'
  549. type='set'
  550. xml:lang='en'>
  551. <command xmlns='http://jabber.org/protocol/commands'
  552. action='execute'
  553. node='http://jabber.org/protocol/admin#get-user-password'/>
  554. </iq>
  555. ]]></example>
  556. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  557. <example caption='Service Returns Get User Password Form to Admin'><![CDATA[
  558. <iq from='shakespeare.lit'
  559. id='get-user-password-1'
  560. to='bard@shakespeare.lit/globe'
  561. type='result'
  562. xml:lang='en'>
  563. <command xmlns='http://jabber.org/protocol/commands'
  564. node='http://jabber.org/protocol/admin#get-user-password'
  565. sessionid='get-user-password:20040408T0337Z'
  566. status='executing'>
  567. <x xmlns='jabber:x:data' type='form'>
  568. <title>Getting a User's Password</title>
  569. <instructions>Fill out this form to get a user&apos;s password.</instructions>
  570. <field type='hidden' var='FORM_TYPE'>
  571. <value>http://jabber.org/protocol/admin</value>
  572. </field>
  573. <field label='The Jabber ID for which to retrieve the password'
  574. type='jid-single'
  575. var='accountjid'>
  576. <required/>
  577. </field>
  578. </x>
  579. </command>
  580. </iq>
  581. ]]></example>
  582. <p>Note: If the entity is an end user, the JID SHOULD be of the form &lt;user@host&gt;, not &lt;user@host/resource&gt;.</p>
  583. <example caption='Admin Submits Get User Password Form to Service'><![CDATA[
  584. <iq from='bard@shakespeare.lit/globe'
  585. id='get-user-password-2'
  586. to='shakespeare.lit'
  587. type='set'
  588. xml:lang='en'>
  589. <command xmlns='http://jabber.org/protocol/commands'
  590. node='http://jabber.org/protocol/admin#get-user-password'
  591. sessionid='get-user-password:20040408T0337Z'>
  592. <x xmlns='jabber:x:data' type='submit'>
  593. <field type='hidden' var='FORM_TYPE'>
  594. <value>http://jabber.org/protocol/admin</value>
  595. </field>
  596. <field var='accountjid'>
  597. <value>juliet@shakespeare.lit</value>
  598. </field>
  599. </x>
  600. </command>
  601. </iq>
  602. ]]></example>
  603. <p>Naturally, the data form included in the IQ result will include the user's password.</p>
  604. <example caption='Service Informs Admin of Completion'><![CDATA[
  605. <iq from='shakespeare.lit'
  606. id='get-user-password-2'
  607. to='bard@shakespeare.lit/globe'
  608. type='result'
  609. xml:lang='en'>
  610. <command xmlns='http://jabber.org/protocol/commands'
  611. node='http://jabber.org/protocol/admin#get-user-password'
  612. sessionid='get-user-password:20040408T0337Z'
  613. status='completed'>
  614. <x xmlns='jabber:x:data' type='result'>
  615. <field type='hidden' var='FORM_TYPE'>
  616. <value>http://jabber.org/protocol/admin</value>
  617. </field>
  618. <field var='accountjid'>
  619. <value>juliet@shakespeare.lit</value>
  620. </field>
  621. <field var='password'>
  622. <value>R0m30</value>
  623. </field>
  624. </x>
  625. </command>
  626. </iq>
  627. ]]></example>
  628. </section2>
  629. <section2 topic='Change User Password' anchor='change-user-password'>
  630. <p>An administrator may need to change a user's password. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#change-user-password".</p>
  631. <p>A sample protocol flow for this use case is shown below.</p>
  632. <example caption='Admin Requests to Change a User&apos;s Password'><![CDATA[
  633. <iq from='bard@shakespeare.lit/globe'
  634. id='change-user-password-1'
  635. to='shakespeare.lit'
  636. type='set'
  637. xml:lang='en'>
  638. <command xmlns='http://jabber.org/protocol/commands'
  639. action='execute'
  640. node='http://jabber.org/protocol/admin#change-user-password'/>
  641. </iq>
  642. ]]></example>
  643. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  644. <example caption='Service Returns Change User Password Form to Admin'><![CDATA[
  645. <iq from='shakespeare.lit'
  646. id='change-user-password-1'
  647. to='bard@shakespeare.lit/globe'
  648. type='result'
  649. xml:lang='en'>
  650. <command xmlns='http://jabber.org/protocol/commands'
  651. node='http://jabber.org/protocol/admin#change-user-password'
  652. sessionid='change-user-password:20040408T0337Z'
  653. status='executing'>
  654. <x xmlns='jabber:x:data' type='form'>
  655. <title>Changing a User Password</title>
  656. <instructions>Fill out this form to change a user&apos;s password.</instructions>
  657. <field type='hidden' var='FORM_TYPE'>
  658. <value>http://jabber.org/protocol/admin</value>
  659. </field>
  660. <field label='The Jabber ID for this account'
  661. type='jid-single'
  662. var='accountjid'>
  663. <required/>
  664. </field>
  665. <field label='The password for this account'
  666. type='text-private'
  667. var='password'>
  668. <required/>
  669. </field>
  670. </x>
  671. </command>
  672. </iq>
  673. ]]></example>
  674. <p>Note: If the entity is an end user, the JID SHOULD be of the form &lt;user@host&gt;, not &lt;user@host/resource&gt;.</p>
  675. <example caption='Admin Submits Change User Password Form to Service'><![CDATA[
  676. <iq from='bard@shakespeare.lit/globe'
  677. id='change-user-password-2'
  678. to='shakespeare.lit'
  679. type='set'
  680. xml:lang='en'>
  681. <command xmlns='http://jabber.org/protocol/commands'
  682. node='http://jabber.org/protocol/admin#change-user-password'
  683. sessionid='change-user-password:20040408T0337Z'>
  684. <x xmlns='jabber:x:data' type='submit'>
  685. <field type='hidden' var='FORM_TYPE'>
  686. <value>http://jabber.org/protocol/admin</value>
  687. </field>
  688. <field var='accountjid'>
  689. <value>juliet@shakespeare.lit</value>
  690. </field>
  691. <field var='password'>
  692. <value>V3r0n4</value>
  693. </field>
  694. </x>
  695. </command>
  696. </iq>
  697. ]]></example>
  698. <example caption='Service Informs Admin of Completion'><![CDATA[
  699. <iq from='shakespeare.lit'
  700. id='change-user-password-2'
  701. to='bard@shakespeare.lit/globe'
  702. type='result'
  703. xml:lang='en'>
  704. <command xmlns='http://jabber.org/protocol/commands'
  705. node='http://jabber.org/protocol/admin#change-user-password'
  706. sessionid='change-user-password:20040408T0337Z'
  707. status='completed'/>
  708. </iq>
  709. ]]></example>
  710. </section2>
  711. <section2 topic='Get User Roster' anchor='get-user-roster'>
  712. <p>An administrator may need to retrieve a user's roster (e.g., to help verify the user's ownership of the account before reminding the user of the password). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-user-roster".</p>
  713. <p>A sample protocol flow for this use case is shown below.</p>
  714. <example caption='Admin Requests to Get a User&apos;s Roster'><![CDATA[
  715. <iq from='bard@shakespeare.lit/globe'
  716. id='get-user-roster-1'
  717. to='shakespeare.lit'
  718. type='set'
  719. xml:lang='en'>
  720. <command xmlns='http://jabber.org/protocol/commands'
  721. action='execute'
  722. node='http://jabber.org/protocol/admin#get-user-roster'/>
  723. </iq>
  724. ]]></example>
  725. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  726. <example caption='Service Returns Get User Roster Form to Admin'><![CDATA[
  727. <iq from='shakespeare.lit'
  728. id='get-user-roster-1'
  729. to='bard@shakespeare.lit/globe'
  730. type='result'
  731. xml:lang='en'>
  732. <command xmlns='http://jabber.org/protocol/commands'
  733. node='http://jabber.org/protocol/admin#get-user-roster'
  734. sessionid='get-user-roster:20040408T0337Z'
  735. status='executing'>
  736. <x xmlns='jabber:x:data' type='form'>
  737. <title>Getting a User's Roster</title>
  738. <instructions>Fill out this form to get a user&apos;s roster.</instructions>
  739. <field type='hidden' var='FORM_TYPE'>
  740. <value>http://jabber.org/protocol/admin</value>
  741. </field>
  742. <field label='The Jabber ID(s) for which to retrieve the roster'
  743. type='jid-multi'
  744. var='accountjids'>
  745. <required/>
  746. </field>
  747. </x>
  748. </command>
  749. </iq>
  750. ]]></example>
  751. <p>Note: If the entity is an end user, the JID SHOULD be of the form &lt;user@host&gt;, not &lt;user@host/resource&gt;.</p>
  752. <example caption='Admin Submits Get User Roster Form to Service'><![CDATA[
  753. <iq from='bard@shakespeare.lit/globe'
  754. id='get-user-roster-2'
  755. to='shakespeare.lit'
  756. type='set'
  757. xml:lang='en'>
  758. <command xmlns='http://jabber.org/protocol/commands'
  759. node='http://jabber.org/protocol/admin#get-user-roster'
  760. sessionid='get-user-roster:20040408T0337Z'>
  761. <x xmlns='jabber:x:data' type='submit'>
  762. <field type='hidden' var='FORM_TYPE'>
  763. <value>http://jabber.org/protocol/admin</value>
  764. </field>
  765. <field var='accountjids'>
  766. <value>juliet@shakespeare.lit</value>
  767. </field>
  768. </x>
  769. </command>
  770. </iq>
  771. ]]></example>
  772. <p>The data form included in the IQ result will include the user's roster, formatted according to the 'jabber:iq:roster' protocol defined in &xmppim;.</p>
  773. <example caption='Service Informs Admin of Completion'><![CDATA[
  774. <iq from='shakespeare.lit'
  775. id='get-user-roster-2'
  776. to='bard@shakespeare.lit/globe'
  777. type='result'
  778. xml:lang='en'>
  779. <command xmlns='http://jabber.org/protocol/commands'
  780. node='http://jabber.org/protocol/admin#get-user-roster'
  781. sessionid='get-user-roster:20040408T0337Z'
  782. status='completed'>
  783. <x xmlns='jabber:x:data' type='result'>
  784. <field type='hidden' var='FORM_TYPE'>
  785. <value>http://jabber.org/protocol/admin</value>
  786. </field>
  787. <field var='accountjids'>
  788. <value>juliet@shakespeare.lit</value>
  789. </field>
  790. <query xmlns='jabber:iq:roster'>
  791. <item jid='romeo@example.net'
  792. name='Romeo'
  793. subscription='both'>
  794. <group>Friends</group>
  795. <group>Lovers</group>
  796. </item>
  797. <item jid='mercutio@example.org'
  798. name='Mercutio'
  799. subscription='from'>
  800. <group>Friends</group>
  801. </item>
  802. <item jid='benvolio@example.org'
  803. name='Benvolio'
  804. subscription='both'>
  805. <group>Friends</group>
  806. </item>
  807. </query>
  808. </x>
  809. </command>
  810. </iq>
  811. ]]></example>
  812. </section2>
  813. <section2 topic='Get User Last Login Time' anchor='get-user-lastlogin'>
  814. <p>An administrator may need to retrieve a user's last login time (e.g., to help verify the user's ownership of the account before reminding the user of the password). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-user-lastlogin".</p>
  815. <p>A sample protocol flow for this use case is shown below.</p>
  816. <example caption='Admin Requests to Get a User&apos;s Roster'><![CDATA[
  817. <iq from='bard@shakespeare.lit/globe'
  818. id='get-user-lastlogin-1'
  819. to='shakespeare.lit'
  820. type='set'
  821. xml:lang='en'>
  822. <command xmlns='http://jabber.org/protocol/commands'
  823. action='execute'
  824. node='http://jabber.org/protocol/admin#get-user-lastlogin'/>
  825. </iq>
  826. ]]></example>
  827. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  828. <example caption='Service Returns Get User Last Login Form to Admin'><![CDATA[
  829. <iq from='shakespeare.lit'
  830. id='get-user-lastlogin-1'
  831. to='bard@shakespeare.lit/globe'
  832. type='result'
  833. xml:lang='en'>
  834. <command xmlns='http://jabber.org/protocol/commands'
  835. node='http://jabber.org/protocol/admin#get-user-lastlogin'
  836. sessionid='get-user-lastlogin:20040408T0337Z'
  837. status='executing'>
  838. <x xmlns='jabber:x:data' type='form'>
  839. <title>Getting a User's Last Login Time</title>
  840. <instructions>Fill out this form to get a user&apos;s last login time.</instructions>
  841. <field type='hidden' var='FORM_TYPE'>
  842. <value>http://jabber.org/protocol/admin</value>
  843. </field>
  844. <field label='The Jabber ID(s) for which to retrieve the last login time'
  845. type='jid-multi'
  846. var='accountjids'>
  847. <required/>
  848. </field>
  849. </x>
  850. </command>
  851. </iq>
  852. ]]></example>
  853. <p>Note: If the entity is an end user, the JID SHOULD be of the form &lt;user@host&gt;, not &lt;user@host/resource&gt;.</p>
  854. <example caption='Admin Submits Get User Last Login Form to Service'><![CDATA[
  855. <iq from='bard@shakespeare.lit/globe'
  856. id='get-user-lastlogin-2'
  857. to='shakespeare.lit'
  858. type='set'
  859. xml:lang='en'>
  860. <command xmlns='http://jabber.org/protocol/commands'
  861. node='http://jabber.org/protocol/admin#get-user-lastlogin'
  862. sessionid='get-user-lastlogin:20040408T0337Z'>
  863. <x xmlns='jabber:x:data' type='submit'>
  864. <field type='hidden' var='FORM_TYPE'>
  865. <value>http://jabber.org/protocol/admin</value>
  866. </field>
  867. <field var='accountjids'>
  868. <value>juliet@shakespeare.lit</value>
  869. </field>
  870. </x>
  871. </command>
  872. </iq>
  873. ]]></example>
  874. <p>The data form included in the IQ result will include the user's last login time (which SHOULD conform to the DateTime profile specified in &xep0082;).</p>
  875. <example caption='Service Informs Admin of Completion'><![CDATA[
  876. <iq from='shakespeare.lit'
  877. id='get-user-lastlogin-2'
  878. to='bard@shakespeare.lit/globe'
  879. type='result'
  880. xml:lang='en'>
  881. <command xmlns='http://jabber.org/protocol/commands'
  882. node='http://jabber.org/protocol/admin#get-user-lastlogin'
  883. sessionid='get-user-lastlogin:20040408T0337Z'
  884. status='completed'>
  885. <x xmlns='jabber:x:data' type='result'>
  886. <field type='hidden' var='FORM_TYPE'>
  887. <value>http://jabber.org/protocol/admin</value>
  888. </field>
  889. <field var='accountjids'>
  890. <value>juliet@shakespeare.lit</value>
  891. </field>
  892. <field var='lastlogin'>
  893. <value>2003-12-19T17:58:35Z</value>
  894. </field>
  895. </x>
  896. </command>
  897. </iq>
  898. ]]></example>
  899. </section2>
  900. <section2 topic='Get User Statistics' anchor='get-user-stats'>
  901. <p>An administrator may want to gather statistics about a particular user's interaction with the service (roster size, bandwidth usage, logins, IP address, etc.). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#user-stats".</p>
  902. <p>A sample protocol flow for this use case is shown below.</p>
  903. <example caption='Admin Requests User Statistics'><![CDATA[
  904. <iq from='bard@shakespeare.lit/globe'
  905. id='user-stats-1'
  906. to='shakespeare.lit'
  907. type='set'
  908. xml:lang='en'>
  909. <command xmlns='http://jabber.org/protocol/commands'
  910. action='execute'
  911. node='http://jabber.org/protocol/admin#user-stats'/>
  912. </iq>
  913. ]]></example>
  914. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  915. <example caption='Service Returns User Statistics Form to Admin'><![CDATA[
  916. <iq from='shakespeare.lit'
  917. id='user-stats-1'
  918. to='bard@shakespeare.lit/globe'
  919. type='result'
  920. xml:lang='en'>
  921. <command xmlns='http://jabber.org/protocol/commands'
  922. node='http://jabber.org/protocol/admin#user-stats'
  923. sessionid='user-stats:20040408T0337Z'
  924. status='executing'>
  925. <x xmlns='jabber:x:data' type='form'>
  926. <title>Get User Statistics</title>
  927. <instructions>Fill out this form to gather user statistics.</instructions>
  928. <field type='hidden' var='FORM_TYPE'>
  929. <value>http://jabber.org/protocol/admin</value>
  930. </field>
  931. <field label='The Jabber ID for statistics'
  932. type='jid-single'
  933. var='accountjid'>
  934. <required/>
  935. </field>
  936. </x>
  937. </command>
  938. </iq>
  939. ]]></example>
  940. <example caption='Admin Submits User Statistics Form to Service'><![CDATA[
  941. <iq from='bard@shakespeare.lit/globe'
  942. id='user-stats-2'
  943. to='shakespeare.lit'
  944. type='set'
  945. xml:lang='en'>
  946. <command xmlns='http://jabber.org/protocol/commands'
  947. node='http://jabber.org/protocol/admin#user-stats'
  948. sessionid='user-stats:20040408T0337Z'>
  949. <x xmlns='jabber:x:data' type='submit'>
  950. <field type='hidden' var='FORM_TYPE'>
  951. <value>http://jabber.org/protocol/admin</value>
  952. </field>
  953. <field var='accountjid'>
  954. <value>iago@shakespeare.lit</value>
  955. </field>
  956. </x>
  957. </command>
  958. </iq>
  959. ]]></example>
  960. <example caption='Service Informs Admin of Completion'><![CDATA[
  961. <iq from='shakespeare.lit'
  962. id='user-stats-2'
  963. to='bard@shakespeare.lit/globe'
  964. type='result'
  965. xml:lang='en'>
  966. <command xmlns='http://jabber.org/protocol/commands'
  967. node='http://jabber.org/protocol/admin#user-stats'
  968. sessionid='user-stats:20040408T0337Z'
  969. status='completed'>
  970. <x xmlns='jabber:x:data' type='result'>
  971. <field type='hidden' var='FORM_TYPE'>
  972. <value>http://jabber.org/protocol/admin</value>
  973. </field>
  974. <field var='ipaddresses'>
  975. <value>127.0.0.1</value>
  976. </field>
  977. <field var='rostersize'>
  978. <value>123</value>
  979. </field>
  980. <field var='onlineresources'>
  981. <value>work</value>
  982. <value>home</value>
  983. </field>
  984. <field var='stanzaspersecond'>
  985. <value>3</value>
  986. </field>
  987. <field var='loginsperminute'>
  988. <value>0.1</value>
  989. </field>
  990. </x>
  991. </command>
  992. </iq>
  993. ]]></example>
  994. </section2>
  995. <section2 topic='Edit Blacklist' anchor='edit-blacklist'>
  996. <p>The service may enable an administrator to define one or more service-wide blacklists (lists of entities that are blocked from communications to or from the service). For example, a multi-user chat service may forbid a certain user from joining any room on the service, or may block entire domains from accessing the service. An entity specified on the blacklist MAY be a JID of any form as specified in &rfc6120;; the order of JID matching SHOULD be that specified for privacy lists in &xep0016;.</p>
  997. <p>A blacklist may prevent inbound communications, outbound communications, or both; whether to offer only bidirectional blocking or a more granular choice of inbound or outbound blocking is a matter of implementation or deployment policy. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#edit-blacklist" if blocking is bidirectional as shown below; "http://jabber.org/protocol/admin#add-to-blacklist-in" for inbound blocking only; and "http://jabber.org/protocol/admin#add-to-blacklist-out" for outbound blocking only.</p>
  998. <p>A sample protocol flow for this use case is shown below.</p>
  999. <example caption='Admin Requests Editing of Blacklist'><![CDATA[
  1000. <iq from='bard@shakespeare.lit/globe'
  1001. id='edit-blacklist-1'
  1002. to='shakespeare.lit'
  1003. type='set'
  1004. xml:lang='en'>
  1005. <command xmlns='http://jabber.org/protocol/commands'
  1006. action='execute'
  1007. node='http://jabber.org/protocol/admin#edit-blacklist'/>
  1008. </iq>
  1009. ]]></example>
  1010. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  1011. <example caption='Service Returns Edit Blacklist Form to Admin'><![CDATA[
  1012. <iq from='shakespeare.lit'
  1013. id='edit-blacklist-1'
  1014. to='bard@shakespeare.lit/globe'
  1015. type='result'
  1016. xml:lang='en'>
  1017. <command xmlns='http://jabber.org/protocol/commands'
  1018. node='http://jabber.org/protocol/admin#edit-blacklist'
  1019. sessionid='edit-blacklist:20040408T0337Z'
  1020. status='executing'>
  1021. <x xmlns='jabber:x:data' type='form'>
  1022. <title>Editing the Blacklist</title>
  1023. <instructions>
  1024. Fill out this form to edit the list of entities with whom
  1025. communications are disallowed.
  1026. </instructions>
  1027. <field type='hidden' var='FORM_TYPE'>
  1028. <value>http://jabber.org/protocol/admin</value>
  1029. </field>
  1030. <field label='The blacklist'
  1031. var='blacklistjids'>
  1032. <value>marlowe.lit</value>
  1033. </field>
  1034. </x>
  1035. </command>
  1036. </iq>
  1037. ]]></example>
  1038. <example caption='Admin Submits Edit Blacklist Form to Service'><![CDATA[
  1039. <iq from='bard@shakespeare.lit/globe'
  1040. id='edit-blacklist-2'
  1041. to='shakespeare.lit'
  1042. type='set'
  1043. xml:lang='en'>
  1044. <command xmlns='http://jabber.org/protocol/commands'
  1045. node='http://jabber.org/protocol/admin#edit-blacklist'
  1046. sessionid='edit-blacklist:20040408T0337Z'>
  1047. <x xmlns='jabber:x:data' type='submit'>
  1048. <field type='hidden' var='FORM_TYPE'>
  1049. <value>http://jabber.org/protocol/admin</value>
  1050. </field>
  1051. <field var='blacklistjids'>
  1052. <value>denmark.lit</value>
  1053. <value>france.lit</value>
  1054. <value>marlowe.lit</value>
  1055. </field>
  1056. </x>
  1057. </command>
  1058. </iq>
  1059. ]]></example>
  1060. <example caption='Service Informs Admin of Completion'><![CDATA[
  1061. <iq from='shakespeare.lit'
  1062. id='edit-blacklist-2'
  1063. to='bard@shakespeare.lit/globe'
  1064. type='result'
  1065. xml:lang='en'>
  1066. <command xmlns='http://jabber.org/protocol/commands'
  1067. node='http://jabber.org/protocol/admin#edit-blacklist'
  1068. sessionid='edit-blacklist:20040408T0337Z'
  1069. status='completed'/>
  1070. </iq>
  1071. ]]></example>
  1072. </section2>
  1073. <section2 topic='Edit Whitelist' anchor='edit-whitelist'>
  1074. <p>The service may enable an administrator to define one or more service-wide whitelists (lists of entities that are allowed to communicate the service). For example, a publish-subscribe may allow only a select list of users to publish or subscribe to nodes hosted on the service. An entity added to a whitelist MAY be a JID of any form as specified in <cite>RFC 6120</cite>; the order of JID matching SHOULD be that specified for privacy lists in &xep0016;.</p>
  1075. <p>As with blacklists, a whitelist may prevent inbound communications, outbound communications, or both; whether to offer only bidirectional blocking or a more granular choice of inbound or outbound blocking is a matter of implementation or deployment policy. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#add-to-whitelist" if blocking is bidirectional; "http://jabber.org/protocol/admin#add-to-whitelist-in" for inbound blocking only; and "http://jabber.org/protocol/admin#add-to-whitelist-out" for outbound blocking only.</p>
  1076. <p>A sample protocol flow for this use case is shown below.</p>
  1077. <example caption='Admin Requests Editing of Whitelist'><![CDATA[
  1078. <iq from='bard@shakespeare.lit/globe'
  1079. id='edit-whitelist-1'
  1080. to='shakespeare.lit'
  1081. type='set'
  1082. xml:lang='en'>
  1083. <command xmlns='http://jabber.org/protocol/commands'
  1084. action='execute'
  1085. node='http://jabber.org/protocol/admin#edit-whitelist'/>
  1086. </iq>
  1087. ]]></example>
  1088. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  1089. <example caption='Service Returns Edit Whitelist Form to Admin'><![CDATA[
  1090. <iq from='shakespeare.lit'
  1091. id='edit-whitelist-1'
  1092. to='bard@shakespeare.lit/globe'
  1093. type='result'
  1094. xml:lang='en'>
  1095. <command xmlns='http://jabber.org/protocol/commands'
  1096. node='http://jabber.org/protocol/admin#edit-whitelist'
  1097. sessionid='edit-whitelist:20040408T0337Z'
  1098. status='executing'>
  1099. <x xmlns='jabber:x:data' type='form'>
  1100. <title>Editing the Whitelist</title>
  1101. <instructions>
  1102. Fill out this form to edit the list of entities with whom
  1103. communications are allowed.
  1104. </instructions>
  1105. <field type='hidden' var='FORM_TYPE'>
  1106. <value>http://jabber.org/protocol/admin</value>
  1107. </field>
  1108. <field label='The whitelist'
  1109. var='whitelistjids'>
  1110. <value>capulet.com</value>
  1111. <value>denmark.lit</value>
  1112. <value>england.lit</value>
  1113. <value>montague.net</value>
  1114. </field>
  1115. </x>
  1116. </command>
  1117. </iq>
  1118. ]]></example>
  1119. <example caption='Admin Submits Edit Whitelist Form to Service'><![CDATA[
  1120. <iq from='bard@shakespeare.lit/globe'
  1121. id='edit-whitelist-2'
  1122. to='shakespeare.lit'
  1123. type='set'
  1124. xml:lang='en'>
  1125. <command xmlns='http://jabber.org/protocol/commands'
  1126. node='http://jabber.org/protocol/admin#edit-whitelist'
  1127. sessionid='edit-whitelist:20040408T0337Z'>
  1128. <x xmlns='jabber:x:data' type='submit'>
  1129. <field type='hidden' var='FORM_TYPE'>
  1130. <value>http://jabber.org/protocol/admin</value>
  1131. </field>
  1132. <field var='whitelistjids'>
  1133. <value>capulet.com</value>
  1134. <value>england.lit</value>
  1135. <value>montague.net</value>
  1136. <value>verona.it</value>
  1137. </field>
  1138. </x>
  1139. </command>
  1140. </iq>
  1141. ]]></example>
  1142. <example caption='Service Informs Admin of Completion'><![CDATA[
  1143. <iq from='shakespeare.lit'
  1144. id='edit-whitelist-2'
  1145. to='bard@shakespeare.lit/globe'
  1146. type='result'
  1147. xml:lang='en'>
  1148. <command xmlns='http://jabber.org/protocol/commands'
  1149. node='http://jabber.org/protocol/admin#edit-whitelist'
  1150. sessionid='edit-whitelist:20040408T0337Z'
  1151. status='completed'/>
  1152. </iq>
  1153. ]]></example>
  1154. </section2>
  1155. <section2 topic='Get Number of Registered Users' anchor='get-registered-users-num'>
  1156. <p>It may be helpful to enable an administrator to retrieve the number of registered users. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-registered-users-num".</p>
  1157. <p>A sample protocol flow for this use case is shown below.</p>
  1158. <example caption='Admin Requests Number of Registered Users'><![CDATA[
  1159. <iq from='bard@shakespeare.lit/globe'
  1160. id='get-registered-users-num-1'
  1161. to='shakespeare.lit'
  1162. type='set'
  1163. xml:lang='en'>
  1164. <command xmlns='http://jabber.org/protocol/commands'
  1165. action='execute'
  1166. node='http://jabber.org/protocol/admin#get-registered-users-num'/>
  1167. </iq>
  1168. ]]></example>
  1169. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD simply return the number of registered users.</p>
  1170. <example caption='Service Informs Admin of Completion'><![CDATA[
  1171. <iq from='shakespeare.lit'
  1172. id='get-registered-users-num-1'
  1173. to='bard@shakespeare.lit/globe'
  1174. type='result'
  1175. xml:lang='en'>
  1176. <command xmlns='http://jabber.org/protocol/commands'
  1177. node='http://jabber.org/protocol/admin#get-registered-users-num'
  1178. sessionid='get-registered-users-num:20040408T0337Z'
  1179. status='completed'>
  1180. <x xmlns='jabber:x:data' type='form'>
  1181. <field type='hidden' var='FORM_TYPE'>
  1182. <value>http://jabber.org/protocol/admin</value>
  1183. </field>
  1184. <field label='The number of registered users'
  1185. var='registeredusersnum'>
  1186. <value>123</value>
  1187. </field>
  1188. </x>
  1189. </command>
  1190. </iq>
  1191. ]]></example>
  1192. </section2>
  1193. <section2 topic='Get Number of Disabled Users' anchor='get-disabled-users-num'>
  1194. <p>Given that admins may be able to disable user accounts, it may be helpful to enable an administrator to retrieve the number of disabled users. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-disabled-users-num".</p>
  1195. <p>A sample protocol flow for this use case is shown below.</p>
  1196. <example caption='Admin Requests Number of Disabled Users'><![CDATA[
  1197. <iq from='bard@shakespeare.lit/globe'
  1198. id='get-disabled-users-num-1'
  1199. to='shakespeare.lit'
  1200. type='set'
  1201. xml:lang='en'>
  1202. <command xmlns='http://jabber.org/protocol/commands'
  1203. action='execute'
  1204. node='http://jabber.org/protocol/admin#get-disabled-users-num'/>
  1205. </iq>
  1206. ]]></example>
  1207. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD simply return the number of disabled users.</p>
  1208. <example caption='Service Informs Admin of Completion'><![CDATA[
  1209. <iq from='shakespeare.lit'
  1210. id='get-disabled-users-num-1'
  1211. to='bard@shakespeare.lit/globe'
  1212. type='result'
  1213. xml:lang='en'>
  1214. <command xmlns='http://jabber.org/protocol/commands'
  1215. node='http://jabber.org/protocol/admin#get-disabled-users-num'
  1216. sessionid='get-disabled-users-num:20040408T0337Z'
  1217. status='completed'>
  1218. <x xmlns='jabber:x:data' type='form'>
  1219. <field type='hidden' var='FORM_TYPE'>
  1220. <value>http://jabber.org/protocol/admin</value>
  1221. </field>
  1222. <field label='The number of disabled users'
  1223. var='disabledusersnum'>
  1224. <value>123</value>
  1225. </field>
  1226. </x>
  1227. </command>
  1228. </iq>
  1229. ]]></example>
  1230. </section2>
  1231. <section2 topic='Get Number of Online Users' anchor='get-online-users-num'>
  1232. <p>It may be helpful to enable an administrator to retrieve the number of registered users who are online at any one moment. By "online user" is meant any user or account that currently has at least one connected or available resource as specified in <cite>RFC 6120</cite> and <cite>RFC 6121</cite>, whether that user is actively sending XML stanzas or is idle. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-online-users-num".</p>
  1233. <p>A sample protocol flow for this use case is shown below.</p>
  1234. <example caption='Admin Requests Number of Online Users'><![CDATA[
  1235. <iq from='bard@shakespeare.lit/globe'
  1236. id='get-online-users-num-1'
  1237. to='shakespeare.lit'
  1238. type='set'
  1239. xml:lang='en'>
  1240. <command xmlns='http://jabber.org/protocol/commands'
  1241. action='execute'
  1242. node='http://jabber.org/protocol/admin#get-online-users-num'/>
  1243. </iq>
  1244. ]]></example>
  1245. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD simply return the number of online users.</p>
  1246. <example caption='Service Informs Admin of Completion'><![CDATA[
  1247. <iq from='shakespeare.lit'
  1248. id='get-online-users-num-1'
  1249. to='bard@shakespeare.lit/globe'
  1250. type='result'
  1251. xml:lang='en'>
  1252. <command xmlns='http://jabber.org/protocol/commands'
  1253. node='http://jabber.org/protocol/admin#get-online-users-num'
  1254. sessionid='get-online-users-num:20040408T0337Z'
  1255. status='completed'>
  1256. <x xmlns='jabber:x:data' type='result'>
  1257. <field type='hidden' var='FORM_TYPE'>
  1258. <value>http://jabber.org/protocol/admin</value>
  1259. </field>
  1260. <field label='The number of online users'
  1261. var='onlineusersnum'>
  1262. <value>79</value>
  1263. </field>
  1264. </x>
  1265. </command>
  1266. </iq>
  1267. ]]></example>
  1268. </section2>
  1269. <section2 topic='Get Number of Active Users' anchor='get-active-users-num'>
  1270. <p>Some services may distinguish users who are online and actively using the service from users who are online but idle. Therefore it may be helpful to enable an administrator to retrieve the number of online users who are active at any one moment. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-active-users-num".</p>
  1271. <p>A sample protocol flow for this use case is shown below.</p>
  1272. <example caption='Admin Requests Number of Active Users'><![CDATA[
  1273. <iq from='bard@shakespeare.lit/globe'
  1274. id='get-active-users-num-1'
  1275. to='shakespeare.lit'
  1276. type='set'
  1277. xml:lang='en'>
  1278. <command xmlns='http://jabber.org/protocol/commands'
  1279. action='execute'
  1280. node='http://jabber.org/protocol/admin#get-active-users-num'/>
  1281. </iq>
  1282. ]]></example>
  1283. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD simply return the number of active users.</p>
  1284. <example caption='Service Informs Admin of Completion'><![CDATA[
  1285. <iq from='shakespeare.lit'
  1286. id='get-active-users-num-1'
  1287. to='bard@shakespeare.lit/globe'
  1288. type='result'
  1289. xml:lang='en'>
  1290. <command xmlns='http://jabber.org/protocol/commands'
  1291. node='http://jabber.org/protocol/admin#get-active-users-num'
  1292. sessionid='get-online-users-num:20040408T0337Z'
  1293. status='completed'>
  1294. <x xmlns='jabber:x:data' type='result'>
  1295. <field type='hidden' var='FORM_TYPE'>
  1296. <value>http://jabber.org/protocol/admin</value>
  1297. </field>
  1298. <field label='The number of active users'
  1299. var='activeusersnum'>
  1300. <value>66</value>
  1301. </field>
  1302. </x>
  1303. </command>
  1304. </iq>
  1305. ]]></example>
  1306. </section2>
  1307. <section2 topic='Get Number of Idle Users' anchor='get-idle-users-num'>
  1308. <p>Some services may distinguish users who are online and actively using the service from users who are online but idle. Therefore it may be helpful to enable an administrator to retrieve the number of online users who are idle at any one moment. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-idle-users-num".</p>
  1309. <p>A sample protocol flow for this use case is shown below.</p>
  1310. <example caption='Admin Requests Number of Idle Users'><![CDATA[
  1311. <iq from='bard@shakespeare.lit/globe'
  1312. id='get-idle-users-num-1'
  1313. to='shakespeare.lit'
  1314. type='set'
  1315. xml:lang='en'>
  1316. <command xmlns='http://jabber.org/protocol/commands'
  1317. action='execute'
  1318. node='http://jabber.org/protocol/admin#get-idle-users-num'/>
  1319. </iq>
  1320. ]]></example>
  1321. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD simply return the number of idle users.</p>
  1322. <example caption='Service Informs Admin of Completion'><![CDATA[
  1323. <iq from='shakespeare.lit'
  1324. id='get-idle-users-num-1'
  1325. to='bard@shakespeare.lit/globe'
  1326. type='result'
  1327. xml:lang='en'>
  1328. <command xmlns='http://jabber.org/protocol/commands'
  1329. node='http://jabber.org/protocol/admin#get-idle-users-num'
  1330. sessionid='get-online-users-num:20040408T0337Z'
  1331. status='completed'>
  1332. <x xmlns='jabber:x:data' type='result'>
  1333. <field type='hidden' var='FORM_TYPE'>
  1334. <value>http://jabber.org/protocol/admin</value>
  1335. </field>
  1336. <field label='The number of idle users'
  1337. var='idleusersnum'>
  1338. <value>13</value>
  1339. </field>
  1340. </x>
  1341. </command>
  1342. </iq>
  1343. ]]></example>
  1344. </section2>
  1345. <section2 topic='Get List of Registered Users' anchor='get-registered-users-list'>
  1346. <p>On a server or service without many registered users, it may be helpful to enable an administrator to retrieve a list of all registered users. The service may need to truncate the result-set, since it could be quite large (however, any ability to limit or page through the result-set is outside the scope of this document). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-registered-users-list".</p>
  1347. <p>A sample protocol flow for this use case is shown below.</p>
  1348. <example caption='Admin Requests List of Registered Users'><![CDATA[
  1349. <iq from='bard@shakespeare.lit/globe'
  1350. id='get-registered-users-list-1'
  1351. to='shakespeare.lit'
  1352. type='set'
  1353. xml:lang='en'>
  1354. <command xmlns='http://jabber.org/protocol/commands'
  1355. action='execute'
  1356. node='http://jabber.org/protocol/admin#get-registered-users-list'/>
  1357. </iq>
  1358. ]]></example>
  1359. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD do one of the following:</p>
  1360. <ol>
  1361. <li>If there are not many registered users, the service MAY simply return the list of registered users.</li>
  1362. <li>However, the service MAY also return a form so that the admin can specify more detailed information about the search (e.g., number of users to show).</li>
  1363. </ol>
  1364. <example caption='Service Returns Get Registered Users Form to Admin'><![CDATA[
  1365. <iq from='shakespeare.lit'
  1366. id='get-registered-users-list-1'
  1367. to='bard@shakespeare.lit/globe'
  1368. type='result'
  1369. xml:lang='en'>
  1370. <command xmlns='http://jabber.org/protocol/commands'
  1371. node='http://jabber.org/protocol/admin#get-registered-users-list'
  1372. sessionid='get-registered-users-list:20040408T0337Z'
  1373. status='executing'>
  1374. <x xmlns='jabber:x:data' type='form'>
  1375. <title>Requesting List of Registered Users</title>
  1376. <instructions>
  1377. Fill out this form to request the registered users
  1378. of this service.
  1379. </instructions>
  1380. <field type='hidden' var='FORM_TYPE'>
  1381. <value>http://jabber.org/protocol/admin</value>
  1382. </field>
  1383. <field label='Maximum number of items to show'
  1384. type='list-single'
  1385. var='max_items'>
  1386. <option label='25'><value>25</value></option>
  1387. <option label='50'><value>50</value></option>
  1388. <option label='75'><value>75</value></option>
  1389. <option label='100'><value>100</value></option>
  1390. <option label='150'><value>150</value></option>
  1391. <option label='200'><value>200</value></option>
  1392. <option label='None'><value>none</value></option>
  1393. </field>
  1394. </x>
  1395. </command>
  1396. </iq>
  1397. ]]></example>
  1398. <example caption='Admin Submits Get Registered Users Form to Service'><![CDATA[
  1399. <iq from='bard@shakespeare.lit/globe'
  1400. id='get-registered-users-list-2'
  1401. to='shakespeare.lit'
  1402. type='set'
  1403. xml:lang='en'>
  1404. <command xmlns='http://jabber.org/protocol/commands'
  1405. node='http://jabber.org/protocol/admin#get-registered-users-list'
  1406. sessionid='get-registered-users-list:20040408T0337Z'>
  1407. <x xmlns='jabber:x:data' type='submit'>
  1408. <field type='hidden' var='FORM_TYPE'>
  1409. <value>http://jabber.org/protocol/admin</value>
  1410. </field>
  1411. <field var='max_items'>
  1412. <value>100</value>
  1413. </field>
  1414. </x>
  1415. </command>
  1416. </iq>
  1417. ]]></example>
  1418. <example caption='Service Informs Admin of Completion'><![CDATA[
  1419. <iq from='shakespeare.lit'
  1420. id='get-registered-users-list-2'
  1421. to='bard@shakespeare.lit/globe'
  1422. type='result'
  1423. xml:lang='en'>
  1424. <command xmlns='http://jabber.org/protocol/commands'
  1425. node='http://jabber.org/protocol/admin#get-registered-users-list'
  1426. sessionid='get-registered-users:20040408T0337Z'
  1427. status='completed'>
  1428. <x xmlns='jabber:x:data' type='form'>
  1429. <field type='hidden' var='FORM_TYPE'>
  1430. <value>http://jabber.org/protocol/admin</value>
  1431. </field>
  1432. <field label='The list of all users'
  1433. var='registereduserjids'>
  1434. <value>bernardo@shakespeare.lit</value>
  1435. <value>bard@shakespeare.lit</value>
  1436. <value>cordelia@shakespeare.lit</value>
  1437. <value>crone1@shakespeare.lit</value>
  1438. <value>emilia@shakespeare.lit</value>
  1439. <value>francisco@shakespeare.lit</value>
  1440. <value>goneril@shakespeare.lit</value>
  1441. <value>hag66@shakespeare.lit</value>
  1442. <value>hecate@shakespeare.lit</value>
  1443. <value>iago@shakespeare.lit</value>
  1444. <value>kingclaudius@shakespeare.lit</value>
  1445. <value>kinglear@shakespeare.lit</value>
  1446. <value>laertes@shakespeare.lit</value>
  1447. <value>macbeth@shakespeare.li</value>
  1448. <value>mercutio@shakespeare.lit</value>
  1449. <value>nestor@shakespeare.lit</value>
  1450. <value>northumberland@shakespeare.lit</value>
  1451. <value>painter@shakespeare.lit</value>
  1452. <value>regan@shakespeare.lit</value>
  1453. <value>timon@shakespeare.lit</value>
  1454. <value>wiccarocks@shakespeare.lit</value>
  1455. </field>
  1456. </x>
  1457. </command>
  1458. </iq>
  1459. ]]></example>
  1460. <p>The service MAY return an error (rather than a list) if the number of items is excessive or the max_items value is unnacceptable.</p>
  1461. <p>The service MAY specify additional fields that restrict the scope of the user list (e.g., regular expression matching for Jabber IDs), and such fields MAY be registered in the future with the XMPP Registrar; however, such fields are not defined herein.</p>
  1462. </section2>
  1463. <section2 topic='Get List of Disabled Users' anchor='get-disabled-users-list'>
  1464. <p>It may be helpful to enable an administrator to retrieve a list of all disabled users. The service may need to truncate the result-set, since it could be quite large (however, any ability to limit or page through the result-set is outside the scope of this document). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-disabled-users-list".</p>
  1465. <p>A sample protocol flow for this use case is shown below.</p>
  1466. <example caption='Admin Requests List of Disabled Users'><![CDATA[
  1467. <iq from='bard@shakespeare.lit/globe'
  1468. id='get-disabled-users-list-1'
  1469. to='shakespeare.lit'
  1470. type='set'
  1471. xml:lang='en'>
  1472. <command xmlns='http://jabber.org/protocol/commands'
  1473. action='execute'
  1474. node='http://jabber.org/protocol/admin#get-disabled-users-list'/>
  1475. </iq>
  1476. ]]></example>
  1477. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD do one of the following:</p>
  1478. <ol>
  1479. <li>If there are not many disabled users, the service MAY simply return the list of disabled users.</li>
  1480. <li>However, the service MAY also return a form so that the admin can specify more detailed information about the search (e.g., number of users to show).</li>
  1481. </ol>
  1482. <example caption='Service Returns Get Disabled Users Form to Admin'><![CDATA[
  1483. <iq from='shakespeare.lit'
  1484. id='get-disabled-users-list-1'
  1485. to='bard@shakespeare.lit/globe'
  1486. type='result'
  1487. xml:lang='en'>
  1488. <command xmlns='http://jabber.org/protocol/commands'
  1489. node='http://jabber.org/protocol/admin#get-disabled-users-list'
  1490. sessionid='get-disabled-users-list:20040408T0337Z'
  1491. status='executing'>
  1492. <x xmlns='jabber:x:data' type='form'>
  1493. <title>Requesting List of Disabled Users</title>
  1494. <instructions>
  1495. Fill out this form to request the disabled users
  1496. of this service.
  1497. </instructions>
  1498. <field type='hidden' var='FORM_TYPE'>
  1499. <value>http://jabber.org/protocol/admin</value>
  1500. </field>
  1501. <field label='Maximum number of items to show'
  1502. type='list-single'
  1503. var='max_items'>
  1504. <option label='25'><value>25</value></option>
  1505. <option label='50'><value>50</value></option>
  1506. <option label='75'><value>75</value></option>
  1507. <option label='100'><value>100</value></option>
  1508. <option label='150'><value>150</value></option>
  1509. <option label='200'><value>200</value></option>
  1510. <option label='None'><value>none</value></option>
  1511. </field>
  1512. </x>
  1513. </command>
  1514. </iq>
  1515. ]]></example>
  1516. <example caption='Admin Submits Get Disabled Users Form to Service'><![CDATA[
  1517. <iq from='bard@shakespeare.lit/globe'
  1518. id='get-disabled-users-list-2'
  1519. to='shakespeare.lit'
  1520. type='set'
  1521. xml:lang='en'>
  1522. <command xmlns='http://jabber.org/protocol/commands'
  1523. node='http://jabber.org/protocol/admin#get-disabled-users-list'
  1524. sessionid='get-disabled-users-list:20040408T0337Z'>
  1525. <x xmlns='jabber:x:data' type='submit'>
  1526. <field type='hidden' var='FORM_TYPE'>
  1527. <value>http://jabber.org/protocol/admin</value>
  1528. </field>
  1529. <field var='max_items'>
  1530. <value>100</value>
  1531. </field>
  1532. </x>
  1533. </command>
  1534. </iq>
  1535. ]]></example>
  1536. <example caption='Service Informs Admin of Completion'><![CDATA[
  1537. <iq from='shakespeare.lit'
  1538. id='get-disabled-users-list-2'
  1539. to='bard@shakespeare.lit/globe'
  1540. type='result'
  1541. xml:lang='en'>
  1542. <command xmlns='http://jabber.org/protocol/commands'
  1543. node='http://jabber.org/protocol/admin#get-disabled-users-list'
  1544. sessionid='get-disabled-users:20040408T0337Z'
  1545. status='completed'>
  1546. <x xmlns='jabber:x:data' type='result'>
  1547. <field type='hidden' var='FORM_TYPE'>
  1548. <value>http://jabber.org/protocol/admin</value>
  1549. </field>
  1550. <field label='The list of all disabled users'
  1551. var='disableduserjids'>
  1552. <value>bernardo@shakespeare.lit</value>
  1553. <value>iago@shakespeare.lit</value>
  1554. </field>
  1555. </x>
  1556. </command>
  1557. </iq>
  1558. ]]></example>
  1559. <p>The service MAY return an error (rather than a list) if the number of items is excessive or the max_items value is unnacceptable.</p>
  1560. <p>The service MAY specify additional fields that restrict the scope of the user list (e.g., regular expression matching for Jabber IDs), and such fields MAY be registered in the future with the XMPP Registrar; however, such fields are not defined herein.</p>
  1561. </section2>
  1562. <section2 topic='Get List of Online Users' anchor='get-online-users-list'>
  1563. <p>It may be helpful to enable an administrator to retrieve a list of all online users. Because the number of online users may be quite large, the service may need to truncate the result-set, since it could be quite large (however, any ability to limit or page through the result-set is outside the scope of this document). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-online-users-list".</p>
  1564. <p>A sample protocol flow for this use case is shown below.</p>
  1565. <example caption='Admin Requests List of Online Users'><![CDATA[
  1566. <iq from='bard@shakespeare.lit/globe'
  1567. id='get-online-users-list-1'
  1568. to='shakespeare.lit'
  1569. type='set'
  1570. xml:lang='en'>
  1571. <command xmlns='http://jabber.org/protocol/commands'
  1572. action='execute'
  1573. node='http://jabber.org/protocol/admin#get-online-users-list'/>
  1574. </iq>
  1575. ]]></example>
  1576. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD do one of the following:</p>
  1577. <ol>
  1578. <li>If there are not many online users, the service MAY simply return the list of online users.</li>
  1579. <li>However, the service MAY also return a form so that the admin can specify more detailed information about the search (e.g., number of users to show).</li>
  1580. </ol>
  1581. <example caption='Service Returns Get Online Users Form to Admin'><![CDATA[
  1582. <iq from='shakespeare.lit'
  1583. id='get-online-users-list-1'
  1584. to='bard@shakespeare.lit/globe'
  1585. type='result'
  1586. xml:lang='en'>
  1587. <command xmlns='http://jabber.org/protocol/commands'
  1588. node='http://jabber.org/protocol/admin#get-online-users-list'
  1589. sessionid='get-online-users-list:20040408T0337Z'
  1590. status='executing'>
  1591. <x xmlns='jabber:x:data' type='form'>
  1592. <title>Requesting List of Online Users</title>
  1593. <instructions>
  1594. Fill out this form to request the online users
  1595. of this service.
  1596. </instructions>
  1597. <field type='hidden' var='FORM_TYPE'>
  1598. <value>http://jabber.org/protocol/admin</value>
  1599. </field>
  1600. <field label='Maximum number of items to show'
  1601. type='list-single'
  1602. var='max_items'>
  1603. <option label='25'><value>25</value></option>
  1604. <option label='50'><value>50</value></option>
  1605. <option label='75'><value>75</value></option>
  1606. <option label='100'><value>100</value></option>
  1607. <option label='150'><value>150</value></option>
  1608. <option label='200'><value>200</value></option>
  1609. <option label='None'><value>none</value></option>
  1610. </field>
  1611. </x>
  1612. </command>
  1613. </iq>
  1614. ]]></example>
  1615. <example caption='Admin Submits Get Online Users Form to Service'><![CDATA[
  1616. <iq from='bard@shakespeare.lit/globe'
  1617. id='get-online-users-list-2'
  1618. to='shakespeare.lit'
  1619. type='set'
  1620. xml:lang='en'>
  1621. <command xmlns='http://jabber.org/protocol/commands'
  1622. node='http://jabber.org/protocol/admin#get-online-users-list'
  1623. sessionid='get-online-users-list:20040408T0337Z'>
  1624. <x xmlns='jabber:x:data' type='submit'>
  1625. <field type='hidden' var='FORM_TYPE'>
  1626. <value>http://jabber.org/protocol/admin</value>
  1627. </field>
  1628. <field var='max_items'>
  1629. <value>100</value>
  1630. </field>
  1631. </x>
  1632. </command>
  1633. </iq>
  1634. ]]></example>
  1635. <example caption='Service Informs Admin of Completion'><![CDATA[
  1636. <iq from='shakespeare.lit'
  1637. id='get-online-users-list-2'
  1638. to='bard@shakespeare.lit/globe'
  1639. type='result'
  1640. xml:lang='en'>
  1641. <command xmlns='http://jabber.org/protocol/commands'
  1642. node='http://jabber.org/protocol/admin#get-online-users-list'
  1643. sessionid='get-online-users:20040408T0337Z'
  1644. status='completed'>
  1645. <x xmlns='jabber:x:data' type='result'>
  1646. <field type='hidden' var='FORM_TYPE'>
  1647. <value>http://jabber.org/protocol/admin</value>
  1648. </field>
  1649. <field label='The list of all online users'
  1650. var='onlineuserjids'>
  1651. <value>bard@shakespeare.lit</value>
  1652. <value>cordelia@shakespeare.lit</value>
  1653. <value>crone1@shakespeare.lit</value>
  1654. <value>goneril@shakespeare.lit</value>
  1655. <value>hag66@shakespeare.lit</value>
  1656. <value>hecate@shakespeare.lit</value>
  1657. <value>kinglear@shakespeare.lit</value>
  1658. <value>macbeth@shakespeare.li</value>
  1659. <value>mercutio@shakespeare.lit</value>
  1660. <value>northumberland@shakespeare.lit</value>
  1661. <value>painter@shakespeare.lit</value>
  1662. <value>wiccarocks@shakespeare.lit</value>
  1663. </field>
  1664. </x>
  1665. </command>
  1666. </iq>
  1667. ]]></example>
  1668. <p>The service MAY return an error (rather than a list) if the number of items is excessive or the max_items value is unnacceptable.</p>
  1669. <p>The service MAY specify additional fields that restrict the scope of the user list (e.g., regular expression matching for Jabber IDs), and such fields MAY be registered in the future with the XMPP Registrar; however, such fields are not defined herein.</p>
  1670. </section2>
  1671. <section2 topic='Get List of Active Users' anchor='get-active-users-list'>
  1672. <p>It may be helpful to enable an administrator to retrieve a list of all active users. Because the number of active users may be quite large, the service may need to truncate the result-set, since it could be quite large (however, any ability to limit or page through the result-set is outside the scope of this document). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-active-users".</p>
  1673. <p>A sample protocol flow for this use case is shown below.</p>
  1674. <example caption='Admin Requests List of Active Users'><![CDATA[
  1675. <iq from='bard@shakespeare.lit/globe'
  1676. id='get-active-users-1'
  1677. to='shakespeare.lit'
  1678. type='set'
  1679. xml:lang='en'>
  1680. <command xmlns='http://jabber.org/protocol/commands'
  1681. action='execute'
  1682. node='http://jabber.org/protocol/admin#get-active-users'/>
  1683. </iq>
  1684. ]]></example>
  1685. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD do one of the following:</p>
  1686. <ol>
  1687. <li>If there are not many active users, the service MAY simply return the list of active users.</li>
  1688. <li>However, the service MAY also return a form so that the admin can specify more detailed information about the search (e.g., number of users to show).</li>
  1689. </ol>
  1690. <example caption='Service Returns Get Active Users Form to Admin'><![CDATA[
  1691. <iq from='shakespeare.lit'
  1692. id='get-active-users-1'
  1693. to='bard@shakespeare.lit/globe'
  1694. type='result'
  1695. xml:lang='en'>
  1696. <command xmlns='http://jabber.org/protocol/commands'
  1697. node='http://jabber.org/protocol/admin#get-active-users'
  1698. sessionid='get-active-users:20040408T0337Z'
  1699. status='executing'>
  1700. <x xmlns='jabber:x:data' type='form'>
  1701. <title>Requesting List of Active Users</title>
  1702. <instructions>
  1703. Fill out this form to request the active users
  1704. of this service.
  1705. </instructions>
  1706. <field type='hidden' var='FORM_TYPE'>
  1707. <value>http://jabber.org/protocol/admin</value>
  1708. </field>
  1709. <field label='Maximum number of items to show'
  1710. type='list-single'
  1711. var='max_items'>
  1712. <option label='25'><value>25</value></option>
  1713. <option label='50'><value>50</value></option>
  1714. <option label='75'><value>75</value></option>
  1715. <option label='100'><value>100</value></option>
  1716. <option label='150'><value>150</value></option>
  1717. <option label='200'><value>200</value></option>
  1718. <option label='None'><value>none</value></option>
  1719. </field>
  1720. </x>
  1721. </command>
  1722. </iq>
  1723. ]]></example>
  1724. <example caption='Admin Submits Get Active Users Form to Service'><![CDATA[
  1725. <iq from='bard@shakespeare.lit/globe'
  1726. id='get-active-users-2'
  1727. to='shakespeare.lit'
  1728. type='set'
  1729. xml:lang='en'>
  1730. <command xmlns='http://jabber.org/protocol/commands'
  1731. node='http://jabber.org/protocol/admin#get-active-users'
  1732. sessionid='get-active-users:20040408T0337Z'>
  1733. <x xmlns='jabber:x:data' type='submit'>
  1734. <field type='hidden' var='FORM_TYPE'>
  1735. <value>http://jabber.org/protocol/admin</value>
  1736. </field>
  1737. <field var='max_items'>
  1738. <value>100</value>
  1739. </field>
  1740. </x>
  1741. </command>
  1742. </iq>
  1743. ]]></example>
  1744. <example caption='Service Informs Admin of Completion'><![CDATA[
  1745. <iq from='shakespeare.lit'
  1746. id='get-active-users-2'
  1747. to='bard@shakespeare.lit/globe'
  1748. type='result'
  1749. xml:lang='en'>
  1750. <command xmlns='http://jabber.org/protocol/commands'
  1751. node='http://jabber.org/protocol/admin#get-active-users'
  1752. sessionid='get-active-users:20040408T0337Z'
  1753. status='completed'>
  1754. <x xmlns='jabber:x:data' type='result'>
  1755. <field type='hidden' var='FORM_TYPE'>
  1756. <value>http://jabber.org/protocol/admin</value>
  1757. </field>
  1758. <field label='The list of active users'
  1759. var='activeuserjids'>
  1760. <value>bard@shakespeare.lit</value>
  1761. <value>crone1@shakespeare.lit</value>
  1762. <value>hag66@shakespeare.lit</value>
  1763. <value>hecate@shakespeare.lit</value>
  1764. <value>wiccarocks@shakespeare.lit</value>
  1765. </field>
  1766. </x>
  1767. </command>
  1768. </iq>
  1769. ]]></example>
  1770. <p>The service MAY return an error (rather than a list) if the number of items is excessive or the max_items value is unnacceptable.</p>
  1771. <p>The service MAY specify additional fields that restrict the scope of the user list (e.g., regular expression matching for Jabber IDs), and such fields MAY be registered in the future with the XMPP Registrar; however, such fields are not defined herein.</p>
  1772. </section2>
  1773. <section2 topic='Get List of Idle Users' anchor='get-idle-users-list'>
  1774. <p>It may be helpful to enable an administrator to retrieve a list of all idle users. Because the number of idle users may be quite large, the service may need to truncate the result-set, since it could be quite large (however, any ability to limit or page through the result-set is outside the scope of this document). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#get-idle-users".</p>
  1775. <p>A sample protocol flow for this use case is shown below.</p>
  1776. <example caption='Admin Requests List of Active Users'><![CDATA[
  1777. <iq from='bard@shakespeare.lit/globe'
  1778. id='get-idle-users-1'
  1779. to='shakespeare.lit'
  1780. type='set'
  1781. xml:lang='en'>
  1782. <command xmlns='http://jabber.org/protocol/commands'
  1783. action='execute'
  1784. node='http://jabber.org/protocol/admin#get-idle-users'/>
  1785. </iq>
  1786. ]]></example>
  1787. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD do one of the following:</p>
  1788. <ol>
  1789. <li>If there are not many idle users, the service MAY simply return the list of idle users.</li>
  1790. <li>However, the service MAY also return a form so that the admin can specify more detailed information about the search (e.g., number of users to show).</li>
  1791. </ol>
  1792. <example caption='Service Returns Get Idle Users Form to Admin'><![CDATA[
  1793. <iq from='shakespeare.lit'
  1794. id='get-idle-users-1'
  1795. to='bard@shakespeare.lit/globe'
  1796. type='result'
  1797. xml:lang='en'>
  1798. <command xmlns='http://jabber.org/protocol/commands'
  1799. node='http://jabber.org/protocol/admin#get-idle-users'
  1800. sessionid='get-idle-users:20040408T0337Z'
  1801. status='executing'>
  1802. <x xmlns='jabber:x:data' type='form'>
  1803. <title>Requesting List of Active Users</title>
  1804. <instructions>
  1805. Fill out this form to request the idle users
  1806. of this service.
  1807. </instructions>
  1808. <field type='hidden' var='FORM_TYPE'>
  1809. <value>http://jabber.org/protocol/admin</value>
  1810. </field>
  1811. <field label='Maximum number of items to show'
  1812. type='list-single'
  1813. var='max_items'>
  1814. <option label='25'><value>25</value></option>
  1815. <option label='50'><value>50</value></option>
  1816. <option label='75'><value>75</value></option>
  1817. <option label='100'><value>100</value></option>
  1818. <option label='150'><value>150</value></option>
  1819. <option label='200'><value>200</value></option>
  1820. <option label='None'><value>none</value></option>
  1821. </field>
  1822. </x>
  1823. </command>
  1824. </iq>
  1825. ]]></example>
  1826. <example caption='Admin Submits Get Idle Users Form to Service'><![CDATA[
  1827. <iq from='bard@shakespeare.lit/globe'
  1828. id='get-idle-users-2'
  1829. to='shakespeare.lit'
  1830. type='set'
  1831. xml:lang='en'>
  1832. <command xmlns='http://jabber.org/protocol/commands'
  1833. node='http://jabber.org/protocol/admin#get-idle-users'
  1834. sessionid='get-idle-users:20040408T0337Z'>
  1835. <x xmlns='jabber:x:data' type='submit'>
  1836. <field type='hidden' var='FORM_TYPE'>
  1837. <value>http://jabber.org/protocol/admin</value>
  1838. </field>
  1839. <field var='max_items'>
  1840. <value>100</value>
  1841. </field>
  1842. </x>
  1843. </command>
  1844. </iq>
  1845. ]]></example>
  1846. <example caption='Service Informs Admin of Completion'><![CDATA[
  1847. <iq from='shakespeare.lit'
  1848. id='get-idle-users-2'
  1849. to='bard@shakespeare.lit/globe'
  1850. type='result'
  1851. xml:lang='en'>
  1852. <command xmlns='http://jabber.org/protocol/commands'
  1853. node='http://jabber.org/protocol/admin#get-idle-users'
  1854. sessionid='get-active-users:20040408T0337Z'
  1855. status='completed'>
  1856. <x xmlns='jabber:x:data' type='result'>
  1857. <field type='hidden' var='FORM_TYPE'>
  1858. <value>http://jabber.org/protocol/admin</value>
  1859. </field>
  1860. <field label='The list of idle users'
  1861. var='activeuserjids'>
  1862. <value>cordelia@shakespeare.lit</value>
  1863. <value>goneril@shakespeare.lit</value>
  1864. <value>kinglear@shakespeare.lit</value>
  1865. <value>macbeth@shakespeare.li</value>
  1866. <value>mercutio@shakespeare.lit</value>
  1867. <value>northumberland@shakespeare.lit</value>
  1868. <value>painter@shakespeare.lit</value>
  1869. </field>
  1870. </x>
  1871. </command>
  1872. </iq>
  1873. ]]></example>
  1874. <p>The service MAY return an error (rather than a list) if the number of items is excessive or the max_items value is unnacceptable.</p>
  1875. <p>The service MAY specify additional fields that restrict the scope of the user list (e.g., regular expression matching for Jabber IDs), and such fields MAY be registered in the future with the XMPP Registrar; however, such fields are not defined herein.</p>
  1876. </section2>
  1877. <section2 topic='Send Announcement to Online Users' anchor='announce'>
  1878. <p>Administrators of some existing Jabber servers have found it useful to be able to send an announcement to all online users of the server (e.g., to announce a server shutdown); this concept can be extended to any service (such as a multi-user chat service or a gateway to a foreign IM service). The message shall be sent only to users who currently have a "session" with the service. Obviously there may be latency in sending the message if the number of active users is extremely large. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#announce".</p>
  1879. <p>A sample protocol flow for this use case is shown below.</p>
  1880. <example caption='Admin Requests Announcement'><![CDATA[
  1881. <iq from='bard@shakespeare.lit/globe'
  1882. id='announce-1'
  1883. to='shakespeare.lit'
  1884. type='set'
  1885. xml:lang='en'>
  1886. <command xmlns='http://jabber.org/protocol/commands'
  1887. action='execute'
  1888. node='http://jabber.org/protocol/admin#announce'/>
  1889. </iq>
  1890. ]]></example>
  1891. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  1892. <example caption='Service Returns Announce Form to Admin'><![CDATA[
  1893. <iq from='shakespeare.lit'
  1894. id='announce-1'
  1895. to='bard@shakespeare.lit/globe'
  1896. type='result'
  1897. xml:lang='en'>
  1898. <command xmlns='http://jabber.org/protocol/commands'
  1899. node='http://jabber.org/protocol/admin#announce'
  1900. sessionid='announce:20040408T0337Z'
  1901. status='executing'>
  1902. <x xmlns='jabber:x:data' type='form'>
  1903. <title>Making an Announcement</title>
  1904. <instructions>
  1905. Fill out this form to make an announcement to all
  1906. active users of this service.
  1907. </instructions>
  1908. <field type='hidden' var='FORM_TYPE'>
  1909. <value>http://jabber.org/protocol/admin</value>
  1910. </field>
  1911. <field label='Announcement'
  1912. type='text-multi'
  1913. var='announcement'>
  1914. <required/>
  1915. </field>
  1916. </x>
  1917. </command>
  1918. </iq>
  1919. ]]></example>
  1920. <example caption='Admin Submits Announce Form to Service'><![CDATA[
  1921. <iq from='bard@shakespeare.lit/globe'
  1922. id='announce-2'
  1923. to='shakespeare.lit'
  1924. type='set'
  1925. xml:lang='en'>
  1926. <command xmlns='http://jabber.org/protocol/commands'
  1927. node='http://jabber.org/protocol/admin#announce'
  1928. sessionid='announce:20040408T0337Z'>
  1929. <x xmlns='jabber:x:data' type='submit'>
  1930. <field type='hidden' var='FORM_TYPE'>
  1931. <value>http://jabber.org/protocol/admin</value>
  1932. </field>
  1933. <field var='announcement'>
  1934. <value>Attention! This service will be going down for</value>
  1935. <value>maintenance in 2 minutes. Please log off now!</value>
  1936. <value>We apologize for the inconvenience.</value>
  1937. </field>
  1938. </x>
  1939. </command>
  1940. </iq>
  1941. ]]></example>
  1942. <example caption='Service Informs Admin of Completion'><![CDATA[
  1943. <iq from='shakespeare.lit'
  1944. id='announce-2'
  1945. to='bard@shakespeare.lit/globe'
  1946. type='result'
  1947. xml:lang='en'>
  1948. <command xmlns='http://jabber.org/protocol/commands'
  1949. node='http://jabber.org/protocol/admin#announce'
  1950. sessionid='announce:20040408T0337Z'
  1951. status='completed'/>
  1952. </iq>
  1953. ]]></example>
  1954. </section2>
  1955. <section2 topic='Set Message of the Day' anchor='set-motd'>
  1956. <p>Administrators of some existing Jabber servers have found it useful to be able to send a "message of the day" that is delivered to any user who logs in to the server that day (e.g., to announce service changes);
  1957. <note>Typically, a "message of the day" is an announcement that is sent once to all users of a server or a service until and unless the message is deleted; it can be thought of as a "standing announcement" as opposed to the "one-time announcement" sent to all online users in the previous use cases. The announcement is sent immediately to users who are online when the message is set, or after the next session initiation for other users (e.g., on server login or chatroom join).</note>
  1958. this concept can be extended to any service (such as a multi-user chat service or a gateway to a foreign IM service). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#set-motd".</p>
  1959. <p>A sample protocol flow for this use case is shown below.</p>
  1960. <example caption='Admin Sets Message of the Day'><![CDATA[
  1961. <iq from='bard@shakespeare.lit/globe'
  1962. id='set-motd-1'
  1963. to='shakespeare.lit'
  1964. type='set'
  1965. xml:lang='en'>
  1966. <command xmlns='http://jabber.org/protocol/commands'
  1967. action='execute'
  1968. node='http://jabber.org/protocol/admin#set-motd'/>
  1969. </iq>
  1970. ]]></example>
  1971. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  1972. <example caption='Service Returns MOTD Form to Admin'><![CDATA[
  1973. <iq from='shakespeare.lit'
  1974. id='set-motd-1'
  1975. to='bard@shakespeare.lit/globe'
  1976. type='result'
  1977. xml:lang='en'>
  1978. <command xmlns='http://jabber.org/protocol/commands'
  1979. node='http://jabber.org/protocol/admin#set-motd'
  1980. sessionid='set-motd:20040408T0337Z'
  1981. status='executing'>
  1982. <x xmlns='jabber:x:data' type='form'>
  1983. <title>Setting the Message of the Day</title>
  1984. <instructions>
  1985. Fill out this form to set the message of the day.
  1986. </instructions>
  1987. <field type='hidden' var='FORM_TYPE'>
  1988. <value>http://jabber.org/protocol/admin</value>
  1989. </field>
  1990. <field label='Message of the Day'
  1991. type='text-multi'
  1992. var='motd'>
  1993. <required/>
  1994. </field>
  1995. </x>
  1996. </command>
  1997. </iq>
  1998. ]]></example>
  1999. <example caption='Admin Submits MOTD Form to Service'><![CDATA[
  2000. <iq from='bard@shakespeare.lit/globe'
  2001. id='set-motd-2'
  2002. to='shakespeare.lit'
  2003. type='set'
  2004. xml:lang='en'>
  2005. <command xmlns='http://jabber.org/protocol/commands'
  2006. node='http://jabber.org/protocol/admin#set-motd'
  2007. sessionid='set-motd:20040408T0337Z'>
  2008. <x xmlns='jabber:x:data' type='submit'>
  2009. <field type='hidden' var='FORM_TYPE'>
  2010. <value>http://jabber.org/protocol/admin</value>
  2011. </field>
  2012. <field var='motd'>
  2013. <value>Don&apos;t forget: the grand re-opening of the</value>
  2014. <value>Globe Theatre will occur tomorrow night.</value>
  2015. <value>The festivities will begin right after tea</value>
  2016. <value>and extend far into the night. Don&apos;t miss it!</value>
  2017. <value>--The Globe Staff</value>
  2018. </field>
  2019. </x>
  2020. </command>
  2021. </iq>
  2022. ]]></example>
  2023. <example caption='Service Informs Admin of Completion'><![CDATA[
  2024. <iq from='shakespeare.lit'
  2025. id='set-motd-2'
  2026. to='bard@shakespeare.lit/globe'
  2027. type='result'
  2028. xml:lang='en'>
  2029. <command xmlns='http://jabber.org/protocol/commands'
  2030. node='http://jabber.org/protocol/admin#set-motd'
  2031. sessionid='set-motd:20040408T0337Z'
  2032. status='completed'/>
  2033. </iq>
  2034. ]]></example>
  2035. </section2>
  2036. <section2 topic='Edit Message of the Day' anchor='edit-motd'>
  2037. <p>After setting a message of the day, an administrator may want to edit that message (e.g., in order to correct an error). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#edit-motd".</p>
  2038. <p>A sample protocol flow for this use case is shown below.</p>
  2039. <example caption='Admin Edits Message of the Day'><![CDATA[
  2040. <iq from='bard@shakespeare.lit/globe'
  2041. id='edit-motd-1'
  2042. to='shakespeare.lit'
  2043. type='set'
  2044. xml:lang='en'>
  2045. <command xmlns='http://jabber.org/protocol/commands'
  2046. action='execute'
  2047. node='http://jabber.org/protocol/admin#edit-motd'/>
  2048. </iq>
  2049. ]]></example>
  2050. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form, which SHOULD include the current message of the day if one has already been set.</p>
  2051. <example caption='Service Returns MOTD Form to Admin'><![CDATA[
  2052. <iq from='shakespeare.lit'
  2053. id='edit-motd-1'
  2054. to='bard@shakespeare.lit/globe'
  2055. type='result'
  2056. xml:lang='en'>
  2057. <command xmlns='http://jabber.org/protocol/commands'
  2058. node='http://jabber.org/protocol/admin#edit-motd'
  2059. sessionid='edit-motd:20040408T0337Z'
  2060. status='executing'>
  2061. <x xmlns='jabber:x:data' type='form'>
  2062. <title>Editing the Message of the Day</title>
  2063. <instructions>
  2064. Fill out this form to edit the message of the day.
  2065. </instructions>
  2066. <field type='hidden' var='FORM_TYPE'>
  2067. <value>http://jabber.org/protocol/admin</value>
  2068. </field>
  2069. <field label='Message of the Day'
  2070. type='text-multi'
  2071. var='motd'>
  2072. <required/>
  2073. <value>Don&apos;t forget: the grand re-opening of the</value>
  2074. <value>Globe Theatre will occur tomorrow night.</value>
  2075. <value>The festivities will begin right after tea</value>
  2076. <value>and extend far into the night. Don&apos;t miss it!</value>
  2077. <value>--The Globe Stuff</value>
  2078. </field>
  2079. </x>
  2080. </command>
  2081. </iq>
  2082. ]]></example>
  2083. <example caption='Admin Submits MOTD Form to Service'><![CDATA[
  2084. <iq from='bard@shakespeare.lit/globe'
  2085. id='edit-motd-2'
  2086. to='shakespeare.lit'
  2087. type='edit'
  2088. xml:lang='en'>
  2089. <command xmlns='http://jabber.org/protocol/commands'
  2090. node='http://jabber.org/protocol/admin#edit-motd'
  2091. sessionid='edit-motd:20040408T0337Z'>
  2092. <x xmlns='jabber:x:data' type='submit'>
  2093. <field type='hidden' var='FORM_TYPE'>
  2094. <value>http://jabber.org/protocol/admin</value>
  2095. </field>
  2096. <field var='motd'>
  2097. <value>Don&apos;t forget: the grand re-opening of the</value>
  2098. <value>Globe Theatre will occur tomorrow night.</value>
  2099. <value>The festivities will begin right after tea</value>
  2100. <value>and extend far into the night. Don&apos;t miss it!</value>
  2101. <value>--The Globe Staff</value>
  2102. </field>
  2103. </x>
  2104. </command>
  2105. </iq>
  2106. ]]></example>
  2107. <example caption='Service Informs Admin of Completion'><![CDATA[
  2108. <iq from='shakespeare.lit'
  2109. id='edit-motd-2'
  2110. to='bard@shakespeare.lit/globe'
  2111. type='result'
  2112. xml:lang='en'>
  2113. <command xmlns='http://jabber.org/protocol/commands'
  2114. node='http://jabber.org/protocol/admin#edit-motd'
  2115. sessionid='edit-motd:20040408T0337Z'
  2116. status='completed'/>
  2117. </iq>
  2118. ]]></example>
  2119. </section2>
  2120. <section2 topic='Delete Message of the Day' anchor='delete-motd'>
  2121. <p>Sometimes a previously-set "message of the day" is no longer appropriate and needs to be deleted. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#delete-motd".</p>
  2122. <p>A sample protocol flow for this use case is shown below.</p>
  2123. <example caption='Admin Deletes Message of the Day'><![CDATA[
  2124. <iq from='bard@shakespeare.lit/globe'
  2125. id='delete-motd-1'
  2126. to='shakespeare.lit'
  2127. type='set'
  2128. xml:lang='en'>
  2129. <command xmlns='http://jabber.org/protocol/commands'
  2130. action='execute'
  2131. node='http://jabber.org/protocol/admin#delete-motd'/>
  2132. </iq>
  2133. ]]></example>
  2134. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD simply delete the message of the day.</p>
  2135. <example caption='Service Informs Admin of Completion'><![CDATA[
  2136. <iq from='shakespeare.lit'
  2137. id='delete-motd-2'
  2138. to='bard@shakespeare.lit/globe'
  2139. type='result'
  2140. xml:lang='en'>
  2141. <command xmlns='http://jabber.org/protocol/commands'
  2142. node='http://jabber.org/protocol/admin#delete-motd'
  2143. sessionid='delete-motd:20040408T0337Z'
  2144. status='completed'/>
  2145. </iq>
  2146. ]]></example>
  2147. </section2>
  2148. <section2 topic='Set Welcome Message' anchor='set-welcome'>
  2149. <p>Some existing Jabber servers send an informative "welcome message" to newly registered users of the server when they first log in; this concept can be extended to any service (such as a multi-user chat service or a gateway to a foreign IM service). The command node for this use case SHOULD be "http://jabber.org/protocol/admin#set-welcome".</p>
  2150. <p>A sample protocol flow for this use case is shown below.</p>
  2151. <example caption='Admin Sets Welcome Message'><![CDATA[
  2152. <iq from='bard@shakespeare.lit/globe'
  2153. id='set-welcome-1'
  2154. to='shakespeare.lit'
  2155. type='set'
  2156. xml:lang='en'>
  2157. <command xmlns='http://jabber.org/protocol/commands'
  2158. action='execute'
  2159. node='http://jabber.org/protocol/admin#set-welcome'/>
  2160. </iq>
  2161. ]]></example>
  2162. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form, which SHOULD include the current welcome message if one has already been set.</p>
  2163. <example caption='Service Returns Welcome Message Form to Admin'><![CDATA[
  2164. <iq from='shakespeare.lit'
  2165. id='set-welcome-1'
  2166. to='bard@shakespeare.lit/globe'
  2167. type='result'
  2168. xml:lang='en'>
  2169. <command xmlns='http://jabber.org/protocol/commands'
  2170. node='http://jabber.org/protocol/admin#set-welcome'
  2171. sessionid='set-welcome:20040408T0337Z'
  2172. status='executing'>
  2173. <x xmlns='jabber:x:data' type='form'>
  2174. <title>Setting Welcome Message</title>
  2175. <instructions>
  2176. Fill out this form to set the welcome message
  2177. for this service.
  2178. </instructions>
  2179. <field type='hidden' var='FORM_TYPE'>
  2180. <value>http://jabber.org/protocol/admin</value>
  2181. </field>
  2182. <field label='Welcome Message'
  2183. type='text-multi'
  2184. var='welcome'>
  2185. <required/>
  2186. <value>Welcome to Shakespeare.lit, your home for</value>
  2187. <value>instant messaging with a literary touch.</value>
  2188. </field>
  2189. </x>
  2190. </command>
  2191. </iq>
  2192. ]]></example>
  2193. <example caption='Admin Submits Welcome Message Form to Service'><![CDATA[
  2194. <iq from='bard@shakespeare.lit/globe'
  2195. id='set-welcome-2'
  2196. to='shakespeare.lit'
  2197. type='set'
  2198. xml:lang='en'>
  2199. <command xmlns='http://jabber.org/protocol/commands'
  2200. node='http://jabber.org/protocol/admin#set-welcome'
  2201. sessionid='set-welcome:20040408T0337Z'>
  2202. <x xmlns='jabber:x:data' type='submit'>
  2203. <field type='hidden' var='FORM_TYPE'>
  2204. <value>http://jabber.org/protocol/admin</value>
  2205. </field>
  2206. <field var='welcome'>
  2207. <value>Welcome to Shakespeare.lit, your home for</value>
  2208. <value>instant messaging with a literary touch.</value>
  2209. <value>For helpful information about this service,</value>
  2210. <value>hie thee to http://www.shakespeare.lit/</value>
  2211. </field>
  2212. </x>
  2213. </command>
  2214. </iq>
  2215. ]]></example>
  2216. <example caption='Service Informs Admin of Completion'><![CDATA[
  2217. <iq from='shakespeare.lit'
  2218. id='set-welcome-2'
  2219. to='bard@shakespeare.lit/globe'
  2220. type='result'
  2221. xml:lang='en'>
  2222. <command xmlns='http://jabber.org/protocol/commands'
  2223. node='http://jabber.org/protocol/admin#set-welcome'
  2224. sessionid='set-welcome:20040408T0337Z'
  2225. status='completed'/>
  2226. </iq>
  2227. ]]></example>
  2228. </section2>
  2229. <section2 topic='Delete Welcome Message' anchor='delete-welcome'>
  2230. <p>Sometimes a previously-set "welcome message" is no longer appropriate and needs to be deleted. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#delete-welcome".</p>
  2231. <p>A sample protocol flow for this use case is shown below.</p>
  2232. <example caption='Admin Deletes Welcome Message'><![CDATA[
  2233. <iq from='bard@shakespeare.lit/globe'
  2234. id='delete-welcome-1'
  2235. to='shakespeare.lit'
  2236. type='set'
  2237. xml:lang='en'>
  2238. <command xmlns='http://jabber.org/protocol/commands'
  2239. action='execute'
  2240. node='http://jabber.org/protocol/admin#delete-welcome'/>
  2241. </iq>
  2242. ]]></example>
  2243. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD simply delete the welcome message.</p>
  2244. <example caption='Service Informs Admin of Completion'><![CDATA[
  2245. <iq from='shakespeare.lit'
  2246. id='delete-welcome-2'
  2247. to='bard@shakespeare.lit/globe'
  2248. type='result'
  2249. xml:lang='en'>
  2250. <command xmlns='http://jabber.org/protocol/commands'
  2251. node='http://jabber.org/protocol/admin#delete-welcome'
  2252. sessionid='delete-welcome:20040408T0337Z'
  2253. status='completed'/>
  2254. </iq>
  2255. ]]></example>
  2256. </section2>
  2257. <section2 topic='Edit Admin List' anchor='edit-admin'>
  2258. <p>An administrator may want to directly edit the list of users who have administrative privileges. Whether there are distinctions between service-level administrators (e.g., owner, admin, moderator), and thus in what types of administrators are allowed to edit administrative privileges, is a matter for the implementation or local service policy and is not specified herein. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#edit-admin".</p>
  2259. <p>A sample protocol flow for this use case is shown below.</p>
  2260. <example caption='Admin Requests Editing of Admin List'><![CDATA[
  2261. <iq from='bard@shakespeare.lit/globe'
  2262. id='edit-admin-1'
  2263. to='shakespeare.lit'
  2264. type='set'
  2265. xml:lang='en'>
  2266. <command xmlns='http://jabber.org/protocol/commands'
  2267. action='execute'
  2268. node='http://jabber.org/protocol/admin#edit-admin'/>
  2269. </iq>
  2270. ]]></example>
  2271. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  2272. <example caption='Service Returns Edit Admin List Form to Admin'><![CDATA[
  2273. <iq from='shakespeare.lit'
  2274. id='edit-admin-1'
  2275. to='bard@shakespeare.lit/globe'
  2276. type='result'
  2277. xml:lang='en'>
  2278. <command xmlns='http://jabber.org/protocol/commands'
  2279. node='http://jabber.org/protocol/admin#edit-admin'
  2280. sessionid='edit-admin:20040408T0337Z'
  2281. status='executing'>
  2282. <x xmlns='jabber:x:data' type='form'>
  2283. <title>Editing the Admin List</title>
  2284. <instructions>
  2285. Fill out this form to edit the list of entities who
  2286. have administrative privileges.
  2287. </instructions>
  2288. <field type='hidden' var='FORM_TYPE'>
  2289. <value>http://jabber.org/protocol/admin</value>
  2290. </field>
  2291. <field label='The admin list'
  2292. type='jid-multi'
  2293. var='adminjids'>
  2294. <value>bard@shakespeare.lit</value>
  2295. <value>chris@marlowe.lit</value>
  2296. </field>
  2297. </x>
  2298. </command>
  2299. </iq>
  2300. ]]></example>
  2301. <example caption='Admin Submits Edit Admin List Form to Service'><![CDATA[
  2302. <iq from='bard@shakespeare.lit/globe'
  2303. id='edit-admin-2'
  2304. to='shakespeare.lit'
  2305. type='set'
  2306. xml:lang='en'>
  2307. <command xmlns='http://jabber.org/protocol/commands'
  2308. node='http://jabber.org/protocol/admin#edit-admin'
  2309. sessionid='edit-admin:20040408T0337Z'>
  2310. <x xmlns='jabber:x:data' type='submit'>
  2311. <field type='hidden' var='FORM_TYPE'>
  2312. <value>http://jabber.org/protocol/admin</value>
  2313. </field>
  2314. <field var='adminjids'>
  2315. <value>bard@shakespeare.lit</value>
  2316. <value>hecate@shakespeare.lit</value>
  2317. </field>
  2318. </x>
  2319. </command>
  2320. </iq>
  2321. ]]></example>
  2322. <example caption='Service Informs Admin of Completion'><![CDATA[
  2323. <iq from='shakespeare.lit'
  2324. id='edit-admin-2'
  2325. to='bard@shakespeare.lit/globe'
  2326. type='result'
  2327. xml:lang='en'>
  2328. <command xmlns='http://jabber.org/protocol/commands'
  2329. node='http://jabber.org/protocol/admin#edit-admin'
  2330. sessionid='edit-admin:20040408T0337Z'
  2331. status='completed'/>
  2332. </iq>
  2333. ]]></example>
  2334. </section2>
  2335. <section2 topic='Restart Service' anchor='restart'>
  2336. <p>A service may allow an administrator to restart the service. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#restart".</p>
  2337. <p>A sample protocol flow for this use case is shown below.</p>
  2338. <example caption='Admin Requests Restart of Service'><![CDATA[
  2339. <iq from='bard@shakespeare.lit/globe'
  2340. id='restart-1'
  2341. to='shakespeare.lit'
  2342. type='set'
  2343. xml:lang='en'>
  2344. <command xmlns='http://jabber.org/protocol/commands'
  2345. action='execute'
  2346. node='http://jabber.org/protocol/admin#restart'/>
  2347. </iq>
  2348. ]]></example>
  2349. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  2350. <example caption='Service Returns Restart Form to Admin'><![CDATA[
  2351. <iq from='shakespeare.lit'
  2352. id='restart-1'
  2353. to='bard@shakespeare.lit/globe'
  2354. type='result'
  2355. xml:lang='en'>
  2356. <command xmlns='http://jabber.org/protocol/commands'
  2357. node='http://jabber.org/protocol/admin#restart'
  2358. sessionid='restart:20040408T0337Z'
  2359. status='executing'>
  2360. <x xmlns='jabber:x:data' type='form'>
  2361. <title>Restarting the Service</title>
  2362. <instructions>Fill out this form to restart the service.</instructions>
  2363. <field type='hidden' var='FORM_TYPE'>
  2364. <value>http://jabber.org/protocol/admin</value>
  2365. </field>
  2366. <field label='Time delay before restarting'
  2367. type='list-single'
  2368. var='delay'>
  2369. <option label='30 seconds'><value>30</value></option>
  2370. <option label='60 seconds'><value>60</value></option>
  2371. <option label='90 seconds'><value>90</value></option>
  2372. <option label='2 minutes'><value>120</value></option>
  2373. <option label='3 minutes'><value>180</value></option>
  2374. <option label='4 minutes'><value>240</value></option>
  2375. <option label='5 minutes'><value>300</value></option>
  2376. </field>
  2377. <field label='Announcement'
  2378. type='text-multi'
  2379. var='announcement'/>
  2380. </x>
  2381. </command>
  2382. </iq>
  2383. ]]></example>
  2384. <example caption='Admin Submits Restart Form to Service'><![CDATA[
  2385. <iq from='bard@shakespeare.lit/globe'
  2386. id='restart-2'
  2387. to='shakespeare.lit'
  2388. type='set'
  2389. xml:lang='en'>
  2390. <command xmlns='http://jabber.org/protocol/commands'
  2391. node='http://jabber.org/protocol/admin#restart'
  2392. sessionid='restart:20040408T0337Z'>
  2393. <x xmlns='jabber:x:data' type='submit'>
  2394. <field type='hidden' var='FORM_TYPE'>
  2395. <value>http://jabber.org/protocol/admin</value>
  2396. </field>
  2397. <field var='delay'>
  2398. <value>120</value>
  2399. </field>
  2400. <field var='announcement'>
  2401. <value>The service will be restarted in 2 minutes!</value>
  2402. <value>Please log off now. --The Admins</value>
  2403. </field>
  2404. </x>
  2405. </command>
  2406. </iq>
  2407. ]]></example>
  2408. <example caption='Service Informs Admin of Completion'><![CDATA[
  2409. <iq from='shakespeare.lit'
  2410. id='restart-2'
  2411. to='bard@shakespeare.lit/globe'
  2412. type='result'
  2413. xml:lang='en'>
  2414. <command xmlns='http://jabber.org/protocol/commands'
  2415. node='http://jabber.org/protocol/admin#restart'
  2416. sessionid='restart:20040408T0337Z'
  2417. status='completed'/>
  2418. </iq>
  2419. ]]></example>
  2420. </section2>
  2421. <section2 topic='Shut Down Service' anchor='shutdown'>
  2422. <p>A service may allow an administrator to shut down the service. The command node for this use case SHOULD be "http://jabber.org/protocol/admin#shutdown".</p>
  2423. <p>A sample protocol flow for this use case is shown below.</p>
  2424. <example caption='Admin Requests Shut Down of Service'><![CDATA[
  2425. <iq from='bard@shakespeare.lit/globe'
  2426. id='shutdown-1'
  2427. to='shakespeare.lit'
  2428. type='set'
  2429. xml:lang='en'>
  2430. <command xmlns='http://jabber.org/protocol/commands'
  2431. action='execute'
  2432. node='http://jabber.org/protocol/admin#shutdown'/>
  2433. </iq>
  2434. ]]></example>
  2435. <p>Unless an error occurs (see the <link url='#errors'>Error Handling</link> section below), the service SHOULD return the appropriate form.</p>
  2436. <example caption='Service Returns Shut Down Form to Admin'><![CDATA[
  2437. <iq from='shakespeare.lit'
  2438. id='shutdown-1'
  2439. to='bard@shakespeare.lit/globe'
  2440. type='result'
  2441. xml:lang='en'>
  2442. <command xmlns='http://jabber.org/protocol/commands'
  2443. node='http://jabber.org/protocol/admin#shutdown'
  2444. sessionid='shutdown:20040408T0337Z'
  2445. status='executing'>
  2446. <x xmlns='jabber:x:data' type='form'>
  2447. <title>Shutting Down the Service</title>
  2448. <instructions>Fill out this form to shut down the service.</instructions>
  2449. <field type='hidden' var='FORM_TYPE'>
  2450. <value>http://jabber.org/protocol/admin</value>
  2451. </field>
  2452. <field label='Time delay before shutting down'
  2453. type='list-single'
  2454. var='delay'>
  2455. <option label='30 seconds'><value>30</value></option>
  2456. <option label='60 seconds'><value>60</value></option>
  2457. <option label='90 seconds'><value>90</value></option>
  2458. <option label='2 minutes'><value>120</value></option>
  2459. <option label='3 minutes'><value>180</value></option>
  2460. <option label='4 minutes'><value>240</value></option>
  2461. <option label='5 minutes'><value>300</value></option>
  2462. </field>
  2463. <field label='Announcement'
  2464. type='text-multi'
  2465. var='announcement'/>
  2466. </x>
  2467. </command>
  2468. </iq>
  2469. ]]></example>
  2470. <example caption='Admin Submits Shut Down Form to Service'><![CDATA[
  2471. <iq from='bard@shakespeare.lit/globe'
  2472. id='shutdown-2'
  2473. to='shakespeare.lit'
  2474. type='set'
  2475. xml:lang='en'>
  2476. <command xmlns='http://jabber.org/protocol/commands'
  2477. node='http://jabber.org/protocol/admin#shutdown'
  2478. sessionid='shutdown:20040408T0337Z'>
  2479. <x xmlns='jabber:x:data' type='submit'>
  2480. <field type='hidden' var='FORM_TYPE'>
  2481. <value>http://jabber.org/protocol/admin</value>
  2482. </field>
  2483. <field var='delay'>
  2484. <value>120</value>
  2485. </field>
  2486. <field var='announcement'>
  2487. <value>The service will be shut down in 2 minutes!</value>
  2488. <value>Please log off now. --The Admins</value>
  2489. </field>
  2490. </x>
  2491. </command>
  2492. </iq>
  2493. ]]></example>
  2494. <example caption='Service Informs Admin of Completion'><![CDATA[
  2495. <iq from='shakespeare.lit'
  2496. id='shutdown-2'
  2497. to='bard@shakespeare.lit/globe'
  2498. type='result'
  2499. xml:lang='en'>
  2500. <command xmlns='http://jabber.org/protocol/commands'
  2501. node='http://jabber.org/protocol/admin#shutdown'
  2502. sessionid='shutdown:20040408T0337Z'
  2503. status='completed'/>
  2504. </iq>
  2505. ]]></example>
  2506. </section2>
  2507. </section1>
  2508. <section1 topic='Error Handling' anchor='errors'>
  2509. <p>Several error conditions are possible when an entity sends a command request to the service, as defined in the following table. If one of these error conditions occurs, the service MUST return an error stanza to the requesting entity.</p>
  2510. <table caption='Error Conditions'>
  2511. <tr>
  2512. <th>Condition</th>
  2513. <th>Cause</th>
  2514. </tr>
  2515. <tr>
  2516. <td>&conflict;</td>
  2517. <td>The command cannot be completed because of a data or system conflict (e.g., a user already exists with that username).</td>
  2518. </tr>
  2519. <tr>
  2520. <td>&feature;</td>
  2521. <td>The specific command is not supported (even though the ad-hoc commands protocol is).</td>
  2522. </tr>
  2523. <tr>
  2524. <td>&forbidden;</td>
  2525. <td>The requesting entity does not have sufficient privileges to perform the command.</td>
  2526. </tr>
  2527. <tr>
  2528. <td>&notallowed;</td>
  2529. <td>No entity is allowed to perform the command (e.g., retrieve the CEO's roster).</td>
  2530. </tr>
  2531. <tr>
  2532. <td>&unavailable;</td>
  2533. <td>The ad-hoc commands protocol is not supported.</td>
  2534. </tr>
  2535. </table>
  2536. <p>For the syntax of these errors, see &xep0086;. Naturally, other errors may be returned as well (e.g., &internalserver; if the service cannot be shut down).</p>
  2537. </section1>
  2538. <section1 topic='Security Considerations' anchor='security'>
  2539. <p>The ability to complete the administrative tasks specified herein MUST NOT be granted to users who lack service-level administrative privileges.</p>
  2540. </section1>
  2541. <section1 topic='IANA Considerations' anchor='iana'>
  2542. <p>This document requires no interaction with &IANA;.</p>
  2543. </section1>
  2544. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  2545. <p>The &REGISTRAR; shall include the following information in its registries.</p>
  2546. <section2 topic='Protocol Namespaces' anchor='registrar-protocol'>
  2547. <p>The XMPP Registrar includes "http://jabber.org/protocol/admin" in its registry of protocol namespaces.</p>
  2548. </section2>
  2549. <section2 topic='Field Standardization' anchor='registrar-formtype'>
  2550. <p>&xep0068; defines a process for standardizing the fields used within Data Forms scoped by a particular namespace. The reserved fields for the 'http://jabber.org/protocol/admin' namespace are specified below.</p>
  2551. <code caption='Registry Submission'><![CDATA[
  2552. <form_type>
  2553. <name>http://jabber.org/protocol/admin</name>
  2554. <doc>XEP-0133</doc>
  2555. <desc>Forms used for administration of servers and components.</desc>
  2556. <field var='accountjid'
  2557. type='jid-single'
  2558. label='The Jabber ID of a single entity to which an operation applies'/>
  2559. <field var='accountjids'
  2560. type='jid-multi'
  2561. label='The Jabber ID of one or more entities to which an operation applies'/>
  2562. <field var='activeuserjids'
  2563. type='jid-multi'
  2564. label='The Jabber IDs associated with active sessions'/>
  2565. <field var='activeusersnum'
  2566. type='text-single'
  2567. label='The number of online entities that are active'/>
  2568. <field var='adminjids'
  2569. type='jid-multi'
  2570. label='A list of entities with administrative privileges'/>
  2571. <field var='announcement'
  2572. type='text-multi'
  2573. label='The text of an announcement to be sent to active users or all users'/>
  2574. <field var='blacklistjids'
  2575. type='jid-multi'
  2576. label='A list of entities with whom communication is blocked'/>
  2577. <field var='delay'
  2578. type='list-multi'
  2579. label='The number of seconds to delay before applying a change'/>
  2580. <field var='disableduserjids'
  2581. type='jid-multi'
  2582. label='The Jabber IDs that have been disabled'/>
  2583. <field var='disabledusersnum'
  2584. type='text-single'
  2585. label='The number of disabled entities'/>
  2586. <field var='email'
  2587. type='text-single'
  2588. label='The email address for a user'/>
  2589. <field var='given_name'
  2590. type='text-single'
  2591. label='The given (first) name of a user'/>
  2592. <field var='idleusersnum'
  2593. type='text-single'
  2594. label='The number of online entities that are idle'/>
  2595. <field var='ipaddresses'
  2596. type='list-multi'
  2597. label='The IP addresses of an account&apos;s online sessions'/>
  2598. <field var='lastlogin'
  2599. type='text-single'
  2600. label='The last login time (per XEP-0082) of a user'/>
  2601. <field var='loginsperminute'
  2602. type='text-single'
  2603. label='The number of logins per minute for an account'/>
  2604. <field var='max_items'
  2605. type='list-single'
  2606. label='The maximum number of items associated with a search or list'/>
  2607. <field var='motd'
  2608. type='text-multi'
  2609. label='The text of a message of the day'/>
  2610. <field var='onlineresources'
  2611. type='text-single'
  2612. label='The names of an account&apos;s online sessions'/>
  2613. <field var='onlineuserjids'
  2614. type='jid-multi'
  2615. label='The Jabber IDs associated with online users'/>
  2616. <field var='onlineusersnum'
  2617. type='text-single'
  2618. label='The number of online entities'/>
  2619. <field var='password'
  2620. type='text-private'
  2621. label='The password for an account'/>
  2622. <field var='password-verify'
  2623. type='text-private'
  2624. label='Password verification'/>
  2625. <field var='registereduserjids'
  2626. type='jid-multi'
  2627. label='A list of registered entities'/>
  2628. <field var='registeredusersnum'
  2629. type='text-single'
  2630. label='The number of registered entities'/>
  2631. <field var='rostersize'
  2632. type='text-single'
  2633. label='Number of roster items for an account'/>
  2634. <field var='stanzaspersecond'
  2635. type='text-single'
  2636. label='The number of stanzas being sent per second by an account'/>
  2637. <field var='surname'
  2638. type='text-single'
  2639. label='The family (last) name of a user'/>
  2640. <field var='welcome'
  2641. type='text-multi'
  2642. label='The text of a welcome message'/>
  2643. <field var='whitelistjids'
  2644. type='jid-multi'
  2645. label='A list of entities with whom communication is allowed'/>
  2646. </form_type>
  2647. ]]></code>
  2648. </section2>
  2649. </section1>
  2650. <section1 topic='XML Schema'>
  2651. <p>Because the protocol defined here is a profile of <cite>XEP-0050: Ad-Hoc Commands</cite>, no schema definition is needed.</p>
  2652. </section1>
  2653. </xep>