Commit fd055fc8 authored by Peter Waher's avatar Peter Waher

Provisioning

parent cc7101d4
......@@ -2,8 +2,8 @@
==================
This document outlines the XML representation of the provisioning service provided to owners of devices, as defined by the IEEE XMPP IoT Working Group.
When new operations occur to devices the owner owns, the provisioning server asks the owner what to do. The responses provided by the owner affects
future decisions made by the provisioning server. While waiting for the owner to response to provisioning questions, the provisioning server denies
When new operations occur to devices the owner owns, the provisioning service asks the owner what to do. The responses provided by the owner affects
future decisions made by the provisioning service. While waiting for the owner to response to provisioning questions, the provisioning service denies
all requests it cannot answer by default.
The XML representation is modelled using an annotated XML Schema:
......@@ -25,7 +25,7 @@ The method of decision support described here, is designed with the following go
* Decision support should not affect the operator, only the device and its owner.
* The load on the provisioning server should be proportional to the change in the network. No change should imply no additional load for providing
* The load on the provisioning service should be proportional to the change in the network. No change should imply no additional load for providing
decision support.
* All relevant operations for things should be supported by the decision support infrastructure.
......@@ -42,7 +42,7 @@ owners in asynchronous human-time (i.e. whenever the owner has time or opportuni
Authorizing friendships
--------------------------
The provisioning server can ask an owner if one of its things can accept the presence subscription of another entity. This is done by sending a
The provisioning service can ask an owner if one of its things can accept the presence subscription of another entity. This is done by sending a
`isFriend` element in a `message` stanza to the owner. (Messages are used, since the offline storage feature in the XMPP broker allows the message to
be delivered when the owner comes online). The element contains three attributes:
......@@ -52,8 +52,8 @@ be delivered when the owner comes online). The element contains three attributes
| `remoteJid` | `xs:string` | Bare JID of entity requesting presence subscription. |
| `key` | `xs:string` | Key related to the event. |
After reviewing the event, the owner can tell the provisioning server how to process the event, and future similar events, by adding a rule to the set
of rules pertaining to the given device. It does this by sending a `isFriendRule` element in an `iq set` stanza to the provisioning server. The `isFriendRule`
After reviewing the event, the owner can tell the provisioning service how to process the event, and future similar events, by adding a rule to the set
of rules pertaining to the given device. It does this by sending a `isFriendRule` element in an `iq set` stanza to the provisioning service. The `isFriendRule`
element contains five attributes:
| Attribute | Type | Description |
......@@ -76,7 +76,7 @@ Possible values of the `range` attribute are:
Authorizing access to sensor data
------------------------------------
The provisioning server can ask the owner what to permit regarding access to any sensor data from any of the owner's devices. It does this by sending a
The provisioning service can ask the owner what to permit regarding access to any sensor data from any of the owner's devices. It does this by sending a
`canRead` element in a `message` stanza to the owner. Apart from the attributes, nodes and field specifications and tokens available in a sensor-data request
or subscription, it also contains the following attributes:
......@@ -86,8 +86,8 @@ or subscription, it also contains the following attributes:
| `remoteJid` | `xs:string` | Bare JID of entity requesting presence subscription. |
| `key` | `xs:string` | Key related to the event. |
After reviewing the event, the owner can tell the provisioning server how to process the event, and future similar events, by adding a rule to the set
of rules pertaining to the given device. It does this by sending a `canReadRule` element in an `iq set` stanza to the provisioning server. The `canReadRule`
After reviewing the event, the owner can tell the provisioning service how to process the event, and future similar events, by adding a rule to the set
of rules pertaining to the given device. It does this by sending a `canReadRule` element in an `iq set` stanza to the provisioning service. The `canReadRule`
element contains four attributes:
| Attribute | Type | Description |
......@@ -116,7 +116,7 @@ requests, based on its origin, as follows:
Authorizing control operations
--------------------------------------
The provisioning server can ask the owner what to permit regarding control operations related to any of the owner's devices. It does this by sending a
The provisioning service can ask the owner what to permit regarding control operations related to any of the owner's devices. It does this by sending a
`canControl` element in a `message` stanza to the owner. Apart from the attributes, nodes and parameter specifications and tokens available in a
control operation request, it also contains the following attributes:
......@@ -126,8 +126,8 @@ control operation request, it also contains the following attributes:
| `remoteJid` | `xs:string` | Bare JID of entity requesting presence subscription. |
| `key` | `xs:string` | Key related to the event. |
After reviewing the event, the owner can tell the provisioning server how to process the event, and future similar events, by adding a rule to the set
of rules pertaining to the given device. It does this by sending a `canControlRule` element in an `iq set` stanza to the provisioning server. The `canControlRule`
After reviewing the event, the owner can tell the provisioning service how to process the event, and future similar events, by adding a rule to the set
of rules pertaining to the given device. It does this by sending a `canControlRule` element in an `iq set` stanza to the provisioning service. The `canControlRule`
element contains four attributes:
| Attribute | Type | Description |
......@@ -151,3 +151,32 @@ child elements. Finally, the owner can specify the range of the rule, by specify
| `fromUser` | `token` | Rule will apply to future request made using the same userr token. |
| `all` | N/A | Rule will apply to all future requests. |
Refreshing rules in device
--------------------------------------
The owner can request the provisioning service to request the cache to be cleared in one of its devices. This can be useful to make sure rules are up-to-date
in the device. The owner simply sends a `clearCache` element in an `iq set` stanza to the provisioning service. The element should contain the bare JID
of the device in the `jid` attribute.
Deleting rules for device
--------------------------------------
The owner can ask the provisioning service to delete all rules pertaining to a specific device, or node in a concentrator. This is done by sending a
`deleteRules` element in an `iq set` stanza to the provisioning service, with the bare JID of the device in the `jid` attribute. If the device is a
concentrator, you also need to specify the corresponding node. After deleting all rules, any new operations performed on the device will cause events
to be sent to owner, letting the owner reprovision the device or node.
Getting list of devices
---------------------------
An owner can get a list of its devices from the provisioning service. This is done by sending a `getDevices` element in an `iq get` stanza to the
provisioning service. The response conforms to search results in [XEP-0347](https://xmpp.org/extensions/xep-0347.html). The `getDevices` element
takes two optional attributes:
| Attribute | Type | Description |
|:-----------|:------------------------|:---------------------------------------------------------------|
| `maxCount` | `xs:positiveInteger` | Maximum number of devices to return in the response. |
| `offset` | `xs:nonNegativeInteger` | Starting offset into the list of things to return. (Default=0) |
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment