forked from contiv-experimental/contivmodel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rule.json
125 lines (125 loc) · 4.15 KB
/
rule.json
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
{
"name": "contivModel",
"objects": [
{
"name": "rule",
"version": "v1",
"type": "object",
"key": [ "tenantName", "policyName", "ruleId" ],
"cfgProperties": {
"tenantName": {
"type": "string",
"title": "Tenant Name",
"length": 64,
"format": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])$",
"showSummary": true
},
"policyName": {
"type": "string",
"title": "Policy Name",
"length": 64,
"format": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])$",
"showSummary": true
},
"ruleId": {
"type": "string",
"title": "Rule Name",
"length": 64,
"format": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])$",
"title": "Rule Id",
"description": "Rule identifier, unique string to identify the rule within policy",
"showSummary": true
},
"direction": {
"type": "string",
"format": "^(in|out)$",
"title": "Direction",
"showSummary": true
},
"priority": {
"type": "int",
"min": 1,
"max": 100,
"default": "1",
"title": "Priority",
"description": "Priority of the rule. Higher the number, higher the priority",
"showSummary": true
},
"fromEndpointGroup": {
"type": "string",
"length": 64,
"format": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])?$",
"title": "From Endpoint Group",
"description": "Match from endpoint group. Valid only in incoming direction",
"showSummary": true
},
"toEndpointGroup": {
"type": "string",
"length": 64,
"format": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])?$",
"title": "To Endpoint Group",
"description": "Match to endpoint group. Valid only in outoing direction",
"showSummary": true
},
"fromNetwork": {
"type": "string",
"length": 64,
"format": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])?$",
"title": "From Network",
"description": "Match from network. Valid only in incoming direction",
"showSummary": true
},
"toNetwork": {
"type": "string",
"length": 64,
"format": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])?$",
"title": "To Network",
"description": "Match to network. Valid only in outgoing direction",
"showSummary": true
},
"fromIpAddress": {
"type": "string",
"title": "IP Address",
"description": "Match from IP address. Valid only in incoming direction",
"format": "^(((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\\\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})(\\\\-(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))?(/(3[0-1]|2[0-9]|1[0-9]|[1-9]))?)?$",
"showSummary": true
},
"toIpAddress": {
"type": "string",
"title": "IP Address",
"description": "Match to IP address. Valid only in outgoing direction",
"format": "^(((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\\\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})(\\\\-(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))?(/(3[0-1]|2[0-9]|1[0-9]|[1-9]))?)?$",
"showSummary": true
},
"protocol": {
"type": "string",
"format": "^(tcp|udp|icmp||[0-9]{1,3}?)$",
"title": "Protocol",
"showSummary": true
},
"port": {
"type": "int",
"max": 65535,
"title": "Port No",
"showSummary": true
},
"action": {
"type": "string",
"format": "^(allow|deny)$",
"title": "Action",
"showSummary": true
}
},
"link-sets": {
"policies": {
"ref": "policy"
}
},
"links": {
"matchEndpointGroup": {
"ref": "endpointGroup"
}
}
}
]
}