Commit fe0191fd authored by Peter Waher's avatar Peter Waher

Adding provisioning schemas.

parent 8d552134
......@@ -26,6 +26,8 @@ Schemas
* [SensorData.xsd](Schemas/SensorData.xsd)
* [EventSubscription.xsd](Schemas/EventSubscription.xsd)
* [Control.xsd](Schemas/Control.xsd)
* [ProvisioningTokens.xsd](Schemas/ProvisioningTokens.xsd)
* [ProvisioningDevice.xsd](Schemas/ProvisioningDevice.xsd)
Implementations
......
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:ieee:iot:prov:d:1.0'
xmlns='urn:ieee:iot:prov:d:1.0'
xmlns:sd='urn:ieee:iot:sd:1.0'
elementFormDefault='qualified'>
<xs:import namespace='urn:ieee:iot:sd:1.0'/>
<xs:element name='clearCache'>
<xs:annotation>
<xs:documentation>Sent to a device to clear its provisioning rule cache.</xs:documentation>
</xs:annotation>
<xs:complexType/>
</xs:element>
<xs:element name='isFriend'>
<xs:annotation>
<xs:documentation>Sent by a device to check if it is allowed to accept a presence subscription from JID.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name='jid' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>JID of entity requesting presence subscription.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name='isFriendResponse'>
<xs:annotation>
<xs:documentation>Contains a response to the isFriend question.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name='jid' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>JID of entity requesting presence subscription.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='result' type='xs:boolean' use='required'>
<xs:annotation>
<xs:documentation>If the device is allowed to accept the presence subscription.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name='unfriend'>
<xs:annotation>
<xs:documentation>Sent to a device to request it to remove the presence subscription from a remote entity.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name='jid' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>JID of remote entity.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name='friend'>
<xs:annotation>
<xs:documentation>Sent to a device to request it to make a presence subscription request to a remote entity.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name='jid' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>JID of remote entity.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name='canRead'>
<xs:annotation>
<xs:documentation>A device sends the canRead request when it wants to know if a remote entity is allowed to read its sensor data.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base='CanReadBase'>
<xs:attributeGroup ref='tokens'>
<xs:annotation>
<xs:documentation>Optional tokens identifying the original sender of the request.</xs:documentation>
</xs:annotation>
</xs:attributeGroup>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name='canReadResponse'>
<xs:annotation>
<xs:documentation>The provisioning server response to a canRead request.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base='CanReadBase'>
<xs:attribute name='result' type='xs:boolean' use='required'>
<xs:annotation>
<xs:documentation>If the readout is permitted or not.</xs:documentation>
<xs:documentation>Note: The permission might be partial. The device needs to check any node and field reference nodes, as well as field category attributes, to see if the original request has been limited. The device needs to use the values provided in the response instead of the elements in the original request.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name='CanReadBase' abstract='true'>
<xs:sequence>
<xs:element name='nd' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>Defines a node in a concentrator.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref='sd:nodeIdentity'>
<xs:annotation>
<xs:documentation>Node identification attributes.</xs:documentation>
</xs:annotation>
</xs:attributeGroup>
</xs:complexType>
</xs:element>
<xs:element name='f' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>Contains a reference to a field to be read.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name='n' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>Name of field to be read.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref='sd:category'>
<xs:annotation>
<xs:documentation>Field categories to be read.</xs:documentation>
</xs:annotation>
</xs:attributeGroup>
<xs:attribute name='all' type='xs:boolean' use='optional' default='false'>
<xs:annotation>
<xs:documentation>If all field categories are to be read.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='jid' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>JID of entity requesting the readout.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:attributeGroup name='tokens'>
<xs:attribute name='st' type='xs:string' use='optional'>
<xs:annotation>
<xs:documentation>Service tokens, separated by spaces if they are more than one, identifying the service generating the original request.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='dt' type='xs:string' use='optional'>
<xs:annotation>
<xs:documentation>Device tokens, separated by spaces if they are more than one, identifying the device generating the original request.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name='ut' type='xs:string' use='optional'>
<xs:annotation>
<xs:documentation>User tokens, separated by spaces if they are more than one, identifying the user generating the original request.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name='canControl'>
<xs:annotation>
<xs:documentation>A device sends the canControl request when it wants to know if a remote entity is allowed to control any of its control parameters.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base='CanControlBase'>
<xs:attributeGroup ref='tokens'>
<xs:annotation>
<xs:documentation>Optional tokens identifying the original sender of the request.</xs:documentation>
</xs:annotation>
</xs:attributeGroup>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name='canControlResponse'>
<xs:annotation>
<xs:documentation>The provisioning server response to a canControl request.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base='CanControlBase'>
<xs:attribute name='result' type='xs:boolean' use='required'>
<xs:annotation>
<xs:documentation>If the control operation is permitted or not.</xs:documentation>
<xs:documentation>Note: The permission might be partial. The device needs to check any node and parameter reference nodes, to see if the original request has been limited. The device needs to use the values provided in the response instead of the elements in the original request.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name='CanControlBase' abstract='true'>
<xs:sequence>
<xs:element name='nd' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>Defines a node in a concentrator.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref='sd:nodeIdentity'>
<xs:annotation>
<xs:documentation>Node identification attributes.</xs:documentation>
</xs:annotation>
</xs:attributeGroup>
</xs:complexType>
</xs:element>
<xs:element name='p' minOccurs='0' maxOccurs='unbounded'>
<xs:annotation>
<xs:documentation>Contains a reference to a parameter to be controlled.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name='n' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>Name of parameter to be controlled.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name='jid' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>JID of entity requesting the control operation.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
\ No newline at end of file
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:ieee:iot:prov:t:1.0'
xmlns='urn:ieee:iot:prov:t:1.0'
elementFormDefault='qualified'>
<xs:element name='getToken' type='xs:base64Binary'>
<xs:annotation>
<xs:documentation>Gets a token from the provisioning server. The contents of the element should be the BASE64 encoded public part of a X.509 certificate, for which the server is to provide a token.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name='getTokenChallenge'>
<xs:annotation>
<xs:documentation>The provisioning server response to the getToken request with a challenge. It contains BASE64-encoded binary data, encrypted with the public key of the certificate provided.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:base64Binary'>
<xs:annotation>
<xs:documentation>BASE64-encoded binary data, encrypted with the public key of the certificate provided.</xs:documentation>
</xs:annotation>
<xs:attribute name='seqnr' type='xs:int' use='required'>
<xs:annotation>
<xs:documentation>A sequence number identifying the challenge.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name='getTokenChallengeResponse'>
<xs:annotation>
<xs:documentation>The device responsds to the challenge issuing a new request, containing the decrypted binary data, BASE64-encoded, to the provisioning server.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:base64Binary'>
<xs:annotation>
<xs:documentation>BASE64-encoded binary data, decrypted with the private part of the certificate for which the device wants to get a token.</xs:documentation>
</xs:annotation>
<xs:attribute name='seqnr' type='xs:int' use='required'>
<xs:annotation>
<xs:documentation>A sequence number identifying the challenge.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name='getTokenResponse'>
<xs:annotation>
<xs:documentation>On the receipt of a successful response to the challenge, the provisioning server responds with a token.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name='token' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>Token the device can use in distributed transactions, instead of the certificate, for identification.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name='tokenChallenge'>
<xs:annotation>
<xs:documentation>The recipient of a token can challenge the sender, especially the first time a token is received from a given sender.</xs:documentation>
<xs:documentation>The challenge consists of a BASE-64 encoded encrypted binary challenge, that the sender needs to decrypt and return.</xs:documentation>
<xs:documentation>In distributed transactions, where tokens are forwarded, challenges need to be forwarded to the original issuer of the request.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:base64Binary'>
<xs:annotation>
<xs:documentation>BASE-64 encoded encrypted binary challenge</xs:documentation>
</xs:annotation>
<xs:attribute name='token' type='xs:string' use='required'>
<xs:annotation>
<xs:documentation>Token being challenged.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name='tokenChallengeResponse' type='xs:base64Binary'>
<xs:annotation>
<xs:documentation>Decrypted binary data, as a response to the challenge.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
\ No newline at end of file
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