annotate xmpp/xep-proto-privileged-component.xml @ 7:b01ee1b28680

launching script handles "salut" component
author souliane <souliane@mailoo.org>
date Thu, 24 Jul 2014 12:25:27 +0200
parents 677de998f9d9
children c6824592e3ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
1 <?xml version='1.0' encoding='UTF-8'?>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
2 <!DOCTYPE xep SYSTEM 'xep.dtd' [
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
3 <!ENTITY % ents SYSTEM 'xep.ent'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
4 %ents;
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
5 ]>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
6 <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
7 <xep>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
8 <header>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
9 <title>privileged component</title>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
10 <abstract>This specification provides a way for XMPP components to have a privileged access to entities data</abstract>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
11 <legal>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
12 <copyright>This XMPP Extension Protocol is copyright (c) 1999 - 2014 by the XMPP Standards Foundation (XSF).</copyright>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
13 <permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the &quot;Specification&quot;), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
14 <warranty>## NOTE WELL: This Specification is provided on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##</warranty>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
15 <liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
16 <conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at &lt;<link url='http://xmpp.org/extensions/ipr-policy.shtml'>http://xmpp.org/extensions/ipr-policy.shtml</link>&gt; or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).</conformance>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
17 </legal>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
18 <number>xxxx</number>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
19 <status>ProtoXEP</status>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
20 <type>Standards Track</type>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <sig>Standards</sig>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
22 <approver>Council</approver>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
23 <dependencies>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
24 <spec>XMPP Core</spec>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
25 <spec>XEP-0114</spec>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
26 <spec>XEP-0004</spec>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
27 </dependencies>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
28 <supersedes/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
29 <supersededby/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
30 <shortname>NOT_YET_ASSIGNED</shortname>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
31 <author>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
32 <firstname>Jérôme</firstname>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
33 <surname>Poisson</surname>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
34 <email>goffi@goffi.org</email>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
35 <jid>goffi@jabber.fr</jid>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
36 </author>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
37 <revision>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
38 <version>0.0.1</version>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
39 <date>2014-05-09</date>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
40 <initials>jp</initials>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
41 <remark><p>First draft.</p></remark>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
42 </revision>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
43 </header>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
44 <section1 topic='Introduction' anchor='intro'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
45 <p>XMPP components are used for long through &xep0114;, but are quite limited: they have a restricted access to other entities data, similar to what a client can do. This is sufficient for components like gateways, but very limiting for more complex components like a PubSub service. The goal of this XEP is to allow a component to have a "privileged" status, and access an entity data with the same privileges than the entity itself, that means send and receive IQ stanzas on its behalf.</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
46 <p>Privileged component have numerous advantages, including:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
47 <ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
48 <li>a step forward in decentralization: it is possible for a component to do tasks which were before reserved to server itself. For example, a privileged pubsub component can offer roster access model</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
49 <li>better integration of component: a gateway can add items to an entity roster itslef</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
50 <li>possibility to overpass a server limitation</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
51 <li>quick development cycle: developers can implement the component they need without waiting for a new server release</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
52 <li>server agnostic</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
53 </ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
54 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
55 <section1 topic='Requirements' anchor='reqs'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
56 <p>A privileged component can be used in two modes:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
57 <ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
58 <li><strong>admin</strong> mode, where it is installed by the server administrator</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
59 <li><strong>client</strong> mode, where it can be installed by any user</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
60 </ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
61 <p>In <em>admin</em> mode, the component SHOULD be able to emit IQ stanzas in the same way as any entity, including managing roster or accessing persistent storage</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
62 <p>In <em>client</em> mode, a component MUST have an explicit autorization for any IQ namespace he wants to use. Client MUST be able to check and revoke granted permssions.</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
63 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
64 <section1 topic='Glossary' anchor='glossary'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
65 <ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
66 <li><strong>Component</strong> the privileged component.</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
67 <li><strong>Client</strong> the entity that the component wants to manage.</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
68 </ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
69 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
70 <section1 topic='Admin Mode Use Cases' anchor='admin_usecases'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
71
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
72 <section2 topic='Permission Request Use Case' anchor='admin_perm'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
73 <section3 topic='Component request privileged status of admin' anchor='req_status'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
74 <p>Once the component is authentified and stream is started as explained in &xep0114;, the component can request its privileged status. It do it by sending an IQ stanza with <strong>'urn:xmpp:tmp:privilege:0'</strong> namespace</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
75 <example caption='Component asks for admin privilege'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
76 <iq from='pubsub.capulet.net' type='get' id='privilege1'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
77 <query xmlns='urn:xmpp:tmp:privilege:0' type='request' privilege='admin'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
78 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
79 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
80 </section3>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
81 <section3 topic='Server Accept Admin Privilege' anchor='accept_status'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
82 <p>If the server accept the privileged status (e.g.: admin status specified in configuration), it MUST return empty IQ result stanza:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
83 <example caption='Server accept admin privilege'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
84 <iq from='capulet.net' to='pubsub.capulet.net' type='result' id='privilege1' />
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
85 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
86 </section3>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
87 <section3 topic='Server Reject Admin Privilege' anchor='reject_status'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
88 <p>If the server reject the privileged status, it MUST return a &forbidden; error:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
89 <example caption='Server reject admin privilege'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
90 <iq from='capulet.net' to='pubsub.capulet.net' type='error' id='privilege1'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
91 <error type='cancel'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
92 <forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
93 </error>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
94 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
95 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
96 </section3>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
97 </section2>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
98
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
99 <section2 topic='Privileged Component Send IQ Stanzas' anchor='priv_iq_admin'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
100 <p>Sending an IQ stanzas is done by remplacing the &IQ; with a &lt;privilege/&gt; element of namespace <strong>'urn:xmpp:tmp:privilege:0'</strong>, and including it in a global IQ stanza. The &lt;privilege/&gt; element is then similar to the IQ stanza the client would have sent. In the following example, the PubSub service want to know juliet's roster because she own a node with roster access model:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
101 <example caption='Privileged Component Send A Roster Stanza'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
102 <iq from='pubsub.capulet.net' type='get' id='roster1'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
103 <privilege xmlns='urn:xmpp:tmp:privilege:0'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
104 from='juliet@example.com'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
105 type='get'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
106 <query xmlns='jabber:iq:roster'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
107 </privilege>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
108 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
109 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
110
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
111 <p>The server then answer normaly, as it would have done with the client entity:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
112 <example caption='Server Answer To Privileged Component'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
113 <iq id='roster1'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
114 to='pubsub.caputet.net'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
115 type='result'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
116 <query xmlns='jabber:iq:roster' ver='ver7'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
117 <item jid='nurse@example.com'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
118 <item jid='romeo@example.net'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
119 </query>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
120 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
121 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
122
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
123 <p>In the following example, the sync.capulet.net privileged component want to access client's bookmarks to synchronize them with an online service. It can request the bookmarks in the following way:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
124 <example caption='Privileged Component Request Bookmarks'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
125 <iq from='pubsub.capulet.net' type='get' id='bookmark1'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
126 <privilege xmlns='urn:xmpp:tmp:privilege:0'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
127 from='juliet@capulet.lit'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
128 type='get'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
129 <pubsub xmlns='http://jabber.org/protocol/pubsub'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
130 <items node='storage:bookmarks'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
131 </pubsub>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
132 </privilege>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
133 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
134 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
135 <p>and server answer:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
136
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
137 <example caption='Server Return Bookmarks'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
138 <iq id='bookmark1'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
139 to='pubsub.caputet.net'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
140 type='result'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
141 <pubsub xmlns='http://jabber.org/protocol/pubsub'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
142 <items node='storage:bookmarks'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
143 <item id='current'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
144 <storage xmlns='storage:bookmarks'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
145 <conference name='The Play&apos;s the Thing'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
146 autojoin='true'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
147 jid='theplay@conference.shakespeare.lit'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
148 <nick>JC</nick>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
149 </conference>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
150 </storage>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
151 </item>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
152 </items>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
153 </pubsub>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
154 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
155 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
156 </section2>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
157 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
158
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
159
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
160 <section1 topic='Client Mode Use Cases' anchor='client_usecases'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
161 <section2 topic='Permission Request Use Case' anchor='client_perm'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
162 <p>In <em>client</em> mode, the component is not certified by the server administrator, so the permissions MUST be <strong>explicitly</strong> allowed by the client. This is initiated by the component (it can be after an interaction with a client, like a subscription). It's done in a the same way as for <em>admin</em> mode with the following exceptions:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
163 <ol>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
164 <li>the privilege type is <em>client</em> instead of <em>admin</em></li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
165 <li>the privilege is done per entity, so the entity MUST be specified in a 'to' attribute</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
166 <li>permission are explicitly asked for every needed namespace</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
167 </ol>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
168 <p>Namespace permission are asked with a &lt;perm/&gt; element, which MUST contain a 'xmlns' attribute and a 'type' attribute which can be:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
169 <ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
170 <li><strong>get</strong> the component wants to send &IQ; stanza of type <em>'get'</em></li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
171 <li><strong>set</strong> the component wants to send &IQ; stanza of type <em>'set'</em></li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
172 <li><strong>both</strong> the component wants to send &IQ; stanza of type <em>'get'</em> and <em>'set'</em></li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
173 </ul>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
174 <p>If a component want a read/write access to a client's roster (juliet) and a read only access to her pubsub, it can ask the permission like this:
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
175 </p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
176 <example caption='Component Asks For User Privilege'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
177 <iq from='priv.montaigu.net' to='capulet.net' type='get' id='privilege1'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
178 <query xmlns='urn:xmpp:tmp:privilege:0'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
179 type='request'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
180 privilege='client'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
181 to='juliet@capulet.net'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
182 <perm xmlns='jabber:iq:roster' type='both'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
183 <perm xmlns='http://jabber.org/protocol/pubsub' type='get'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
184 </query>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
185 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
186 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
187 <p>Once received the permission request, the server ask to the client if it grant access to the requested permission using &xep0004;. The form SHOULD allow to fine tune the granted permissions. The server use a challenge which it MUST have generated himself.
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
188 </p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
189 <example caption='Server Asks User For The Permission'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
190 <message from='capulet.net' to='juliet@capulet.net'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
191 <body>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
192 priv.montaigu.net wants some privileges.
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
193 Do you you allow him to use the following features ?
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
194
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
195 Be careful ! According permissions to component is a serious thing,
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
196 think twice that you can trust the component before doing this.
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
197 </body>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
198 <x xmlns='jabber:x:data' type='form'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
199 <title>Privileges request</title>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
200 <instructions>priv.montaigu.net wants to use the following features:
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
201 Do you allow it?</instructions>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
202 <field type='hidden' var='challenge'><value>5439123</value></field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
203 <field type='hidden' var='FORM_TYPE'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
204 <value>urn:xmpp:tmp:privilege:0</value>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
205 </field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
206 <field type='list-single'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
207 label='Manage roster (jabber:iq:roster) READ/WRITE'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
208 var='jabber:iq:roster'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
209 <value>0</value>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
210 <option label='No'><value>0</value></option>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
211 <option label='Read only (get)'><value>get</value></option>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
212 <option label='Write only (set)'><value>set</value></option>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
213 <option label='Read and write (both)'><value>both</value></option>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
214 </field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
215 <field type='list-single'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
216 label='Manage PubSub (http://jabber.org/protocol/pubsub) READ'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
217 var='http://jabber.org/protocol/pubsub'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
218 <value>0</value>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
219 <option label='None'><value>none</value></option>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
220 <option label='Read only (get)'><value>get</value></option>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
221 </field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
222 </x>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
223 </message>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
224 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
225 <p>The server SHOULD include a warning message, SHOULD translate the namespace to human friendly names (and MAY keep the original namespace in addition) and MUST set the default value to '<strong>none</strong>' (permission refused).</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
226 <p>The client can then answer to the form:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
227 <example caption='Client Answer To The Form'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
228 <message from='juliet@capulet.net' to='capulet.net'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
229 <x xmlns='jabber:x:data' type='submit'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
230 <field var='FORM_TYPE'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
231 <value></value>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
232 </field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
233 <field var='challenge'><value>5439123</value></field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
234 <field var='jabber:iq:roster'><value>both</value></field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
235 <field var='http://jabber.org/protocol/pubsub'><value>none</value></field>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
236 </x>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
237 </message>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
238 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
239 <p>Here juliet accept that <em>priv.montaigu.net</em> use 'set' and 'get' to manage her roster, but doesn't want it to do any 'get' on her pubsub nodes.</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
240 <p>Finaly, the server notify the component of the permission granted. For this it use a &QUERY; element with the 'allowed' type, and put the client jid in a 'from' attribute:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
241 <example caption='Server notify accepted permissions'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
242 <iq from='capulet.net' to='priv.montaigu.net' type='set' id='privilege2'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
243 <query xmlns='urn:xmpp:tmp:privilege:0'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
244 type='allowed'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
245 from='juliet@capulet.net'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
246 <perm xmlns='jabber:iq:roster' type='both'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
247 <perm xmlns='http://jabber.org/protocol/pubsub' type='none'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
248 </query>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
249 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
250 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
251 <p>The privileged component can now act according to permission granted to him.</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
252 </section2>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
253 <section2 topic='Privileged Component Send IQ Stanzas' anchor='priv_iq_client'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
254 <p>sending IQ stanza is done in the exact same way as for <link url='#priv_iq_admin'>admin mode</link>. If a component want to sent a non authorized IQ, it get a &forbidden; error:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
255 <example caption='Component Request bookmarks'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
256 <iq from='priv.montaigu.net' to='capulet.net' type='get' id='bookmark1'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
257 <privilege xmlns='urn:xmpp:tmp:privilege:0'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
258 from='juliet@capulet.lit'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
259 type='get'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
260 <pubsub xmlns='http://jabber.org/protocol/pubsub'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
261 <items node='storage:bookmarks'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
262 </pubsub>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
263 </privilege>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
264 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
265 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
266
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
267 <example caption='The Stanza Is Not Autorized !'><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
268 <iq from='capulet.net' to='priv.montaigu.net' type='error' id='bookmark1'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
269 <error type='cancel'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
270 <forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
271 </error>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
272 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
273 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
274 </section2>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
275
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
276 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
277 <section1 topic='Discovering Support' anchor='disco'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
278 <p>If a server or a component supports the component privilege protocol, it MUST report that fact by including a service discovery feature of "urn:xmpp:tmp:privilege:0" in response to a &xep0030; information request:</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
279 <example caption="Service Discovery information request"><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
280 <iq from='pubsub.capulet.net'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
281 id='disco1'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
282 to='capulet.net'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
283 type='get'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
284 <query xmlns='http://jabber.org/protocol/disco#info'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
285 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
286 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
287 <example caption="Service Discovery information response"><![CDATA[
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
288 <iq from='capulet.net'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
289 id='disco1'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
290 to='pubsub.capulet.net'
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
291 type='result'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
292 <query xmlns='http://jabber.org/protocol/disco#info'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
293 ...
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
294 <feature var='urn:xmpp:tmp:privilege:0'/>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
295 ...
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
296 </query>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
297 </iq>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
298 ]]></example>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
299 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
300 <section1 topic='Business Rules' anchor='rules'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
301 <ol>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
302 <li>Server MAY keep permission granted to an component by a client from one session to an other, but if it do so, it MUST provide a way to client to check already granted permission, and revoke them (possibly using &xep0050;).</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
303 <li>If a client can't check or revoke permission (e.g. it doesn't support &xep0050;), the server MUST NOT keep granted permission from one session to an other, and permission will be asked on each new session.</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
304 </ol>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
305 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
306 <section1 topic='Implementation Notes' anchor='impl'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
307 <p>As admin mode is far more easy to implement than client mode, a server MAY choose to only implement the former</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
308 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
309 <section1 topic='Security Considerations' anchor='security'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
310 <ol>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
311 <li>Privileged component nearly have the same possibility as the server itself, <em>admin</em> permission should be granted carefuly, only if you absolutely trust the component.</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
312 <li>A server MAY choose to filter allowed namespaces, to avoid giving dangerous permissions. In this case, it MUST always set the allowed type of filtered namespaces to <strong>none</strong></li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
313
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
314 <li>In case of filtering, a whitelist system is more secure and SHOULD be prefered to a blacklist (idealy, configuration would allow no filtering, whitelist filtering and blacklist filtering)</li>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
315 </ol>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
316 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
317 <section1 topic='IANA Considerations' anchor='iana'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
318 <p>REQUIRED. TODO</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
319 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
320 <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
321 <p>REQUIRED. TODO</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
322 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
323 <section1 topic='XML Schema' anchor='schema'>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
324 <p>REQUIRED for protocol specifications. TODO</p>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
325 </section1>
677de998f9d9 XMPP: added privileged component protoXEP
Goffi <goffi@goffi.org>
parents:
diff changeset
326 </xep>