# HG changeset patch # User Goffi # Date 1410979098 -7200 # Node ID c6824592e3efe60ec39eb96d53eb247afd608cee # Parent 3d3566f95ddcd01a743262b8a5f0d0364852a95b privileged entity xep update: - the xep is now for any entity, not only components - updated according to standard@ feedbacks: - element removed - permissions are also managed in admin mode - in permission form, it is now recommended to use namespaces for 'var' attribute - filled the missing required parts - "privileged" and "managed" entity are now the terms used - if client can't revoke permissions by itself, they must be revoked on disconnection - renamed "xmlns" attribute of to "namespace" - server must notify privileged entity if permissions change during session - various typos fixes diff -r 3d3566f95ddc -r c6824592e3ef xmpp/xep-proto-privileged-component.xml --- a/xmpp/xep-proto-privileged-component.xml Tue Sep 09 08:43:06 2014 +0200 +++ b/xmpp/xep-proto-privileged-component.xml Wed Sep 17 20:38:18 2014 +0200 @@ -6,8 +6,8 @@
- privileged component - This specification provides a way for XMPP components to have a privileged access to entities data + privileged entity + This specification provides a way for XMPP entities to have a privileged access to other entities data This XMPP Extension Protocol is copyright (c) 1999 - 2014 by the XMPP Standards Foundation (XSF). Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), 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. @@ -35,6 +35,17 @@ goffi@jabber.fr + 0.0.2 + 2014-09-17 + jp +
    +
  • changed for privileged entity
  • +
  • fixes after feedbacks on standard mailing list
  • +
  • completed missing required parts
  • +
+
+
+ 0.0.1 2014-05-09 jp @@ -42,47 +53,63 @@
-

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.

-

Privileged component have numerous advantages, including:

+

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 an other entity data with the same privileges than the entity itself, that means send and receive IQ stanzas on its behalf.

+

Privileged entity have numerous advantages, including:

    -
  • 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
  • -
  • better integration of component: a gateway can add items to an entity roster itslef
  • +
  • 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
  • +
  • better integration of components: a gateway can add items to an entity roster itself
  • possibility to overpass a server limitation
  • -
  • quick development cycle: developers can implement the component they need without waiting for a new server release
  • +
  • quick development cycle: developers can implement the components they need without waiting for a new server release
  • server agnostic
-

A privileged component can be used in two modes:

+

A privileged entity can be used in two modes:

  • admin mode, where it is installed by the server administrator
  • client mode, where it can be installed by any user
-

In admin mode, the component SHOULD be able to emit IQ stanzas in the same way as any entity, including managing roster or accessing persistent storage

-

In client 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.

+

In admin mode, the privileged entity MAY be able to emit IQ stanzas in the same way as any entity, including managing roster or accessing persistent storage.

+

In client mode, a privileged entity MUST have an explicit autorization for any IQ namespace he wants to use. Client SHOULD be able to check and revoke granted permissions, and if it's not possible, permissions MUST be revoked after a disconnection.

    -
  • Component — the privileged component.
  • -
  • Client — the entity that the component wants to manage.
  • +
  • Privileged entity — the entity which has or wants a privileged status.
  • +
  • Managed entity — the entity that the privileged entity wants to manage.
- -

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 'urn:xmpp:tmp:privilege:0' namespace

- +

Once the privileged entity is authentified and stream is started, the entity can request its privileged status. It do it by sending an IQ stanza with 'urn:xmpp:privilege:0' namespace

+

Namespace permissions are asked with a <perm/> element, which MUST contain a 'namespace' attribute set to the requested namespace and a 'type' attribute which can be:

+
    +
  • get — the entity wants to send &IQ; stanza of type 'get'
  • +
  • set — the entity wants to send &IQ; stanza of type 'set'
  • +
  • both — the entity wants to send &IQ; stanza of type 'get' and 'set'
  • +
+ - + + + + ]]>
-

If the server accept the privileged status (e.g.: admin status specified in configuration), it MUST return empty IQ result stanza:

+

If the server accept the privileged status (e.g.: admin status specified in configuration), it MUST return an IQ result stanza, with allowed permissions in <perm/> elements:

- ]]> + + + + + + +]]> +

Note: the granted permissions MAY be different from the requested ones, according to server's configuration.

If the server reject the privileged status, it MUST return a &forbidden; error:

@@ -96,22 +123,22 @@
- -

Sending an IQ stanzas is done by remplacing the &IQ; with a <privilege/> element of namespace 'urn:xmpp:tmp:privilege:0', and including it in a global IQ stanza. The <privilege/> 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:

- - + +

