Skip to content

Commit a53cc8e

Browse files
network/2020-05-01: adding the missing web application firewall files (Azure#10384)
* network/2020-05-01: adding the missing web application firewall files * linking the file * adding examples * code review fixes * ignoring the linter because apparently the networking api's don't follow it..
1 parent 0318e07 commit a53cc8e

File tree

7 files changed

+1361
-1
lines changed

7 files changed

+1361
-1
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-05-01",
4+
"subscriptionId": "subid"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"name": "Policy1",
12+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/Policy1",
13+
"type": "Microsoft.Network/applicationgatewaywebapplicationfirewallpolicies",
14+
"tags": {
15+
"key1": "value1",
16+
"key2": "value2"
17+
},
18+
"location": "WestUs",
19+
"properties": {
20+
"resourceState": "Enabled",
21+
"provisioningState": "Succeeded",
22+
"policySettings": {
23+
"state": "Enabled",
24+
"mode": "Prevention",
25+
"maxRequestBodySizeInKb": 128,
26+
"fileUploadLimitInMb": 750,
27+
"requestBodyCheck": true
28+
},
29+
"customRules": [
30+
{
31+
"name": "Rule1",
32+
"priority": 1,
33+
"ruleType": "MatchRule",
34+
"matchConditions": [
35+
{
36+
"matchVariables": [
37+
{
38+
"variableName": "RemoteAddr",
39+
"selector": null
40+
}
41+
],
42+
"operator": "IPMatch",
43+
"negationConditon": false,
44+
"matchValues": [
45+
"192.168.1.0/24",
46+
"10.0.0.0/24"
47+
],
48+
"transforms": []
49+
}
50+
],
51+
"action": "Block"
52+
},
53+
{
54+
"name": "Rule2",
55+
"priority": 2,
56+
"ruleType": "MatchRule",
57+
"matchConditions": [
58+
{
59+
"matchVariables": [
60+
{
61+
"variableName": "RemoteAddr",
62+
"selector": null
63+
}
64+
],
65+
"operator": "IPMatch",
66+
"negationConditon": false,
67+
"matchValues": [
68+
"192.168.1.0/24"
69+
]
70+
},
71+
{
72+
"matchVariables": [
73+
{
74+
"variableName": "RequestHeader",
75+
"selector": "UserAgent"
76+
}
77+
],
78+
"operator": "Contains",
79+
"negationConditon": false,
80+
"matchValues": [
81+
"Windows"
82+
]
83+
}
84+
],
85+
"action": "Block"
86+
}
87+
],
88+
"managedRules": {
89+
"managedRuleSets": [
90+
{
91+
"ruleSetType": "OWASP",
92+
"ruleSetVersion": "3.0"
93+
}
94+
]
95+
}
96+
}
97+
}
98+
]
99+
}
100+
}
101+
}
102+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-05-01",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "rg1"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"name": "Policy1",
13+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/Policy1",
14+
"type": "Microsoft.Network/applicationgatewaywebapplicationfirewallpolicies",
15+
"tags": {
16+
"key1": "value1",
17+
"key2": "value2"
18+
},
19+
"location": "WestUs",
20+
"properties": {
21+
"resourceState": "Enabled",
22+
"provisioningState": "Succeeded",
23+
"policySettings": {
24+
"state": "Enabled",
25+
"mode": "Detection",
26+
"maxRequestBodySizeInKb": 128,
27+
"fileUploadLimitInMb": 750,
28+
"requestBodyCheck": true
29+
},
30+
"managedRules": {
31+
"managedRuleSets": [
32+
{
33+
"ruleSetType": "OWASP",
34+
"ruleSetVersion": "3.0"
35+
}
36+
]
37+
},
38+
"customRules": [
39+
{
40+
"name": "Rule1",
41+
"priority": 1,
42+
"ruleType": "MatchRule",
43+
"matchConditions": [
44+
{
45+
"matchVariables": [
46+
{
47+
"variableName": "RemoteAddr",
48+
"selector": null
49+
}
50+
],
51+
"operator": "IPMatch",
52+
"negationConditon": false,
53+
"matchValues": [
54+
"192.168.1.0/24",
55+
"10.0.0.0/24"
56+
],
57+
"transforms": []
58+
}
59+
],
60+
"action": "Block"
61+
},
62+
{
63+
"name": "Rule2",
64+
"priority": 2,
65+
"ruleType": "MatchRule",
66+
"matchConditions": [
67+
{
68+
"matchVariables": [
69+
{
70+
"variableName": "RemoteAddr",
71+
"selector": null
72+
}
73+
],
74+
"operator": "IPMatch",
75+
"negationConditon": false,
76+
"matchValues": [
77+
"192.168.1.0/24"
78+
]
79+
},
80+
{
81+
"matchVariables": [
82+
{
83+
"variableName": "RequestHeader",
84+
"selector": "UserAgent"
85+
}
86+
],
87+
"operator": "Contains",
88+
"negationConditon": false,
89+
"matchValues": [
90+
"Windows"
91+
]
92+
}
93+
],
94+
"action": "Block"
95+
}
96+
]
97+
}
98+
}
99+
]
100+
}
101+
}
102+
}
103+
}

0 commit comments

Comments
 (0)