Skip to content

Commit ff1a88b

Browse files
authored
Merge pull request #13 from abr-ubiqube/master
update Fortigate microservices
2 parents 0a45969 + db860d2 commit ff1a88b

33 files changed

+161
-151
lines changed

CONTRIBUTING.md

100644100755
File mode changed.

LICENSE

100644100755
File mode changed.

MICROSERVICES/CISCO/interface.xml

100644100755
File mode changed.

MICROSERVICES/CISCO/static_route.xml

100644100755
File mode changed.

MICROSERVICES/CISCO/system.xml

100644100755
File mode changed.

MICROSERVICES/FORTINET/FortigateVA/Managed_Security/Address/.meta_AddressObject.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</entry>
1212
<entry>
1313
<key>DATE_MODIFICATION</key>
14-
<value>1459951803541</value>
14+
<value>1526465538713</value>
1515
</entry>
1616
<entry>
1717
<key>COMMENT</key>
@@ -32,13 +32,13 @@
3232
<key>CONFIGURATION_FILTER</key>
3333
<value></value>
3434
</entry>
35-
<entry>
36-
<key>TAG</key>
37-
<value>AddressObject.xml</value>
38-
</entry>
3935
<entry>
4036
<key>TYPE</key>
4137
<value>UPLOAD</value>
4238
</entry>
39+
<entry>
40+
<key>TAG</key>
41+
<value>AddressObject.xml</value>
42+
</entry>
4343
</map>
4444
</metadata>

MICROSERVICES/FORTINET/FortigateVA/Managed_Security/Address/AddressObject.xml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<behavior displayName="End IP Address" displayOrder="0" groupSeparator="-" maxLength="200" name="params.endIp" selectorValue="iprange" startIncrement="0" type="IpMask"/>
5555
</behaviors>
5656
</variable>
57-
<variable displayName="Interface" displayOrder="7" editable="false" isMandatory="true" maxLength="100" name="params.port" startIncrement="0" type="String">
57+
<variable displayName="Interface" displayOrder="7" editable="false" isMandatory="true" maxLength="100" name="params.port" startIncrement="0" type="ObjectRef">
5858
<values>
5959
<value displayValue="Port4">4</value>
6060
<value displayValue="Port5">5</value>
@@ -64,6 +64,9 @@
6464
<value displayValue="Port9">9</value>
6565
<value displayValue="Port10">10</value>
6666
</values>
67+
<classes>
68+
<class>Interface</class>
69+
</classes>
6770
</variable>
6871
<variable cols="165" displayName="Comment" displayOrder="8" maxLength="200" name="params.comment" rows="1" startIncrement="0" type="String"/>
6972
</variables> <example>
@@ -150,7 +153,7 @@ end
150153
<regexp>@set @</regexp>
151154
</ignore>
152155
<line>
153-
<regexp>@set associated-interface "port(?&lt;port&gt;([4-9]|10))"@</regexp>
156+
<regexp>@set associated-interface "(?&lt;port&gt;[^"]+)"@</regexp>
154157
</line>
155158
<line>
156159
<regexp>@set type (?&lt;type&gt;\S+)@</regexp>
@@ -174,17 +177,5 @@ end
174177
<post_template/>
175178
</command>
176179

177-
<command name="CONSTRAINT">
178-
<operation>{if $params.type=="ipmask"}
179-
{if !empty($params.address)}
180-
{if is_in_network($params.address, "100.64.0.0", "255.192.0.0")} Input restriction. Network 100.64.0.0/10 not allowed.
181-
{/if}
182-
{/if}
183-
{else}
184-
{if !empty($params.startIp) &amp;&amp; !empty($params.endIp)}
185-
{if is_in_network($params.startIp, "100.64.0.0", "255.192.0.0") || is_in_network($params.endIp, "100.64.0.0", "255.192.0.0") || is_overlapping($params.startIp, $params.endIp, "100.64.0.0", "255.192.0.0")} Input restriction. Network 100.64.0.0/10 not allowed.
186-
{/if}
187-
{/if}
188-
{/if}</operation>
189-
</command>
180+
190181
</ObjectDefinition>

