comparison xmpp/xep-0356.xml @ 43:4c5bd7ddaaca

xep: updated XEP-0356 (privileged entity): Several updates according to feedbacks + review: - added links to PEP and namespace delegation XEPs - removed MUST for default values in configuration - <forwarded/> element is now a child of a <privilege/> element - <perm/> "namespace" attribute has been renamed to "access" - "headline" type restriction for "message" privilege has been removed - "message" permission violation now result in a "forbidden" message error - for "presence" permission, only <presence/> stanza with no type or with a "unavailable" type are sent to privileged entity - added specifitation for "presence" if a managed entity is unavailable and if a privileged entity is available after first <presence/> stanzas have been received - added Business Rules section - Updated namespace to reflect incompatible changes
author Goffi <goffi@goffi.org>
date Mon, 23 Mar 2015 18:41:01 +0100
parents 21d0d0ab7aa0
children
comparison
equal deleted inserted replaced
42:bbb900a768ea 43:4c5bd7ddaaca
25 <surname>Poisson</surname> 25 <surname>Poisson</surname>
26 <email>goffi@goffi.org</email> 26 <email>goffi@goffi.org</email>
27 <jid>goffi@jabber.fr</jid> 27 <jid>goffi@jabber.fr</jid>
28 </author> 28 </author>
29 <revision> 29 <revision>
30 <version>0.2</version>
31 <date>2015-03-23</date>
32 <initials>jp</initials>
33 <remark>
34 <p>Several updates according to feedbacks + review:</p>
35 <ul>
36 <li>added links to PEP and namespace delegation XEPs</li>
37 <li>removed MUST for default values in configuration</li>
38 <li>&lt;forwarded/&gt; element is now a child of a &lt;privilege/&gt; element</li>
39 <li>&lt;perm/&gt; "namespace" attribute has been renamed to "access"</li>
40 <li>"headline" type restriction for "message" privilege has been removed</li>
41 <li>"message" permission violation now result in a "forbidden" message error</li>
42 <li>for "presence" permission, only &PRESENCE; stanza with no type or with a "unavailable" type are sent to privileged entity</li>
43 <li>added specifitation for "presence" if a managed entity is unavailable and if a privileged entity is available after first &PRESENCE; stanzas have been received</li>
44 <li>added Business Rules section</li>
45 <li>Updated namespace to reflect incompatible changes</li>
46 </ul>
47 </remark>
48 </revision>
49 <revision>
30 <version>0.1</version> 50 <version>0.1</version>
31 <date>2015-01-27</date> 51 <date>2015-01-27</date>
32 <initials>XEP Editor (mam)</initials> 52 <initials>XEP Editor (mam)</initials>
33 <remark><p>Initial published version approved by the XMPP Council.</p></remark> 53 <remark><p>Initial published version approved by the XMPP Council.</p></remark>
34 </revision> 54 </revision>
82 <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 or any entity to have a "privileged" status, and access some other entity data with the same privileges than the entity itself, that means manage an entity roster on its behalf, send &MESSAGE; or receive &PRESENCE; stanzas in the name of the server.</p> 102 <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 or any entity to have a "privileged" status, and access some other entity data with the same privileges than the entity itself, that means manage an entity roster on its behalf, send &MESSAGE; or receive &PRESENCE; stanzas in the name of the server.</p>
83 <p>Privileged entities have numerous advantages, including:</p> 103 <p>Privileged entities have numerous advantages, including:</p>
84 <ul> 104 <ul>
85 <li>a step forward in decentralization: it is possible for an entity to do tasks which were before reserved to server itself. For example, a privileged pubsub component can offer access model based on publisher's roster</li> 105 <li>a step forward in decentralization: it is possible for an entity to do tasks which were before reserved to server itself. For example, a privileged pubsub component can offer access model based on publisher's roster</li>
86 <li>better integration of components: a gateway can add items to an entity roster itself</li> 106 <li>better integration of components: a gateway can add items to an entity roster itself</li>
87 <li>possibility to overpass a server limitation (typically: incomplete PEP implementation)</li> 107 <li>possibility to overpass a server limitation (typically: incomplete &xep0163; implementation)</li>
88 <li>quick development cycle: developers can implement the components they need without waiting for a new server release</li> 108 <li>quick development cycle: developers can implement the components they need without waiting for a new server release</li>
89 <li>server agnostic</li> 109 <li>server agnostic</li>
90 </ul> 110 </ul>
91 <p>Privileged entity has been created with the main goal to create an external, server agnostic, PEP service. It is restricted to only a couple of features, see <link url='#acks'>Acknowledgements section</link> for more details</p> 111 <p>Privileged entity has been created with the main goal to create an external, server agnostic, PEP service. It is restricted to only a couple of features, see <link url='#acks'>Acknowledgements section</link> for more details.</p>
112 <p>This XEP is complementary to &xep0355; (and works in a similar way), although they can be used together or separately. To build something like an external PEP service, it is necessary to use both XEPs.</p>
92 </section1> 113 </section1>
93 114
94 <section1 topic='Requirements' anchor='reqs'> 115 <section1 topic='Requirements' anchor='reqs'>
95 <p>A privileged entity must be able to do what a PEP service can do and to access roster, so it must be able to (according to configuration):</p> 116 <p>A privileged entity must be able to do what a PEP service can do and to access roster, so it must be able to (according to configuration):</p>
96 <ul> 117 <ul>
111 <section1 topic='Accessing Roster' anchor='access_roster'> 132 <section1 topic='Accessing Roster' anchor='access_roster'>
112 133
113 <section2 topic='Server Allows Roster Access' anchor='server_roster'> 134 <section2 topic='Server Allows Roster Access' anchor='server_roster'>
114 <p>Roster access is granted in the server configuration. Roster access can have 4 types:</p> 135 <p>Roster access is granted in the server configuration. Roster access can have 4 types:</p>
115 <ul> 136 <ul>
116 <li><strong>none</strong> — the entity is not allowed to access managed entity roster at all. This MUST be the default value.</li> 137 <li><strong>none</strong> — the entity is not allowed to access managed entity roster at all. This is usually the default value.</li>
117 <li><strong>get</strong> — the entity is allowed to send &IQ; stanzas of type <em>'get'</em> for the namespace 'jabber:iq:roster'.</li> 138 <li><strong>get</strong> — the entity is allowed to send &IQ; stanzas of type <em>'get'</em> for the namespace 'jabber:iq:roster'.</li>
118 <li><strong>set</strong> — the entity is allowed to send &IQ; stanzas of type <em>'set'</em> for namespace 'jabber:iq:roster'.</li> 139 <li><strong>set</strong> — the entity is allowed to send &IQ; stanzas of type <em>'set'</em> for namespace 'jabber:iq:roster'.</li>
119 <li><strong>both</strong> — the entity is allowed to send &IQ; stanzas of type <em>'get'</em> and <em>'set'</em> for namespace 'jabber:iq:roster'.</li> 140 <li><strong>both</strong> — the entity is allowed to send &IQ; stanzas of type <em>'get'</em> and <em>'set'</em> for namespace 'jabber:iq:roster'.</li>
120 </ul> 141 </ul>
121 </section2> 142 </section2>
122 143
123 <section2 topic='Server Advertise Entity Of Allowed Permission' anchor='advertise_roster'> 144 <section2 topic='Server Advertises Entity Of Allowed Permission' anchor='advertise_roster'>
124 <p>Once an entity is authenticated and stream is started, the server send it a &MESSAGE; stanza with a &lt;privilege&gt; elements which MUST have the namespace 'urn:xmpp:privilege:0'. This element contains &lt;perm&gt; elements which MUST contain a 'namespace' attribute of the value "jabber:iq:roster" and a 'type' attribute which must correspond to the type configured as specified in <link url='#server_roster'>"Server Allows Roster Access" section</link></p> 145 <p>Once a privileged entity is authenticated and stream is started, the server send it a &MESSAGE; stanza with a &lt;privilege/&gt; elements which MUST have the namespace 'urn:xmpp:privilege:1'. This element contains &lt;perm/&gt; elements which MUST contain a 'access' attribute of the value "roster" and a 'type' attribute which must correspond to the type configured as specified in <link url='#server_roster'>"Server Allows Roster Access" section</link></p>
125 <example caption='Server Advertise Roster Privilege'><![CDATA[ 146 <example caption='Server Advertises Roster Privilege'><![CDATA[
126 <message from='capulet.net' to='pubub.capulet.lit' id='12345'> 147 <message from='capulet.net' to='pubub.capulet.lit' id='12345'>
127 <privilege xmlns='urn:xmpp:privilege:0'> 148 <privilege xmlns='urn:xmpp:privilege:1'>
128 <perm namespace='jabber:iq:roster' type='both'/> 149 <perm access='roster' type='both'/>
129 </privilege> 150 </privilege>
130 </message> 151 </message>
131 ]]></example> 152 ]]></example>
132 <p>Here <em>pubsub.capulet.lit</em> is allowed to do <em>get</em> and <em>set</em> operations on all entities managed by capulet.lit</p> 153 <p>Here <em>pubsub.capulet.lit</em> is allowed to do <em>get</em> and <em>set</em> operations on all entities managed by capulet.lit</p>
133 </section2> 154 </section2>
162 183
163 <section1 topic='Message Permission' anchor='message'> 184 <section1 topic='Message Permission' anchor='message'>
164 <section2 topic='Authorizing Messages' anchor='auth_mess'> 185 <section2 topic='Authorizing Messages' anchor='auth_mess'>
165 <p>In some cases, it can be desirable to send notifications (e.g. PEP service), so the privileged entity must be able to send &MESSAGE; stanzas. This is allowed in server configuration in the same way as for roster permission. The permission type can have the following values:</p> 186 <p>In some cases, it can be desirable to send notifications (e.g. PEP service), so the privileged entity must be able to send &MESSAGE; stanzas. This is allowed in server configuration in the same way as for roster permission. The permission type can have the following values:</p>
166 <ul> 187 <ul>
167 <li><strong>none</strong> — the entity is not allowed to send &MESSAGE; stanza in the name of the server. This MUST be the default value.</li> 188 <li><strong>none</strong> — the entity is not allowed to send &MESSAGE; stanza in the name of the server. This is usually the default value.</li>
168 <li><strong>outgoing</strong> — the entity is allowed to send &MESSAGE; stanzas in the name of the server, according to following restrictions.</li> 189 <li><strong>outgoing</strong> — the entity is allowed to send &MESSAGE; stanzas in the name of the server, according to following restrictions.</li>
169 </ul> 190 </ul>
170 <p>A privileged entity can then send message on the behalf either of the server or of a bare JID of the server, using &xep0297;, with the following restrictions:</p> 191 <p>A privileged entity can then send message on the behalf either of the server or of a bare JID of an entity managed by the server (i.e. a bare jid with the same domain as the server), using &xep0297;. The &lt;forwarded/&gt; element MUST be a child of a &lt;privilege/&gt; element with a namespace of <em>'urn:xmpp:privilege:1'</em>, with the following restriction:</p>
171 <ol> 192 <ol>
172 <li>forwarded &MESSAGE; 'type' attribute has the value of "headline"</li>
173 <li>forwarded &MESSAGE; 'from' attribute MUST be a bare JID from the server, no resource is allowed</li> 193 <li>forwarded &MESSAGE; 'from' attribute MUST be a bare JID from the server, no resource is allowed</li>
174 </ol> 194 </ol>
175 <p>If any of this rules is violated, the server MUST return a &lt;not-authorized/&gt; stream error and close the connection, as explained in &rfc6120; section 4.9.3.12.</p> 195 <p>If this rule is violated, the server MUST return a &MESSAGE; error with condition &lt;forbidden/&gt;, as in &rfc6120; section 8.3.3.4.</p>
176 </section2> 196 </section2>
177 197
178 <section2 topic='Advertising Permission' anchor='advertise_mess'> 198 <section2 topic='Advertising Permission' anchor='advertise_mess'>
179 <p>Server advertise "message" permission in the same way as for "roster" permission, except that 'namespace' attribute has the value of "message", and the 'type' attribute as a value of 'outgoing':</p> 199 <p>Server advertises "message" permission in the same way as for "roster" permission, except that 'access' attribute has the value of "message", and the 'type' attribute as a value of 'outgoing':</p>
180 <example caption='Server Advertise Roster And Message Privileges'><![CDATA[ 200 <example caption='Server Advertises Roster And Message Privileges'><![CDATA[
181 <message from='capulet.net' to='pubub.capulet.lit' id='54321'> 201 <message from='capulet.net' to='pubub.capulet.lit' id='54321'>
182 <privilege xmlns='urn:xmpp:privilege:0'> 202 <privilege xmlns='urn:xmpp:privilege:1'>
183 <perm namespace='jabber:iq:roster' type='both'/> 203 <perm access='roster' type='both'/>
184 <perm namespace='message' type='outgoing'/> 204 <perm access='message' type='outgoing'/>
185 </privilege> 205 </privilege>
186 </message> 206 </message>
187 ]]></example> 207 ]]></example>
188 </section2> 208 </section2>
189 209
190 <section2 topic='Sending Messages' anchor='sending_mess'> 210 <section2 topic='Sending Messages' anchor='sending_mess'>
191 <p>Now that <em>pubsub.capulet.lit</em> is allowed, it can send messages using &lt;forwarded/&gt; elements.</p> 211 <p>Now that <em>pubsub.capulet.lit</em> is allowed, it can send messages using &lt;forwarded/&gt; elements.</p>
192 <example caption='privileged entity send a notificaction message'><![CDATA[ 212 <example caption='privileged entity send a notificaction message'><![CDATA[
193 <message from='pubsub.capulet.lit' to='capulet.lit' id='notif1'> 213 <message from='pubsub.capulet.lit' to='capulet.lit' id='notif1'>
194 <forwarded xmlns='urn:xmpp:forward:0'> 214 <privilege xmlns='urn:xmpp:privilege:1'>
195 <message from='juliet@capulet.lit' 215 <forwarded xmlns='urn:xmpp:forward:0'>
196 id='foo' 216 <message from='juliet@capulet.lit'
197 to='romeo@montague.lit/orchard' 217 id='foo'
198 type='headline' 218 to='romeo@montague.lit/orchard'
199 xmlns='jabber:client'> 219 xmlns='jabber:client'>
200 <event xmlns='http://jabber.org/protocol/pubsub#event'> 220 <event xmlns='http://jabber.org/protocol/pubsub#event'>
201 <items node='http://jabber.org/protocol/tune'> 221 <items node='http://jabber.org/protocol/tune'>
202 <item> 222 <item>
203 <tune xmlns='http://jabber.org/protocol/tune'> 223 <tune xmlns='http://jabber.org/protocol/tune'>
204 <artist>Gerald Finzi</artist> 224 <artist>Gerald Finzi</artist>
205 <length>255</length> 225 <length>255</length>
206 <source>Music for "Love's Labors Lost" (Suite for small orchestra)</source> 226 <source>Music for "Love's Labors Lost" (Suite for small orchestra)</source>
207 <title>Introduction (Allegro vigoroso)</title> 227 <title>Introduction (Allegro vigoroso)</title>
208 <track>1</track> 228 <track>1</track>
209 </tune> 229 </tune>
210 </item> 230 </item>
211 </items> 231 </items>
212 </event> 232 </event>
213 <delay xmlns='urn:xmpp:delay' stamp='2014-11-25T14:34:32Z'/> 233 <delay xmlns='urn:xmpp:delay' stamp='2014-11-25T14:34:32Z'/>
214 </message> 234 </message>
215 </forwarded> 235 </forwarded>
236 </privilege>
216 </message> 237 </message>
217 ]]></example> 238 ]]></example>
218 <p>The server sees that forwarded message type is '<em>headline</em>', that <em>juliet@capulet.lit</em> is a bare JID of the server, and that outgoing message permission was granted in admin mode (so all bare JIDs from server are allowed); it can now send the notification:</p> 239 <p>The server sees that forwarded message 'from' attribute (<em>juliet@capulet.lit</em>) is a bare JID of the server, and that outgoing message permission was granted; it can now send the notification:</p>
219 <example caption='server sends the notification as if it was originating from him'><![CDATA[ 240 <example caption='server sends the notification as if it was originating from him'><![CDATA[
220 <message from='juliet@capulet.lit' 241 <message from='juliet@capulet.lit'
221 id='bar' 242 id='bar'
222 to='romeo@montague.lit/orchard' 243 to='romeo@montague.lit/orchard'>
223 type='headline'>
224 <event xmlns='http://jabber.org/protocol/pubsub#event'> 244 <event xmlns='http://jabber.org/protocol/pubsub#event'>
225 <items node='http://jabber.org/protocol/tune'> 245 <items node='http://jabber.org/protocol/tune'>
226 <item> 246 <item>
227 <tune xmlns='http://jabber.org/protocol/tune'> 247 <tune xmlns='http://jabber.org/protocol/tune'>
228 <artist>Gerald Finzi</artist> 248 <artist>Gerald Finzi</artist>
243 <section1 topic='Presence Permission' anchor='presence'> 263 <section1 topic='Presence Permission' anchor='presence'>
244 <section2 topic='Managed Entity Presence' anchor='managed_ent_presence'> 264 <section2 topic='Managed Entity Presence' anchor='managed_ent_presence'>
245 <p>It can be often desirable for a privileged entity to have presence information of the managed entities (e.g. to know when to send them notificiations). As privileges must be transparent for the managed entity, this presence has to be sent by the server without modifying managed entity roster.</p> 265 <p>It can be often desirable for a privileged entity to have presence information of the managed entities (e.g. to know when to send them notificiations). As privileges must be transparent for the managed entity, this presence has to be sent by the server without modifying managed entity roster.</p>
246 <p>This is allowed in server configuration in the same way as for <em>roster</em> and <em>message</em> permissions. The "presence" type can have the following values:</p> 266 <p>This is allowed in server configuration in the same way as for <em>roster</em> and <em>message</em> permissions. The "presence" type can have the following values:</p>
247 <ul> 267 <ul>
248 <li><strong>none</strong> — the entity is not allowed to access &PRESENCE; informations at all. This MUST be the default value.</li> 268 <li><strong>none</strong> — the entity is not allowed to access &PRESENCE; informations at all. This is usually the default value.</li>
249 <li><strong>managed_entity</strong> — the entity is allowed to receive managed entity presence (see below).</li> 269 <li><strong>managed_entity</strong> — the entity is allowed to receive managed entity presence (see below).</li>
250 <li><strong>roster</strong> — the entity is allowed to receive presence informations of managed entity contacts, see <link url='#roster_presence'>Roster Presence section</link>.</li> 270 <li><strong>roster</strong> — the entity is allowed to receive presence informations of managed entity contacts, see <link url='#roster_presence'>Roster Presence section</link>.</li>
251 </ul> 271 </ul>
252 <p>If the privilege is granted, the server MUST use a directed presence, as specified in &rfc6121; section 4.6 on the behalf of managed entity each time its presence information change.</p> 272 <p>If the privilege is granted, the server MUST use a directed presence from the full jid of the managed entity, to the privileged entity, as specified in &rfc6121; section 4.6, on the behalf of managed entity each time its presence information change.</p>
273 <p>Only presences with no 'type' attribute or with a 'type' attribute with the value "unavailable" are transmitted to the privileged entity, the server MUST NOT transmit &PRESENCE; stanza of any other type.</p>
253 </section2> 274 </section2>
254 275
255 <section2 topic='Advertising Permission' anchor='advertise_managed_presence'> 276 <section2 topic='Advertising Permission' anchor='advertise_managed_presence'>
256 <p>Server advertise "presence" permission in the same way as for "roster" or "message" permissions, except that 'namespace' attribute has the value of "presence", and the 'type' attribute has a value of "managed_entity"</p> 277 <p>Server advertises "presence" permission in the same way as for "roster" or "message" permissions, except that 'access' attribute has the value of "presence", and the 'type' attribute has a value of "managed_entity"</p>
257 </section2> 278 </section2>
258 279
259 <section2 topic="Server Send presence informations" anchor='server_send_presence'> 280 <section2 topic="Server Send presence informations" anchor='server_send_presence'>
260 <p>Once the "presence" permission is granted, the server send presence informations:</p> 281 <p>Once the "presence" permission is granted, the server send presence informations:</p>
261 <example caption='server receives new presence from Juliet'><![CDATA[ 282 <example caption='server receives new presence from Juliet'><![CDATA[
279 300
280 </section2> 301 </section2>
281 302
282 <section2 topic='Roster Presence' anchor='roster_presence'> 303 <section2 topic='Roster Presence' anchor='roster_presence'>
283 <p>In addition to "<link url='#managed_ent_presence'>managed entity presence</link>", a privileged entity may need to know when a contact in managed entity roster is online (for example, it's necessary for a PEP service because of the presence default access model).</p> 304 <p>In addition to "<link url='#managed_ent_presence'>managed entity presence</link>", a privileged entity may need to know when a contact in managed entity roster is online (for example, it's necessary for a PEP service because of the presence default access model).</p>
284 <p>As for other permissions, the access in granted in server's configuration, but there is a additional restriction: the privileged entity MUST have read permission on roster namespace (i.e. 'type' attribute in allowed &lt;perm&gt; of namespace <em>jabber:iq:roster</em> MUST have a value of either <strong>get</strong> or <strong>both</strong>).</p> 305 <p>As for other permissions, the access is granted in server's configuration, but there is an additional restriction: the privileged entity MUST have read permission on roster namespace (i.e. 'type' attribute in allowed &lt;perm&gt; of access <em>roster</em> MUST have a value of either <strong>get</strong> or <strong>both</strong>).</p>
285 <p>If the delegation is granted, the server MUST send to the privileged entity every presence information that the privileged entity is receiving. Having "roster" type for "presence" permission imply that you have also implicitly "managed_entity" type.</p><p>The server MUST reject the permission if the privileged entity doesn't have read permission on roster namespace.</p> 306 <p>If the privilege is granted, the server MUST send to the privileged entity every presence information with no 'type' attribute or with a 'type' with a value of 'unavailable' that the privileged entity is receiving or would receive if it were available. It do it in the same way as for <link url='#managed_ent_presence'>managing entity</link> by using directed &PRESENCE; from the full jid of the entity from which presence information has changed, to the privileged entity. If the managed entity is unavailable but the privileged entity is available, the server MUST send &PRESENCE; stanza to the later anyway.</p>
307 <p>Having "roster" type for "presence" permission imply that you have also implicitly "managed_entity" type.</p><p>The server MUST reject the permission if the privileged entity doesn't have read permission on roster namespace.</p>
308
286 <p>Note: this permission should be given carefully, as it gives access to presence of potentially a lot of entities to the privileged entity (see <link url='#security'>security considerations</link>).</p> 309 <p>Note: this permission should be given carefully, as it gives access to presence of potentially a lot of entities to the privileged entity (see <link url='#security'>security considerations</link>).</p>
287 </section2> 310 </section2>
288 311
289 <section2 topic='Advertising Permission' anchor='advertise_roster_presence'> 312 <section2 topic='Advertising Permission' anchor='advertise_roster_presence'>
290 <p>Server advertise roster "presence" permission in the same way as for other permissions, except that the 'namespace' attribute has the value of "presence", and the 'type' attribute has a value of "roster"</p> 313 <p>Server advertises roster "presence" permission in the same way as for other permissions, except that the 'access' attribute has the value of "presence", and the 'type' attribute has a value of "roster"</p>
291 <example caption='Server Advertise Roster, Message, Managed Entity Presence and Roster Presence Privileges'><![CDATA[ 314 <example caption='Server Advertises Roster, Message, Managed Entity Presence and Roster Presence Privileges'><![CDATA[
292 <message from='capulet.net' to='pubub.capulet.lit' id='54321'> 315 <message from='capulet.net' to='pubub.capulet.lit' id='54321'>
293 <privilege xmlns='urn:xmpp:privilege:0'> 316 <privilege xmlns='urn:xmpp:privilege:1'>
294 <perm namespace='jabber:iq:roster' type='both'/> 317 <perm access='roster' type='both'/>
295 <perm namespace='message'/> 318 <perm access='message'/>
296 <perm namespace='presence' type='roster'/> 319 <perm access='presence' type='roster'/>
297 </privilege> 320 </privilege>
298 </message> 321 </message>
299 ]]></example> 322 ]]></example>
300 <p>Note the presence of <em>jabber:iq:roster</em> permission request.</p> 323 <p>Note the presence of <em>roster</em> permission request.</p>
301 </section2> 324 </section2>
302 325
303 <section2 topic="Privileged Entity Receive Roster Presences" anchor='priv_rec_roster_presence'> 326 <section2 topic="Privileged Entity Receive Roster Presences" anchor='priv_rec_roster_presence'>
304 <example caption="server receives new presence from Romeo, which is in Juliet's roster"><![CDATA[ 327 <example caption="server receives new presence from Romeo, which is in Juliet's roster"><![CDATA[
305 <presence from='romeo@montaigu.lit/orchard'/> 328 <presence from='romeo@montaigu.lit/orchard'/>
311 to='pubsub.capulet.lit'/> 334 to='pubsub.capulet.lit'/>
312 ]]></example> 335 ]]></example>
313 </section2> 336 </section2>
314 </section1> 337 </section1>
315 338
339 <section1 topic='Business Rules' anchor='rules'>
340 <ol>
341 <li>For "presence" access, if a privileged entity is connected after first &PRESENCE; stanzas have been received, the server MUST send it all the &PRESENCE; stanzas with no 'type' attribute it would have had if it was connected first (in other words: all the presences informations for connected entities it has access to).</li>
342 <li>For "presence" access, if a privileged entity is supposed to received several time the same &PRESENCE; stanza, the server SHOULD send it only once. For example: if <em>pubsub.capulet.lit</em> has a "presence" access with a "roster" type for <em>capulet.lit</em>, and <em>juliet@capulet.lit</em> and <em>nurse@capulet.it</em> both have <em>romeo@montague.lit</em> in their roster. When romeo is available, <em>pubsub.capulet.lit</em> shoud have its &PRESENCE; stanza only once (instead of 2 times).</li>
343 </ol>
344 </section1>
345
316 <section1 topic='Security Considerations' anchor='security'> 346 <section1 topic='Security Considerations' anchor='security'>
317 <ol> 347 <ol>
318 <li>Privileged entitiy has access to sensitive data, and can act as the server itself, permissions should be granted carefuly, only if you absolutely trust the entity.</li> 348 <li>Privileged entitiy has access to sensitive data, and can act as the server itself, permissions should be granted carefuly, only if you absolutely trust the entity.</li>
319 <li><link url='#roster_presence'>Roster presence</link> is particulary sensitive, because presence informations of whole rosters are shared.</li> 349 <li><link url='#roster_presence'>Roster presence</link> is particulary sensitive, because presence informations of whole rosters are shared.</li>
350 <li>Generaly, the server MUST NOT allow the privileged entity to do anything that the managed entity could not do.</li>
320 </ol> 351 </ol>
321 </section1> 352 </section1>
322 353
323 <section1 topic='IANA Considerations' anchor='iana'> 354 <section1 topic='IANA Considerations' anchor='iana'>
324 <p>This document requires no interaction with &IANA;.</p> 355 <p>This document requires no interaction with &IANA;.</p>
325 </section1> 356 </section1>
326 357
327 <section1 topic='XMPP Registrar Considerations' anchor='registrar'> 358 <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
328 <section2 topic='Protocol Namespaces' anchor='ns'> 359 <section2 topic='Protocol Namespaces' anchor='ns'>
329 <p>The &REGISTRAR; includes 'urn:xmpp:privilege:0' in its registry of protocol namespaces (see &NAMESPACES;).</p> 360 <p>The &REGISTRAR; includes 'urn:xmpp:privilege:1' in its registry of protocol namespaces (see &NAMESPACES;).</p>
330 <ul> 361 <ul>
331 <li>urn:xmpp:privilege:0</li> 362 <li>urn:xmpp:privilege:1</li>
332 </ul> 363 </ul>
333 </section2> 364 </section2>
334 <section2 topic='Protocol Versioning' anchor='registrar-versioning'> 365 <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
335 &NSVER; 366 &NSVER;
336 </section2> 367 </section2>
340 <code><![CDATA[ 371 <code><![CDATA[
341 <?xml version='1.0' encoding='UTF-8'?> 372 <?xml version='1.0' encoding='UTF-8'?>
342 373
343 <xs:schema 374 <xs:schema
344 xmlns:xs='http://www.w3.org/2001/XMLSchema' 375 xmlns:xs='http://www.w3.org/2001/XMLSchema'
345 targetNamespace='urn:xmpp:privilege:0' 376 targetNamespace='urn:xmpp:privilege:1'
346 xmlns='urn:xmpp:privilege:0' 377 xmlns='urn:xmpp:privilege:1'
347 elementFormDefault='qualified'> 378 elementFormDefault='qualified'>
348 379
349 <xs:element name='privilege'> 380 <xs:element name='privilege'>
350 <xs:complexType> 381 <xs:complexType>
351 <xs:element name='perm' 382 <xs:element name='perm'
352 maxOccurs='unbounded'> 383 maxOccurs='unbounded'>
353 <xs:complexType> 384 <xs:complexType>
354 <xs:attribute name='namespace' use='required' type='xs:string'/> 385 <xs:attribute name='access' use='required' type='xs:string'/>
355 <xs:simpleType base='xs:NMTOKEN'> 386 <xs:simpleType base='xs:NMTOKEN'>
356 <xs:enumeration value='jabber:iq:roster'/> 387 <xs:enumeration value='roster'/>
357 <xs:enumeration value='message'/> 388 <xs:enumeration value='message'/>
358 <xs:enumeration value='presence'/> 389 <xs:enumeration value='presence'/>
359 </xs:simpleType> 390 </xs:simpleType>
360 <xs:attribute name='type' use='required'> 391 <xs:attribute name='type' use='required'>
361 <xs:simpleType base='xs:NMTOKEN'> 392 <xs:simpleType base='xs:NMTOKEN'>
376 </xs:schema> 407 </xs:schema>
377 ]]></code> 408 ]]></code>
378 </section1> 409 </section1>
379 410
380 <section1 topic='Acknowledgements' anchor='acks'> 411 <section1 topic='Acknowledgements' anchor='acks'>
381 <p>Thanks to Sergey Dobrov, Dave Cridland, Steven Lloyd Watkin, Lance Stout and Johannes Hund for their feedbacks. Thanks to Adrien Cossa for his typos/style corrections.</p> 412 <p>Thanks to Sergey Dobrov, Dave Cridland, Steven Lloyd Watkin, Lance Stout, Johannes Hund, Kurt Zeilenga and Kevin Smith for their feedbacks. Thanks to Adrien Cossa for his typos/style corrections.</p>
382 <p>Privileged entity was initialy written to be a generic identity based access control (IBAC) which allows an entity to access sensitive data. After <link url='http://mail.jabber.org/pipermail/standards/2014-December/029378.html'>a discussion on standard mailing list</link>, it has been decided to restrict the current XEP to immediate needs to build an external PEP service, and to implement separately an Attribute Based Access Control (ABAC) which is more modern, generic and flexible. This XEP is still interesting for being easy to implement and doing the job.</p> 413 <p>Privileged entity was initialy written to be a generic identity based access control (IBAC) which allows an entity to access sensitive data. After <link url='http://mail.jabber.org/pipermail/standards/2014-December/029378.html'>a discussion on standard mailing list</link>, it has been decided to restrict the current XEP to immediate needs to build an external PEP service, and to implement separately an Attribute Based Access Control (ABAC) which is more modern, generic and flexible. This XEP is still interesting for being easy to implement and doing the job.</p>
383 414
384 </section1> 415 </section1>
385 416
386 </xep> 417 </xep>