1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-21 23:28:51 -05:00

Extend catalogs to support

* restrictive catalogs
  * default items
  * empty items
This commit is contained in:
Kurt Zeilenga 2010-07-30 13:11:53 -07:00
parent 588280ab32
commit 8b8d7e2f7f

View File

@ -38,9 +38,9 @@
</author>
<revision>
<version>0.6</version>
<date>2010-07-20</date>
<date>2010-07-30</date>
<initials>kdz</initials>
<remark><p>Minor editorial changes.</p></remark>
<remark><p>Extend catalog handling. Minor editorial changes.</p></remark>
</revision>
<revision>
<version>0.5</version>
@ -221,7 +221,7 @@
<section1 topic='Label Catalog Discovery' anchor='label-catalog'>
<p>A client can request a catalog for a particular JID by sending
an catalog discovery request to the client's server. Where the JID
a catalog discovery request to the client's server. Where the JID
is hosted by some other server, the client's server is expected to
produce a suitable catalog (or fail the request). The client's server
may, as needed, query catalogs from other servers in order to
@ -234,6 +234,14 @@
JID.</p>
<p>It is RECOMMENDED the server publish catalogs of security label
for use by clients.</p>
<p>If catalog is restrictive, as indicated by the restrictive attribute
with value of true, the client SHOULD use one of the labels
(or no label) offered by the catalog.</p>
<p>One and only one of the items may have a default attribute with
value of true. The client should default to this item in cases
where the user has not selected an item.</p>
<p>An item may have no label. Such an item offers a choice of
sending a stanza without a label.</p>
<p>Each catalog provided should only contain labels for which the client
is allowed to use (based upon the user's authorization) in a particular
context (such as in chatroom). A catalog may not be include the
@ -248,7 +256,7 @@
servers should advertise and clients should perform appropriate
discovery lookups on a per service basis.</p>
<p>To indicate the support for label catalog discovery, a server
advertises the <tt>urn:xmpp:sec-label:catalog:1</tt> feature.
advertises the <tt>urn:xmpp:sec-label:catalog:2</tt> feature.
The following pair of examples illustrates this feature discovery.</p>
<p>Each item in the catalog may contain a selector attribute. The
value of this attribute represents the item's placement in a
@ -281,7 +289,7 @@ selector-value = (<item>"|")*<item>
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:xmpp:sec-label:catalog:1'/>
<feature var='urn:xmpp:sec-label:catalog:2'/>
...
</query>
</iq>
@ -291,15 +299,16 @@ selector-value = (<item>"|")*<item>
<example caption="Label Catalog request"><![CDATA[
<iq type='get' id='cat1'>
<catalog xmlns='urn:xmpp:sec-label:catalog:1' to='example.com'/>
<catalog xmlns='urn:xmpp:sec-label:catalog:2' to='example.com'/>
</iq>
]]></example>
<example caption="Label Catalog Get response"><![CDATA[
<iq type='result' to='user@example.com/Work' id='cat1'>
<catalog xmlns='urn:xmpp:sec-label:catalog:0'
<catalog xmlns='urn:xmpp:sec-label:catalog:2'
to='example.com' name='Default'
desc='an example set of labels'>
desc='an example set of labels'
restrictive='false'>
<item selector="Classified|SECRET">
<securitylabel xmlns='urn:xmpp:sec-label:0'>
<displaymarking fgcolor='black' bgcolor='red'>SECRET</displaymarking>
@ -318,7 +327,7 @@ selector-value = (<item>"|")*<item>
</label>
</securitylabel>
</item>
<item selector="Classified|RESTRICTED">
<item selector="Classified|RESTRICTED" default="true">
<securitylabel xmlns='urn:xmpp:sec-label:0'>
<displaymarking fgcolor='black' bgcolor='aqua'>RESTRICTED</displaymarking>
<label>
@ -327,15 +336,7 @@ selector-value = (<item>"|")*<item>
</label>
</securitylabel>
</item>
<item selector="Unclassified|UNCLASSIFIED">
<securitylabel xmlns='urn:xmpp:sec-label:0'>
<displaymarking fgcolor='black' bgcolor='green'>UNCLASSIFIED</displaymarking>
<label>
<esssecuritylabel xmlns='urn:xmpp:sec-label:ess:0'
>MQMGASk=</esssecuritylabel>
</label>
</securitylabel>
</item>
<item selector="Unclassified|UNCLASSIFIED"/>
</catalog>
</iq>
]]></example>
@ -756,7 +757,7 @@ And by opposing end them?
<code><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sl="urn:xmpp:sec-label:0"
xmlns="urn:xmpp:sec-label:catalog:1" targetNamespace="urn:xmpp:sec-label:catalog:1"
xmlns="urn:xmpp:sec-label:catalog:2" targetNamespace="urn:xmpp:sec-label:catalog:1"
elementFormDefault="qualified">
<xs:annotation>
@ -796,12 +797,25 @@ And by opposing end them?
</xs:annotation>
</xs:attribute>
<xs:attribute name="restrict" type="xs:boolean">
<xs:annotation>
<xs:documentation>Restrictive</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="selector" type="xs:string">
<xs:annotation>
<xs:documentation>User input selector</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="default" type="xs:boolean">
<xs:annotation>
<xs:documentation>Default Item</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:element name="catalog">
<xs:annotation>
<xs:documentation>A Catalog of Labels</xs:documentation>
@ -809,12 +823,13 @@ And by opposing end them?
<xs:complexType>
<xs:sequence>
<xs:element name="item" maxOccurs="unbounded">
<xs:element name="item" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element ref="sl:securitylabel"/>
</xs:sequence>
<xs:attribute ref="selector" use="optional"/>
<xs:attribute ref="default" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
@ -823,6 +838,7 @@ And by opposing end them?
<xs:attribute ref="desc" use="optional"/>
<xs:attribute ref="id" use="optional"/>
<xs:attribute ref="size" use="optional"/>
<xs:attribute ref="restrict" use="optional"/>
</xs:complexType>
</xs:element>
</xs:schema>