Sending an IQ stanzas is done by sending the stanza the way it would be done by the managed entity, except that its jid is in the 'to' attribute. In the following example, the PubSub service want to know juliet's roster because she own a node with access model based on publiser's roster:

+ -
]]>
-

The server then answer normaly, as it would have done with the client entity:

- The server then answer normaly, as it would have done with the managed entity:

+ @@ -120,23 +147,21 @@ ]]> -

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:

- - - - - - +

In the following example, the sync.capulet.net privileged entity want to access managed entity's bookmarks to synchronize them with an online service. It can request the bookmarks in the following way:

+ + + + ]]>

and server answer:

@@ -159,28 +184,21 @@ -

In client mode, the component is not certified by the server administrator, so the permissions MUST be explicitly 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 admin mode with the following exceptions:

+

In client mode, the privileged entity is not certified by the server administrator, so the permissions MUST be explicitly allowed by the managed entity. This is initiated by the privileged entity (it can be after an interaction with a managed entity, like a subscription). It's done in the same way as for admin mode with the following exceptions:

  1. the privilege type is client instead of admin
  2. -
  3. the privilege is done per entity, so the entity MUST be specified in a 'to' attribute
  4. -
  5. permission are explicitly asked for every needed namespace
  6. +
  7. the privilege is done per entity, so the managed entity MUST be specified in a 'to' attribute
-

Namespace permission are asked with a <perm/> element, which MUST contain a 'xmlns' attribute and a 'type' attribute which can be:

-
    -
  • get — the component wants to send &IQ; stanza of type 'get'
  • -
  • set — the component wants to send &IQ; stanza of type 'set'
  • -
  • both — the component wants to send &IQ; stanza of type 'get' and 'set'
  • -
-

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: +

If an entity 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:

- - - - + + ]]> @@ -192,8 +210,8 @@ priv.montaigu.net wants some privileges. Do you you allow him to use the following features ? - Be careful ! According permissions to component is a serious thing, - think twice that you can trust the component before doing this. + Be careful ! According permissions to entity is a serious thing, + think twice that you can trust the entity before doing this. Privileges request @@ -201,13 +219,13 @@ Do you allow it? 5439123 - urn:xmpp:tmp:privilege:0 + urn:xmpp:privilege:0 0 - + @@ -222,7 +240,7 @@ ]]>
-

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 'none' (permission refused).

+

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 'none' (permission refused). The server SHOULD use namespace as field var, so a client can use it to have a customized display.

The client can then answer to the form:

@@ -237,30 +255,26 @@ ]]>

Here juliet accept that priv.montaigu.net use 'set' and 'get' to manage her roster, but doesn't want it to do any 'get' on her pubsub nodes.

-

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:

+

Finaly, the server notify the entity of the permissions granted. For this it use a &QUERY; element with the 'allowed' type, and put the client jid in a 'from' attribute:

- - - + + ]]> -

The privileged component can now act according to permission granted to him.

+

The privileged entity can now act according to permission granted to him.

- -

sending IQ stanza is done in the exact same way as for admin mode. If a component want to sent a non authorized IQ, it get a &forbidden; error:

- - - - - - + +

sending IQ stanza is done in the exact same way as for admin mode. If an entity want to sent a non authorized IQ, it get a &forbidden; error:

+ + + + ]]> @@ -275,7 +289,7 @@
-

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:

+

If a server or an entity supports the entity privilege protocol, it MUST report that fact by including a service discovery feature of "urn:xmpp:privilege:0" in response to a &xep0030; information request:

... - + ... @@ -299,8 +313,9 @@
    -
  1. 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;).
  2. +
  3. Server MAY keep permission granted to an entity 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;).
  4. 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.
  5. +
  6. If permissions are changed during a session, server MUST notify privileged entity of the new permissions, like in permission request use case
@@ -308,19 +323,73 @@
    -
  1. Privileged component nearly have the same possibility as the server itself, admin permission should be granted carefuly, only if you absolutely trust the component.
  2. +
  3. Privileged entity nearly have the same possibility as the server itself, admin permission should be granted carefuly, only if you absolutely trust the entity.
  4. 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 none
  5. 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)
-

REQUIRED. TODO

+

This document requires no interaction with &IANA;.

-

REQUIRED. TODO

+ +

The ®ISTRAR; includes 'urn:xmpp:privilege:0' in its registry of protocol namespaces (see &NAMESPACES;).

+
    +
  • urn:xmpp:privilege:0
  • +
+
+ + &NSVER; +
-

REQUIRED for protocol specifications. TODO

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> +
+ +

Thanks to Sergey Dobrov, Dave Cridland and Steven Lloyd Watkin for their feedbacks.