comparison xmpp/xep-proto-namespace-delegation.xml @ 34:db9316a75306

XEP: updated privileged entity according to discussions following the council's veto (see http://mail.jabber.org/pipermail/standards/2014-December/029378.html): - Big simplification and restriction following council's veto and standard@ discussions - Configuration is not done only on server own configuration - No more client mode - Permissions are adverised using <message/> - The only <iq/> privilege still available is jabber:iq:roster
author Goffi <goffi@goffi.org>
date Thu, 18 Dec 2014 17:48:26 +0100
parents b70084aa0af7
children
comparison
equal deleted inserted replaced
33:b70084aa0af7 34:db9316a75306
33 <surname>Poisson</surname> 33 <surname>Poisson</surname>
34 <email>goffi@goffi.org</email> 34 <email>goffi@goffi.org</email>
35 <jid>goffi@jabber.fr</jid> 35 <jid>goffi@jabber.fr</jid>
36 </author> 36 </author>
37 <revision> 37 <revision>
38 <version>0.0.2</version>
39 <date>2014-11-27</date>
40 <initials>jp</initials>
41 <remark><p></p></remark>
42 </revision>
43 <revision>
38 <version>0.0.1</version> 44 <version>0.0.1</version>
39 <date>2014-11-13</date> 45 <date>2014-11-13</date>
40 <initials>jp</initials> 46 <initials>jp</initials>
41 <remark><p>First draft.</p></remark> 47 <remark><p>First draft.</p></remark>
42 </revision> 48 </revision>
70 </section1> 76 </section1>
71 <section1 topic='Admin Mode Use Cases' anchor='admin_usecases'> 77 <section1 topic='Admin Mode Use Cases' anchor='admin_usecases'>
72 78
73 <section2 topic='Delegation Request Use Case' anchor='admin_perm'> 79 <section2 topic='Delegation Request Use Case' anchor='admin_perm'>
74 <section3 topic='Entity Requests Namespace Delegation' anchor='req_delegation'> 80 <section3 topic='Entity Requests Namespace Delegation' anchor='req_delegation'>
75 <p>Once the managing entity is authenticated and stream is started, the entity can request to manage a namespace. It does it by sending an &IQ; stanza with <strong>'urn:xmpp:delegation:0'</strong> namespace. The &QUERY; element MUST have a type of value "request" and MAY have a 'delegation' attribute with the value "admin".</p> 81 <p>Once the managing entity is authenticated and stream is started, the entity can request to manage a namespace. It does it by sending an &IQ; stanza with <strong>'urn:xmpp:delegation:0'</strong> namespace. The &QUERY; element MAY have a 'delegation' attribute with the value "admin".</p>
76 <p>Namespace delegations are asked with a &lt;delegate/&gt; element, which MUST contain a 'namespace' attribute set to the requested namespace.</p> 82 <p>Namespace delegations are asked with a &lt;delegate/&gt; element, which MUST contain a 'namespace' attribute set to the requested namespace.</p>
77 <p>Only &lt;iq/&gt; stanza namespaces can be delegated.</p> 83 <p>Only &lt;iq/&gt; stanza namespaces can be delegated.</p>
78 <example caption='entity asks for delegation in admin mode'><![CDATA[ 84 <example caption='entity asks for delegation in admin mode'><![CDATA[
79 <iq from='pubsub.capulet.lit' type='get' id='delegation1'> 85 <iq from='pubsub.capulet.lit' type='get' id='delegation1'>
80 <query xmlns='urn:xmpp:delegation:0' type='request' delegation='admin'> 86 <query xmlns='urn:xmpp:delegation:0' delegation='admin'>
81 <delegate namespace='jabber:iq:roster'/> 87 <delegate namespace='jabber:iq:roster'/>
82 <delegate namespace='http://jabber.org/protocol/pubsub'/> 88 <delegate namespace='http://jabber.org/protocol/pubsub'/>
83 </query> 89 </query>
84 </iq> 90 </iq>
85 ]]></example> 91 ]]></example>
86 </section3> 92 </section3>
87 <section3 topic='Server Accepts Namespace Delegation' anchor='accept_delegation'> 93 <section3 topic='Server Accepts Namespace Delegation' anchor='accept_delegation'>
88 <p>If the server accepts the delegation (e.g.: namespace mapping specified in configuration), it MUST return an &IQ; result stanza, with allowed delegations in &lt;delegate&gt; elements:</p> 94 <p>If the server accepts the delegation (e.g.: namespace mapping specified in configuration), it MUST return an &IQ; result stanza, with allowed delegations in &lt;delegate&gt; elements:</p>
89 <example caption='server accept namespace delegations'><![CDATA[ 95 <example caption='server accept namespace delegations'><![CDATA[
90 <iq from='capulet.lit' to='pubsub.capulet.lit' type='result' id='delegation1'> 96 <iq from='capulet.lit' to='pubsub.capulet.lit' type='result' id='delegation1'>
91 <query xmlns='urn:xmpp:delegation:0' type='allowed'> 97 <query xmlns='urn:xmpp:delegation:0'>
92 <delegate namespace='jabber:iq:roster'> 98 <delegate namespace='jabber:iq:roster'>
93 <delegate namespace='http://jabber.org/protocol/pubsub'> 99 <delegate namespace='http://jabber.org/protocol/pubsub'>
94 </query> 100 </query>
95 </iq> 101 </iq>
96 ]]></example> 102 ]]></example>
254 <p>If an entity want to manage PEP service for Juliet, it can ask the delegation like this: 260 <p>If an entity want to manage PEP service for Juliet, it can ask the delegation like this:
255 </p> 261 </p>
256 <example caption='managing entity asks for namespace delegation for one particular entity'><![CDATA[ 262 <example caption='managing entity asks for namespace delegation for one particular entity'><![CDATA[
257 <iq from='pubsub.montaigu.lit' to='capulet.lit' type='get' id='delegation1'> 263 <iq from='pubsub.montaigu.lit' to='capulet.lit' type='get' id='delegation1'>
258 <query xmlns='urn:xmpp:delegation:0' 264 <query xmlns='urn:xmpp:delegation:0'
259 type='request'
260 delegation='client' 265 delegation='client'
261 to='juliet@capulet.lit'> 266 to='juliet@capulet.lit'>
262 <delegate namespace='http://jabber.org/protocol/pubsub'/> 267 <delegate namespace='http://jabber.org/protocol/pubsub'/>
263 </query> 268 </query>
264 </iq> 269 </iq>
304 <field var='http://jabber.org/protocol/pubsub'><value>1</value></field> 309 <field var='http://jabber.org/protocol/pubsub'><value>1</value></field>
305 </x> 310 </x>
306 </message> 311 </message>
307 ]]></example> 312 ]]></example>
308 <p>Here Juliet allows <em>pubsub.montaigu.lit</em> to manage the PubSub (and then PEP) service.</p> 313 <p>Here Juliet allows <em>pubsub.montaigu.lit</em> to manage the PubSub (and then PEP) service.</p>
309 <p>Finaly, the server notifies the entity of the granted delegation. For this it uses a &QUERY; element with the 'allowed' type, and puts the client JID in a 'from' attribute:</p> 314 <p>Finaly, the server notifies the entity of the granted delegation. For this it uses a &QUERY; element with the client JID in a 'from' attribute:</p>
310 <example caption='server notify accepted delegations'><![CDATA[ 315 <example caption='server notify accepted delegations'><![CDATA[
311 <iq from='capulet.lit' to='pubsub.montaigu.lit' type='set' id='delegation2'> 316 <iq from='capulet.lit' to='pubsub.montaigu.lit' type='set' id='delegation2'>
312 <query xmlns='urn:xmpp:delegation:0' 317 <query xmlns='urn:xmpp:delegation:0' from='juliet@capulet.lit'>
313 type='allowed'
314 from='juliet@capulet.lit'>
315 <delegate namespace='http://jabber.org/protocol/pubsub'/> 318 <delegate namespace='http://jabber.org/protocol/pubsub'/>
316 </query> 319 </query>
317 </iq> 320 </iq>
318 ]]></example> 321 ]]></example>
319 <p>The managing entity can now manage the namespace the same way as in <link url='#stanza_forward'>admin mode</link>.</p> 322 <p>The managing entity can now manage the namespace the same way as in <link url='#stanza_forward'>admin mode</link>.</p>
539 xmlns='urn:xmpp:delegation:0' 542 xmlns='urn:xmpp:delegation:0'
540 elementFormDefault='qualified'> 543 elementFormDefault='qualified'>
541 544
542 <xs:element name='query'> 545 <xs:element name='query'>
543 <xs:complexType> 546 <xs:complexType>
544 <xs:attribute name='type' use='required'>
545 <xs:simpleType base='xs:NMTOKEN'>
546 <xs:enumeration value='request'/>
547 <xs:enumeration value='allowed'/>
548 </xs:simpleType>
549 </xs:attribute>
550 <xs:attribute name='delegation' use='optional'> 547 <xs:attribute name='delegation' use='optional'>
551 <xs:simpleType base='xs:NMTOKEN'> 548 <xs:simpleType base='xs:NMTOKEN'>
552 <xs:enumeration value='admin'/> 549 <xs:enumeration value='admin'/>
553 <xs:enumeration value='client'/> 550 <xs:enumeration value='client'/>
554 </xs:simpleType> 551 </xs:simpleType>