MICROSERVICES/FORTINET/FortigateVA/Managed_Security/Firewall_Policy/.meta_Firewall_Policy.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</entry>
1212
<entry>
1313
<key>DATE_MODIFICATION</key>
14-
<value>1468842479502</value>
14+
<value>1526465185805</value>
1515
</entry>
1616
<entry>
1717
<key>COMMENT</key>
@@ -32,13 +32,13 @@
3232
<key>CONFIGURATION_FILTER</key>
3333
<value></value>
3434
</entry>
35-
<entry>
36-
<key>TAG</key>
37-
<value>FW</value>
38-
</entry>
3935
<entry>
4036
<key>TYPE</key>
4137
<value>UPLOAD</value>
4238
</entry>
39+
<entry>
40+
<key>TAG</key>
41+
<value>FW</value>
42+
</entry>
4343
</map>
4444
</metadata>

MICROSERVICES/FORTINET/FortigateVA/Managed_Security/Firewall_Policy/.meta_Firewall_Policy_UTM.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</entry>
1212
<entry>
1313
<key>DATE_MODIFICATION</key>
14-
<value>1468845735352</value>
14+
<value>1526065916617</value>
1515
</entry>
1616
<entry>
1717
<key>COMMENT</key>
@@ -32,13 +32,13 @@
3232
<key>CONFIGURATION_FILTER</key>
3333
<value></value>
3434
</entry>
35-
<entry>
36-
<key>TAG</key>
37-
<value>FW</value>
38-
</entry>
3935
<entry>
4036
<key>TYPE</key>
4137
<value>UPLOAD</value>
4238
</entry>
39+
<entry>
40+
<key>TAG</key>
41+
<value>FW</value>
42+
</entry>
4343
</map>
4444
</metadata>

