forked from OVALProject/Sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x-solaris-package-publisher.xsd
349 lines (349 loc) · 30.3 KB
/
x-solaris-package-publisher.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns:solaris-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#solaris" xmlns:solaris-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#solaris" xmlns:x-solaris-package-publisher="http://oval.mitre.org/XMLSchema/x-solaris-package-publisher" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/x-solaris-package-publisher" elementFormDefault="qualified" version="5.11">
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="oval-definitions-schema.xsd"/>
<xsd:import namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" schemaLocation="oval-system-characteristics-schema.xsd"/>
<xsd:annotation>
<xsd:documentation>The following is a proposal for the experimental solaris-def:packagepublisher_test and solaris-sc:packagepublisher_item that will support checking the metadata associated with package publishers configured for a Solaris system.</xsd:documentation>
<xsd:appinfo>
<schema>Experimental Schema for the Solaris 11 Package Publisher Test</schema>
<version>5.11</version>
<date>4/22/2013 3:00:00 PM</date>
<terms_of_use>Copyright (c) 2002-2013, The MITRE Corporation. All rights reserved. The contents of this file are subject to the terms of the OVAL License located at http://oval.mitre.org/oval/about/termsofuse.html. See the OVAL License for the specific language governing permissions and limitations for use of this schema. When distributing copies of the OVAL Schema, this license header must be included.</terms_of_use>
<sch:ns prefix="oval-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5"/>
<sch:ns prefix="oval-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"/>
<sch:ns prefix="solaris-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#solaris"/>
<sch:ns prefix="solaris-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#solaris"/>
<sch:ns prefix="x-solaris-publisher" uri="http://oval.mitre.org/XMLSchema/x-solaris-package-publisher"/>
<sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
</xsd:appinfo>
</xsd:annotation>
<!-- =============================================================================== -->
<!-- ========================== PACKAGE PUBLISHER TEST =========================== -->
<!-- =============================================================================== -->
<xsd:element name="packagepublisher_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The packagepublisher_test provides support for checking the metadata of package publishers on a Solaris system. The test extends the standard TestType as defined in the oval-definitions-schema and one should refer to the TestType description for more information. The required object element references a packagepublisher_object and the optional state elements reference packagepublisher_states that specify the metadata to check about a set of package publishers on a Solaris system.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>packagepublisher_test</oval:test>
<oval:object>packagepublisher_object</oval:object>
<oval:state>packagepublisher_state</oval:state>
<oval:item>packagepublisher_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-solaris-packagepublisher_packagepublisher_test">
<sch:rule context="x-solaris-package-publisher:packagepublisher_test/x-solaris-package-publisher:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-solaris-package-publisher:packagepublisher_object/@id"><sch:value-of select="../@id"/> - the object child element of an packagepublisher_test must reference a packagepublisher_object</sch:assert>
</sch:rule>
<sch:rule context="x-solaris-package-publisher:packagepublisher_test/x-solaris-package-publisher:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-solaris-package-publisher:packagepublisher_state/@id"><sch:value-of select="../@id"/> - the state child element of an packagepublisher_test must reference a packagepublisher_state</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:TestType">
<xsd:sequence>
<xsd:element name="object" type="oval-def:ObjectRefType" />
<xsd:element name="state" type="oval-def:StateRefType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="packagepublisher_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The packagepublisher_object element is used by a packagepublisher_test to identify the set of package publishers to check on a Solaris system. Each object extends the standard ObjectType as defined in the oval-definitions-schema and one should refer to the ObjectType description for more information. The common set element allows complex objects to be created using filters and set logic. Again, please refer to the description of the set element in the oval-definitions-schema.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-solaris-packagepublisher_packagepublisher_object_verify_filter_state">
<sch:rule context="x-solaris-package-publisher:packagepublisher_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-solaris-package-publisher:packagepublisher_object"/>
<sch:let name="parent_object_id" value="$parent_object/@id"/>
<sch:let name="state_ref" value="."/>
<sch:let name="reffed_state" value="ancestor::oval-def:oval_definitions/oval-def:states/*[@id=$state_ref]"/>
<sch:let name="state_name" value="local-name($reffed_state)"/>
<sch:let name="state_namespace" value="namespace-uri($reffed_state)"/>
<sch:assert test="(($state_namespace='http://oval.mitre.org/XMLSchema/oval-definitions-5#solaris') and ($state_name='packagepublisher_state'))">State referenced in filter for <sch:value-of select="name($parent_object)"/> '<sch:value-of select="$parent_object_id"/>' is of the wrong type. </sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:ObjectType">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="oval-def:set"/>
<xsd:sequence>
<xsd:element name="name" type="oval-def:EntityObjectStringType">
<xsd:annotation>
<xsd:documentation>The name of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type" type="x-solaris-package-publisher:EntityObjectPublisherTypeType">
<xsd:annotation>
<xsd:documentation>The type of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="origin_uri" type="oval-def:EntityObjectStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The origin URI of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="oval-def:filter" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="packagepublisher_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The packagepublisher_state element defines the different system information that can be used to evaluate the specified package publishers.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type" type="x-solaris-package-publisher:EntityStatePublisherTypeType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The type of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="origin_uri" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The origin URI of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="alias" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The alias of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ssl_key" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The Secure Socket Layer (SSL) key registered by a client for publishers using client-side SSL authentication.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ssl_cert" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The Secure Socket Layer (SSL) certificate registered by a client for publishers using client-side SSL authentication.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="client_uuid" type="x-solaris-package-publisher:EntityStateClientUUIDType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The universally unique identifier (UUID) that identifies the image to its IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="catalog_updated" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The last time that the IPS package publisher's catalog was updated in seconds since the Unix epoch. The Unix epoch is the time 00:00:00 UTC on January 1, 1970.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="enabled" type="oval-def:EntityStateBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether or not the IPS package publisher is enabled.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="order" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies where in the search order the IPS package publisher is listed. The first publisher in the search order will have a value of '1'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="properties" type="oval-def:EntityStateRecordType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The properties associated with the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="EntityObjectPublisherTypeType">
<xsd:annotation>
<xsd:documentation>The EntityObjectPublisherTypeType complex type restricts a string value to three values: archive, mirror, or origin that specifies how the publisher distributes their packages. The empty string is also allowed to support empty elements associated with variable references. Note that when using pattern matches and variables care must be taken to ensure that the regular expression and variable values align with the enumerated values.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityObjectStringType">
<xsd:enumeration value="archive">
<xsd:annotation>
<xsd:documentation>The value of 'archive' specifies that the publisher distributes packages by providing a file that contains one or more packages.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="mirror">
<xsd:annotation>
<xsd:documentation>The value of 'mirror' specifies that the publisher distributes packages by providing a package repository that contains only package content.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="origin">
<xsd:annotation>
<xsd:documentation>The value of 'origin' specifies that the publisher distributes packages by providing a package repository that contains both package metadata and package content.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="">
<xsd:annotation>
<xsd:documentation>The empty string value is permitted here to allow for empty elements associated with variable references.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityStatePublisherTypeType">
<xsd:annotation>
<xsd:documentation>The EntityStatePublisherTypeType complex type restricts a string value to three values: archive, mirror, or origin that specifies how the publisher distributes their packages. The empty string is also allowed to support empty elements associated with variable references. Note that when using pattern matches and variables care must be taken to ensure that the regular expression and variable values align with the enumerated values.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateStringType">
<xsd:enumeration value="archive">
<xsd:annotation>
<xsd:documentation>The value of 'archive' specifies that the publisher distributes packages by providing a file that contains one or more packages.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="mirror">
<xsd:annotation>
<xsd:documentation>The value of 'mirror' specifies that the publisher distributes packages by providing a package repository that contains only package content.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="origin">
<xsd:annotation>
<xsd:documentation>The value of 'origin' specifies that the publisher distributes packages by providing a package repository that contains both package metadata and package content.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="">
<xsd:annotation>
<xsd:documentation>The empty string value is permitted here to allow for empty elements associated with variable references.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityStateClientUUIDType">
<xsd:annotation>
<xsd:documentation>The EntityStateClientUUIDType restricts a string value to a representation of a client UUID, used to identify an image to its IPS package publisher. The empty string is also allowed to support empty element associated with variable references. Note that when using pattern matches and variables care must be taken to ensure that the regular expression and variable values align with the specified pattern restriction.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateStringType">
<xsd:pattern value="(\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}){0,}"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<!-- =============================================================================== -->
<!-- ========================== PACKAGE PUBLISHER ITEM =========================== -->
<!-- =============================================================================== -->
<xsd:element name="packagepublisher_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>This item stores system state information associated with IPS package publishers on a Solaris system.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-sc:ItemType">
<xsd:sequence>
<xsd:element name="name" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type" type="x-solaris-package-publisher:EntityItemPublisherTypeType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The type of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="origin_uri" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The origin URI of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="alias" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The alias of the IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ssl_key" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The Secure Socket Layer (SSL) key registered by a client for publishers using client-side SSL authentication.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ssl_cert" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The Secure Socket Layer (SSL) certificate registered by a client for publishers using client-side SSL authentication.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="client_uuid" type="x-solaris-package-publisher:EntityItemClientUUIDType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The universally unique identifier (UUID) that identifies the image to its publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="catalog_updated" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The last time that the IPS package publisher's catalog was updated in seconds since the Unix epoch. The Unix epoch is the time 00:00:00 UTC on January 1, 1970.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="enabled" type="oval-sc:EntityItemBoolType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies whether or not the publisher is enabled.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="order" type="oval-sc:EntityItemIntType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Specifies where in the search order the IPS package publisher is listed. The first publisher in the search order will have a value of '1'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="properties" type="oval-sc:EntityItemRecordType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The properties associated with an IPS package publisher.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="EntityItemPublisherTypeType">
<xsd:annotation>
<xsd:documentation>The EntityItemPublisherTypeType complex type restricts a string value to three values: archive, mirror, or origin that specifies how the publisher distributes their packages. The empty string is also allowed to support empty elements associated with error conditions.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-sc:EntityItemStringType">
<xsd:enumeration value="archive">
<xsd:annotation>
<xsd:documentation>The value of 'archive' specifies that the publisher distributes packages by providing a file that contains one or more packages.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="mirror">
<xsd:annotation>
<xsd:documentation>The value of 'mirror' specifies that the publisher distributes packages by providing a package repository that contains only package content.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="origin">
<xsd:annotation>
<xsd:documentation>The value of 'origin' specifies that the publisher distributes packages by providing a package repository that contains both package metadata and package content.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="">
<xsd:annotation>
<xsd:documentation>The empty string value is permitted here to allow for detailed error reporting.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityItemClientUUIDType">
<xsd:annotation>
<xsd:documentation>The EntityItemClientUUIDType restricts a string value to a representation of a client UUID, used to identify an image to its IPS package publisher. The empty string is also allowed to support empty element associated with error conditions.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-sc:EntityItemStringType">
<xsd:pattern value="(\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}){0,}"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>