This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
x-asa-mpf.xsd
751 lines (739 loc) · 53 KB
/
x-asa-mpf.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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
<?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:asa-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#asa" xmlns:asa-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#asa" xmlns:x-asa-mpf="http://oval.mitre.org/XMLSchema/x-asa-mpf" xmlns:sch="http://purl.oclc.org/dsdl/schematron" targetNamespace="http://oval.mitre.org/XMLSchema/x-asa-mpf" 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 asa-def:class_map_test, asa-def:policy_map_test, asa-def:service_policy_test, asa-def:tcp_map_test and asa-sc:class_map_item, asa-sc:policy_map_item, asa-sc:service_policy_item, asa-sc:tcp_map_item that will support checking the output lines of Modular Policy Framework (MPF) configurations on Cisco ASA 5500 Series Adaptive Security Appliances</xsd:documentation>
<xsd:documentation>Thanks to Panos Kampanakis of Cisco for providing this test.</xsd:documentation>
<xsd:appinfo>
<schema>Experimental Schema for the Cisco ASA MPF Test</schema>
<version>5.11</version>
<date>11/13/2012 4:03:00 PM</date>
<terms_of_use>Copyright (c) 2002-2012, 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="asa-def" uri="http://oval.mitre.org/XMLSchema/oval-definitions-5#asa"/>
<sch:ns prefix="asa-sc" uri="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#asa"/>
<sch:ns prefix="x-asa-mpf" uri="http://oval.mitre.org/XMLSchema/x-asa-mpf"/>
<sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
</xsd:appinfo>
</xsd:annotation>
<!-- =============================================================================== -->
<!-- ========================== ASA MPF CLASS-MAP TEST ============================= -->
<!-- =============================================================================== -->
<xsd:element name="class_map_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The class_map test is used to check the properties of specific output lines from an MPF class-map configuration.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>class_map_test</oval:test>
<oval:object>class_map_object</oval:object>
<oval:state>class_map_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-asa-mpf">class_map_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-asa-class_maptst">
<sch:rule context="x-asa-mpf:class_map_test/x-asa-mpf:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-asa-mpf:class_map_object/@id"><sch:value-of select="../@id"/> - the object child element of an class_map_test must reference an class_map_object</sch:assert>
</sch:rule>
<sch:rule context="x-asa-mpf:class_map_test/x-asa-mpf:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-asa-mpf:class_map_state/@id"><sch:value-of select="../@id"/> - the state child element of an class_map_test must reference an class_map_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="class_map_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The class_map_object element is used by an class_map test to define the object to be evaluated. 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:documentation>A class_map object consists of a name entity that is the name of the ASA 'class-map' configuration to be tested.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-asa-mpf_class_map_object_verify_filter_state">
<sch:rule context="x-asa-mpf:class_map_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-asa-mpf:class_map_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#x-asa-mpf') and ($state_name='class_map_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 MPF class-map name.</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="class_map_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The class_map_state element defines the different information that can be used to evaluate the result of a specific 'class-map' ASA command. This includes the name, the type, the inspection type, the match type, the match commands, the policy-map or class-map it is used and the action in the policy-map. Please refer to the individual elements in the schema for more details about what each represents.</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 class-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type" type="x-asa-mpf:EntityStateClassMapType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The type of the 'class-map nameX type' command.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type_inspect" type="x-asa-mpf:EntityStateInpsectionType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The inspection type of the class-map ('class-map nameX type inspect').</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="match_all_any" type="x-asa-mpf:EntityStateMatchType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The 'match-all' or 'match-any' type of the class-map. ASA defaults to 'match-any'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="match" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The 'match' commands in the class-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="used_in_class_map" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of the class-map (for nested class-maps) that this class-map is used in.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="used_in_policy_map" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of the policy-map that this class-map is used in.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="policy_map_action" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The command that identifies the action for the class. For example that could be 'inspect protocolX', 'drop' or 'police 1000' or 'set connection advanced-options tcpmapX'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- =========================== ASA MPF POLICY-MAP TEST =========================== -->
<!-- =============================================================================== -->
<xsd:element name="policy_map_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The policy_map test is used to check the properties of specific output lines from an policy-map ASA configuration.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>policy_map_test</oval:test>
<oval:object>policy_map_object</oval:object>
<oval:state>policy_map_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-asa-mpf">policy_map_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-asa-policy_maptst">
<sch:rule context="x-asa-mpf:policy_map_test/x-asa-mpf:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-asa-mpf:policy_map_object/@id"><sch:value-of select="../@id"/> - the object child element of an policy_map_test must reference an policy_map_object</sch:assert>
</sch:rule>
<sch:rule context="x-asa-mpf:policy_map_test/x-asa-mpf:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-asa-mpf:policy_map_state/@id"><sch:value-of select="../@id"/> - the state child element of an policy_map_test must reference an policy_map_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="policy_map_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The policy_map_object element is used by an policy_map test to define the object to be evaluated. 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:documentation>A policy_map object consists of a name entity that is the name of the ASA 'policy-map' configuration to be tested.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-asa-mpf_policy_map_object_verify_filter_state">
<sch:rule context="x-asa-mpf:policy_map_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-asa-mpf:policy_map_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#x-asa-mpf') and ($state_name='policy_map_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 MPF policy-map name.</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="policy_map_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The policy_map_state element defines the different information that can be used to evaluate the result of a 'policy-map' ASA configuration. This includes the policy-map name, the inspection type, the paremeters, the match and action commands, the policy-map it is used in and the service-policy that applies it. Please refer to the individual elements in the schema for more details about what each represents.</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 policy-map name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type_inspect" type="x-asa-mpf:EntityStateInpsectionType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The inspection type of the class-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="parameters" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The parameter commands of the policy-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="match_action" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The in-line match command and the action in the policy-map seperated by delimeter '_-_'. For example an http inspect policy-map could have 'match body regex regexnameX' and the action be 'drop'. Then this element would be 'body regex regexnameX_-_drop'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="used_in" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The name of policy-map that includes the policy-map('policy-map type inspect' in this case) or the service-policy that applies the policy-map (non 'type inspect' in this case). For example, the former could be when a http inspection policy-map policymapnameX is used in a policy-map policymapnameY as its 'inspect http policymapnameX' command. The latter could be when policymapnameY is applied globally with 'service-policy policymapnameY global'. There is no chance where a policy-map can be used in both a policy-map and a service policy at the same time.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ======================== ASA MPF SERVICE-POLICY TEST ========================== -->
<!-- =============================================================================== -->
<xsd:element name="service_policy_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The service_policy test is used to check the properties of specific output lines from an MPF service-policy configuration.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>service_policy_test</oval:test>
<oval:object>service_policy_object</oval:object>
<oval:state>service_policy_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-asa-mpf">service_policy_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-asa-service_policytst">
<sch:rule context="x-asa-mpf:service_policy_test/x-asa-mpf:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-asa-mpf:service_policy_object/@id"><sch:value-of select="../@id"/> - the object child element of an service_policy_test must reference an service_policy_object</sch:assert>
</sch:rule>
<sch:rule context="x-asa-mpf:service_policy_test/x-asa-mpf:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-asa-mpf:service_policy_state/@id"><sch:value-of select="../@id"/> - the state child element of an service_policy_test must reference an service_policy_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="service_policy_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The service_policy_object element is used by an service_policy test to define the object to be evaluated. 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:documentation>A service_policy object consists of a name entity that is the name of the ASA 'service-policy' configurate to be tested.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-asa-mpf_service_policy_object_verify_filter_state">
<sch:rule context="x-asa-mpf:service_policy_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-asa-mpf:service_policy_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#x-asa-mpf') and ($state_name='service_policy_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 MPF service-policy name.</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="service_policy_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The service_policy_state element defines the different information that can be used to evaluate service-policy ASA configuration. This includes the service-policy name, where it is applied and the interface it is applied (if applicable). Please refer to the individual elements in the schema for more details about what each represents.</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 service-policy name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="applied" type="x-asa-mpf:EntityStateApplyServicePolicyType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Where he service-policy is applied.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="interface" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The interface the service-policy is applied (of the 'applied' element has value "INTERFACE').</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ============================ ASA MPF TCP-MAP TEST ============================= -->
<!-- =============================================================================== -->
<xsd:element name="tcp_map_test" substitutionGroup="oval-def:test">
<xsd:annotation>
<xsd:documentation>The tcp_map test is used to check the properties of specific output lines from a tcp-map ASA configuration.</xsd:documentation>
<xsd:appinfo>
<oval:element_mapping>
<oval:test>tcp_map_test</oval:test>
<oval:object>tcp_map_object</oval:object>
<oval:state>tcp_map_state</oval:state>
<oval:item target_namespace="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#x-asa-mpf">tcp_map_item</oval:item>
</oval:element_mapping>
</xsd:appinfo>
<xsd:appinfo>
<sch:pattern id="x-asa-mpftst">
<sch:rule context="x-asa-mpf:tcp_map_test/x-asa-mpf:object">
<sch:assert test="@object_ref=ancestor::oval-def:oval_definitions/oval-def:objects/x-asa-mpf:service_policy_object/@id"><sch:value-of select="../@id"/> - the object child element of an service_policy_test must reference an service_policy_object</sch:assert>
</sch:rule>
<sch:rule context="x-asa-mpf:tcp_map_test/x-asa-mpf:state">
<sch:assert test="@state_ref=ancestor::oval-def:oval_definitions/oval-def:states/x-asa-mpf:service_policy_state/@id"><sch:value-of select="../@id"/> - the state child element of an service_policy_test must reference an service_policy_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="tcp_map_object" substitutionGroup="oval-def:object">
<xsd:annotation>
<xsd:documentation>The tcp-map_object element is used by an tcp_map test to define the object to be evaluated. 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:documentation>A service_policy object consists of a name entity that is the name of the ASA 'tcp-map' configuration to be tested.</xsd:documentation>
<xsd:appinfo>
<sch:pattern id="x-asa-mpf_service_policy_object_verify_filter_state">
<sch:rule context="x-asa-mpf:tcp_map_object//oval-def:filter">
<sch:let name="parent_object" value="ancestor::x-asa-mpf:tcp_map_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#x-asa-mpf') and ($state_name='service_policy_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 MPF tcp-map name.</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="tcp_map_state" substitutionGroup="oval-def:state">
<xsd:annotation>
<xsd:documentation>The tcp_map_state element defines the different information that can be used to evaluate the result of a specific 'tcp-map' ASA configuration. This includes the tcp-map name and its configured options. Please refer to the individual elements in the schema for more details about what each represents.</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 tcp-map name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="options" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>The configured commends in the tcp-map. These could include TCP options, flags and other options of the tcp-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ============================ MPF STATE TYPES =============================== -->
<!-- =============================================================================== -->
<xsd:complexType name="EntityStateClassMapType">
<xsd:annotation>
<xsd:documentation>The EntityStateClassMapType complex type restricts a string value to a specific set of values: INSPECT, REGEX, MANAGEMENT. These values describe the MPF class-map types in Cisco ASA MPF configurations.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateStringType">
<xsd:enumeration value="INSPECT"/>
<xsd:enumeration value="REGEX"/>
<xsd:enumeration value="MANAGEMENT"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityStateInpsectionType">
<xsd:annotation>
<xsd:documentation>The EntityStateInpsectionType complex type restricts a string value to a specific set of values. These values describe the MPF inspection types of class-map and policy-map configurations in Cisco ASA MPF configurations.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateStringType">
<xsd:enumeration value="DCERPC"/>
<xsd:enumeration value="DNS"/>
<xsd:enumeration value="ESMTP"/>
<xsd:enumeration value="FTP"/>
<xsd:enumeration value="GTP"/>
<xsd:enumeration value="H323"/>
<xsd:enumeration value="HTTP"/>
<xsd:enumeration value="IM"/>
<xsd:enumeration value="IPV6"/>
<xsd:enumeration value="MGCP"/>
<xsd:enumeration value="NETBIOS"/>
<xsd:enumeration value="RADIUS-ACCOUNTING"/>
<xsd:enumeration value="RTSP"/>
<xsd:enumeration value="SCANSAFE"/>
<xsd:enumeration value="SIP"/>
<xsd:enumeration value="SKINNY"/>
<xsd:enumeration value="SNMP"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityStateApplyServicePolicyType">
<xsd:annotation>
<xsd:documentation>The EntityStateApplyServicePolicyType complex type restricts a string value to a specific set of values: GLOBAL, INTERFACE. These values describe where a service-policy is applied in a Cisco ASA MPF configuration.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateStringType">
<xsd:enumeration value="GLOBAL"/>
<xsd:enumeration value="INTERFACE"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityStateMatchType">
<xsd:annotation>
<xsd:documentation>The EntityStateMatchType complex type restricts a string value to a specific set of values: ANY, ALL. These values describe the match type of a class-map in a Cisco ASA MPF configuration.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-def:EntityStateStringType">
<xsd:enumeration value="ANY"/>
<xsd:enumeration value="ALL"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<!-- =============================================================================== -->
<!-- ===================== ASA MPF CLASS-MAP ITEM ============================== -->
<!-- =============================================================================== -->
<xsd:element name="class_map_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>Stores information about the MPF class-map configuration in ASA. That information includes the name, the type, the inspection type, the match type, the match commands, the policy-map or class-map it is used and the action in the policy-map.</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>Elementd with the name of the class-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type" type="x-asa-mpf:EntityItemClassMapType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the type of the 'class-map nameX type' command.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type_inspect" type="x-asa-mpf:EntityItemInpsectionType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the inspection type of the class-map ('class-map type inspect' command).</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="match_all_any" type="x-asa-mpf:EntityItemMatchType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the 'match-all' or 'match-any' type of the class-map. ASA's defaults to 'match-any'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="match" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the match commands in the class-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="used_in_class_map" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the name of the class-map (for nested class-maps) that this class-map is used in.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="used_in_policy_map" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the name of the policy-map that this class-map is used in.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="policy_map_action" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the command that identifies the action for the class. For example that could be 'inspect protocolX', 'drop' or 'police 1000' or 'set connection advanced-options tcpmapX'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ========================= ASA MPF POLICY-MAP ITEM =============================== -->
<!-- =============================================================================== -->
<xsd:element name="policy_map_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>Stores information about a policy-map configuration in ASA. That information includes the policy-map name, the inspection type, the paremeters, the match and action commands, the policy-map it is used in and the service-policy that applies it.</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>Element with the policy-map name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="type_inspect" type="x-asa-mpf:EntityItemInpsectionType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the inspection type of the class-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="parameters" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the parameter commands of the policy-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="match_action" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the in-line match command and the action in the policy-map seperated by delimeter '_-_'. For example an http inspect policy-map could have 'match body regex regexnameX' and the action be 'drop'. Then this element would be 'body regex regexnameX_-_drop'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="used_in" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the name of policy-map that includes the policy-map('policy-map type inspect' in this case) or the serice-policy that applies the policy-map (non 'type inspect' in this case). For example, the former could be when a http inspection policy-map policymapnameX is used in a policy-map policymapnameY as its 'inspect http policymapnameX' command. The latter could be when policymapnameY is applied globally with 'service-policy policymapnameY global'. There is no chance where a policy-map can be used in both a policy-map and a service policy at the same time.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ========================= ASA MPF SERVICE-POLICY ITEM ============================== -->
<!-- =============================================================================== -->
<xsd:element name="service_policy_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>Stores information about an MPF service-policy configuration in ASA. That information includes the service-policy name, where it is applied and the interface it is applied (if applicable).</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>Element with the service-policy name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="applied" type="x-asa-mpf:EntityItemApplyServicePolicyType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with where the service-policy is applied.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="interface" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the interface the service-policy is applied (of the 'applied' element has value "INTERFACE').</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- ======================== ASA MPF TCP-MAP ITEM ============================== -->
<!-- =============================================================================== -->
<xsd:element name="tcp_map_item" substitutionGroup="oval-sc:item">
<xsd:annotation>
<xsd:documentation>Stores information about MPF tcp-map configuration in ASA. That information includes the tcp-map name and its configured options.</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>Element with the tcp-map name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="options" type="oval-sc:EntityItemStringType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>Element with the configured commends in the tcp-map. These could include TCP options, flags and other options of the tcp-map.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<!-- =============================================================================== -->
<!-- =============================== MPF ITEM TYPES ============================= -->
<!-- =============================================================================== -->
<xsd:complexType name="EntityItemClassMapType">
<xsd:annotation>
<xsd:documentation>The EntityItemClassMapType complex type restricts a string value to a specific set of values: INSPECT, REGEX, MANAGEMENT. These values describe the MPF class-map types in Cisco ASA MPF configurations.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-sc:EntityItemStringType">
<xsd:enumeration value="INSPECT"/>
<xsd:enumeration value="REGEX"/>
<xsd:enumeration value="MANAGEMENT"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityItemInpsectionType">
<xsd:annotation>
<xsd:documentation>The EntityItemInpsectionType complex type restricts a string value to a specific set of values. These values describe the MPF inspection types of class-map and policy-map configurations in Cisco ASA MPF configurations.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-sc:EntityItemStringType">
<xsd:enumeration value="DCERPC"/>
<xsd:enumeration value="DNS"/>
<xsd:enumeration value="ESMTP"/>
<xsd:enumeration value="FTP"/>
<xsd:enumeration value="GTP"/>
<xsd:enumeration value="H323"/>
<xsd:enumeration value="HTTP"/>
<xsd:enumeration value="IM"/>
<xsd:enumeration value="IPV6"/>
<xsd:enumeration value="MGCP"/>
<xsd:enumeration value="NETBIOS"/>
<xsd:enumeration value="RADIUS-ACCOUNTING"/>
<xsd:enumeration value="RTSP"/>
<xsd:enumeration value="SCANSAFE"/>
<xsd:enumeration value="SIP"/>
<xsd:enumeration value="SKINNY"/>
<xsd:enumeration value="SNMP"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityItemApplyServicePolicyType">
<xsd:annotation>
<xsd:documentation>The EntityItemApplyServicePolicyType complex type restricts a string value to a specific set of values: GLOBAL, INTERFACE. These values describe where a service-policy is applied in a Cisco ASA MPF configuration.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-sc:EntityItemStringType">
<xsd:enumeration value="GLOBAL"/>
<xsd:enumeration value="INTERFACE"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="EntityItemMatchType">
<xsd:annotation>
<xsd:documentation>The EntityItemMatchType complex type restricts a string value to a specific set of values: ANY, ALL. These values describe the match type of a class-map in a Cisco ASA MPF configuration.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="oval-sc:EntityItemStringType">
<xsd:enumeration value="ANY"/>
<xsd:enumeration value="ALL"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>