MICROSERVICES/FORTINET/FortigateVA/Managed_Security/Firewall_Policy/Firewall_Policy.xml

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,33 +41,45 @@ The position is effective when the changes are applied to the device.</descripti
4141
</behaviors>
4242
</variable>
4343
<variable default="true" displayName="Enable" displayOrder="3" maxLength="50" name="params.status" startIncrement="0" type="Boolean"/>
44-
<variable displayName="Incoming Interface" displayOrder="4" editable="false" groupDisplayName="Source" groupSeparator="-" isGrouped="true" isMandatory="true" maxLength="300" name="params.srcintf" startIncrement="0" type="String">
44+
<variable displayName="Incoming Interface" displayOrder="4" editable="false" groupDisplayName="Source" groupSeparator=" - " isGrouped="true" isMandatory="true" maxLength="300" name="params.srcintf" startIncrement="0" type="ObjectRef">
4545
<values>
46-
<value displayValue="Port4">4</value>
47-
<value displayValue="Port5">5</value>
48-
<value displayValue="Port6">6</value>
49-
<value displayValue="Port7">7</value>
50-
<value displayValue="Port8">8</value>
51-
<value displayValue="Port9">9</value>
52-
<value displayValue="Port10">10</value>
46+
<value displayValue="1">1</value>
47+
<value displayValue="2">2</value>
48+
<value displayValue="3">3</value>
49+
<value displayValue="4">4</value>
50+
<value displayValue="5">5</value>
51+
<value displayValue="6">6</value>
52+
<value displayValue="7">7</value>
53+
<value displayValue="8">8</value>
54+
<value displayValue="9">9</value>
55+
<value displayValue="10">10</value>
5356
</values>
57+
<classes>
58+
<class>Interface</class>
59+
</classes>
5460
</variable>
55-
<variable displayName="Source Address" displayOrder="5" editable="false" groupDisplayName="Source" groupSeparator="-" isGrouped="true" isMandatory="true" localVarNameMatch="srcintf" maxLength="200" name="params.srcaddr" remoteVarNameMatch="port" startIncrement="0" type="ObjectRef">
61+
<variable displayName="Source Address" displayOrder="5" editable="false" groupDisplayName="Source" groupSeparator=" - " isGrouped="true" isMandatory="true" localVarNameMatch="srcintf" maxLength="200" name="params.srcaddr" remoteVarNameMatch="port" startIncrement="0" type="ObjectRef">
5662
<classes>
5763
<class>AddressObject</class>
5864
<class>AddressGroup</class>
5965
</classes>
6066
</variable>
61-
<variable displayName="Outgoing Interface" displayOrder="6" editable="false" groupDisplayName="Destination" isGrouped="true" isMandatory="true" maxLength="300" name="params.dstintf" startIncrement="0" type="String">
67+
<variable displayName="Outgoing Interface" displayOrder="6" editable="false" groupDisplayName="Destination" isGrouped="true" isMandatory="true" maxLength="300" name="params.dstintf" startIncrement="0" type="ObjectRef">
6268
<values>
63-
<value displayValue="Port4">4</value>
64-
<value displayValue="Port5">5</value>
65-
<value displayValue="Port6">6</value>
66-
<value displayValue="Port7">7</value>
67-
<value displayValue="Port8">8</value>
68-
<value displayValue="Port9">9</value>
69-
<value displayValue="Port10">10</value>
69+
<value>1</value>
70+
<value>2</value>
71+
<value>3</value>
72+
<value>4</value>
73+
<value>5</value>
74+
<value>6</value>
75+
<value>7</value>
76+
<value>8</value>
77+
<value>9</value>
78+
<value>10</value>
7079
</values>
80+
<classes>
81+
<class>Interface</class>
82+
</classes>
7183
</variable>
7284
<variable default="address" displayCols="4" displayName="Destination Address Type" displayOrder="7" displayType="alt" editable="false" groupDisplayName="Destination" isGrouped="true" isMandatory="true" maxLength="200" name="params.dstaddr_selector" onlyDetailView="true" startIncrement="0" type="String">
7385
<values>
@@ -246,10 +258,10 @@ end
246258
<regexp>@set action (?&lt;action&gt;\S+)@</regexp>
247259
</line>
248260
<line>
249-
<regexp>@set srcintf "port(?&lt;srcintf&gt;\d+)"@</regexp>
261+
<regexp>@set srcintf "(?&lt;srcintf&gt;[^"]+)"@</regexp>
250262
</line>
251263
<line>
252-
<regexp>@set dstintf "port(?&lt;dstintf&gt;\d+)"@</regexp>
264+
<regexp>@set dstintf "(?&lt;dstintf&gt;[^"]+)"@</regexp>
253265
</line>
254266
<line>
255267
<regexp>@set srcaddr "(?&lt;srcaddr&gt;[^"]+)"@</regexp>
@@ -316,8 +328,8 @@ end
316328
<command name="CREATE">
317329
<operation>config firewall policy
318330
edit {$params.object_id}
319-
set srcintf port{$params.srcintf}
320-
set dstintf port{$params.dstintf}
331+
set srcintf {$params.srcintf}
332+
set dstintf {$params.dstintf}
321333
set srcaddr "{$params.srcaddr}"
322334
set match-vip disable
323335
{if empty($params.dstaddr)}
@@ -371,8 +383,8 @@ end
371383
<command name="UPDATE">
372384
<operation>config firewall policy
373385
edit {$params.object_id}
374-
set srcintf port{$params.srcintf}
375-
set dstintf port{$params.dstintf}
386+
set srcintf {$params.srcintf}
387+
set dstintf {$params.dstintf}
376388
set srcaddr "{$params.srcaddr}"
377389
set match-vip disable
378390
{if empty($params.dstaddr)}

0 commit comments

Comments
 (0)