Extend catalogs to support

* restrictive catalogs
  * default items
  * empty items
Kurt Zeilenga 2010-07-30 13:11:53 -07:00
parent 588280ab32
commit 8b8d7e2f7f
1 changed files with 36 additions and 20 deletions

View File

@ -38,9 +38,9 @@
<remark><p>Minor editorial changes.</p></remark>
<remark><p>Extend catalog handling. Minor editorial changes.</p></remark>
@ -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 @@
<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>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='urn:xmpp:sec-label:catalog:1'/>
<feature var='urn:xmpp:sec-label:catalog:2'/>
@ -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'/>
<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'
<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>
<item selector="Classified|RESTRICTED">
<item selector="Classified|RESTRICTED" default="true">
<securitylabel xmlns='urn:xmpp:sec-label:0'>
<displaymarking fgcolor='black' bgcolor='aqua'>RESTRICTED</displaymarking>
@ -327,15 +336,7 @@ selector-value = (<item>"|")*<item>
<item selector="Unclassified|UNCLASSIFIED">
<securitylabel xmlns='urn:xmpp:sec-label:0'>
<displaymarking fgcolor='black' bgcolor='green'>UNCLASSIFIED</displaymarking>
<esssecuritylabel xmlns='urn:xmpp:sec-label:ess:0'
<item selector="Unclassified|UNCLASSIFIED"/>
@ -756,7 +757,7 @@ And by opposing end them?
<?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"
@ -796,12 +797,25 @@ And by opposing end them?
<xs:attribute name="restrict" type="xs:boolean">
<xs:attribute name="selector" type="xs:string">
<xs:documentation>User input selector</xs:documentation>
<xs:attribute name="default" type="xs:boolean">
<xs:documentation>Default Item</xs:documentation>
<xs:element name="catalog">
<xs:documentation>A Catalog of Labels</xs:documentation>
@ -809,12 +823,13 @@ And by opposing end them?
<xs:element name="item" maxOccurs="unbounded">
<xs:element name="item" minOccurs="0" maxOccurs="unbounded">
<xs:element ref="sl:securitylabel"/>
<xs:attribute ref="selector" use="optional"/>
<xs:attribute ref="default" use="optional"/>
@ -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"/>