/
WafPolicyGet.json
139 lines (139 loc) · 4.45 KB
/
WafPolicyGet.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
"parameters": {
"api-version": "2024-02-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"policyName": "MicrosoftCdnWafPolicy"
},
"responses": {
"200": {
"body": {
"name": "MicrosoftCdnWafPolicy",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/CdnWebApplicationFirewallPolicies/MicrosoftCdnWafPolicy",
"type": "Microsoft.Cdn/cdnwebapplicationfirewallpolicies",
"tags": {
"key1": "value1",
"key2": "value2"
},
"location": "WestUs",
"sku": {
"name": "Standard_Microsoft"
},
"properties": {
"resourceState": "Enabled",
"provisioningState": "Succeeded",
"policySettings": {
"enabledState": "Enabled",
"mode": "Prevention",
"defaultRedirectUrl": "http://www.bing.com",
"defaultCustomBlockResponseStatusCode": 429,
"defaultCustomBlockResponseBody": "PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="
},
"rateLimitRules": {
"rules": [
{
"name": "RateLimitRule1",
"priority": 1,
"enabledState": "Enabled",
"rateLimitDurationInMinutes": 0,
"rateLimitThreshold": 1000,
"matchConditions": [
{
"matchVariable": "RemoteAddr",
"selector": null,
"operator": "IPMatch",
"negateCondition": false,
"transforms": [],
"matchValue": [
"192.168.1.0/24",
"10.0.0.0/24"
]
}
],
"action": "Block"
}
]
},
"customRules": {
"rules": [
{
"name": "CustomRule1",
"priority": 2,
"enabledState": "Enabled",
"matchConditions": [
{
"matchVariable": "RemoteAddr",
"selector": null,
"operator": "GeoMatch",
"negateCondition": false,
"transforms": [],
"matchValue": [
"CH"
]
},
{
"matchVariable": "RequestHeader",
"selector": "UserAgent",
"operator": "Contains",
"negateCondition": false,
"transforms": [],
"matchValue": [
"windows"
]
},
{
"matchVariable": "QueryString",
"selector": "search",
"operator": "Contains",
"negateCondition": false,
"transforms": [
"UrlDecode",
"Lowercase"
],
"matchValue": [
"<?php",
"?>"
]
}
],
"action": "Block"
}
]
},
"managedRules": {
"managedRuleSets": [
{
"ruleSetType": "DefaultRuleSet",
"ruleSetVersion": "preview-1.0",
"ruleGroupOverrides": [
{
"ruleGroupName": "Group1",
"rules": [
{
"ruleId": "GROUP1-0001",
"enabledState": "Enabled",
"action": "Redirect"
},
{
"ruleId": "GROUP1-0002",
"enabledState": "Disabled"
}
]
}
]
}
]
},
"endpointLinks": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint1"
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cdn/profiles/profile1/endpoints/testEndpoint2"
}
]
}
}
}
}
}