Skip to content

Commit

Permalink
Update API specs 2020-05-01 (#9542)
Browse files Browse the repository at this point in the history
* update 2020-05-01 version

* Add samples

* Update version

* Update example

* Fix case
  • Loading branch information
digavino authored Jun 2, 2020
1 parent 5f629e8 commit 9f0049e
Show file tree
Hide file tree
Showing 12 changed files with 1,772 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
"rulesEngine": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"
},
"enabledState": "Enabled"
"enabledState": "Enabled",
"webApplicationFirewallPolicyLink": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"
}
}
}
],
Expand Down Expand Up @@ -173,7 +176,10 @@
"rulesEngine": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"
},
"enabledState": "Enabled"
"enabledState": "Enabled",
"webApplicationFirewallPolicyLink": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"
}
}
}
],
Expand Down Expand Up @@ -318,7 +324,10 @@
"rulesEngine": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"
},
"enabledState": "Enabled"
"enabledState": "Enabled",
"webApplicationFirewallPolicyLink": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"
}
}
}
],
Expand Down Expand Up @@ -463,7 +472,10 @@
"rulesEngine": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"
},
"enabledState": "Enabled"
"enabledState": "Enabled",
"webApplicationFirewallPolicyLink": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
"rulesEngine": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"
},
"enabledState": "Enabled"
"enabledState": "Enabled",
"webApplicationFirewallPolicyLink": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
"rulesEngine": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"
},
"enabledState": "Enabled"
"enabledState": "Enabled",
"webApplicationFirewallPolicyLink": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
"rulesEngine": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/rulesEngines/rulesEngine1"
},
"enabledState": "Enabled"
"enabledState": "Enabled",
"webApplicationFirewallPolicyLink": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/policy1"
}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"parameters": {
"api-version": "2020-05-01",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "DefaultRuleSet_1.0",
"id": "/subscriptions/subid/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets",
"type": "Microsoft.Network/frontdoorwebapplicationfirewallmanagedrulesets",
"properties": {
"provisioningState": "Succeeded",
"ruleSetId": "8125d145-ddc5-4d90-9bc3-24c5f2de69a2",
"ruleSetType": "DefaultRuleSet",
"ruleSetVersion": "1.0",
"ruleGroups": [
{
"ruleGroupName": "SQLI",
"description": "SQL injection",
"rules": [
{
"ruleId": "942100",
"description": "SQL Injection Attack Detected via libinjection",
"defaultState": "Enabled",
"defaultAction": "Block"
},
{
"ruleId": "942110",
"description": "SQL Injection Attack: Common Injection Testing Detected",
"defaultState": "Enabled",
"defaultAction": "Block"
}
]
},
{
"ruleGroupName": "XSS",
"description": "Cross-site scripting",
"rules": [
{
"ruleId": "941100",
"description": "XSS Attack Detected via libinjection",
"defaultState": "Enabled",
"defaultAction": "Block"
},
{
"ruleId": "941101",
"description": "XSS Attack Detected via libinjection",
"defaultState": "Enabled",
"defaultAction": "Block"
},
{
"ruleId": "941110",
"description": "XSS Filter - Category 1: Script Tag Vector",
"defaultState": "Enabled",
"defaultAction": "Block"
}
]
}
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"parameters": {
"api-version": "2020-05-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Policy1",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/Policy1",
"type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies",
"tags": {
"key1": "value1",
"key2": "value2"
},
"location": "WestUs",
"properties": {
"resourceState": "Enabled",
"provisioningState": "Succeeded",
"policySettings": {
"enabledState": "Enabled",
"mode": "Prevention",
"redirectUrl": "http://www.bing.com",
"customBlockResponseStatusCode": 499,
"customBlockResponseBody": "PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg=="
},
"customRules": {
"rules": [
{
"name": "Rule1",
"priority": 1,
"enabledState": "Enabled",
"ruleType": "RateLimitRule",
"rateLimitDurationInMinutes": 0,
"rateLimitThreshold": 1000,
"matchConditions": [
{
"matchVariable": "RemoteAddr",
"selector": null,
"operator": "IPMatch",
"negateCondition": false,
"matchValue": [
"192.168.1.0/24",
"10.0.0.0/24"
],
"transforms": []
}
],
"action": "Block"
},
{
"name": "Rule2",
"priority": 2,
"enabledState": "Enabled",
"ruleType": "MatchRule",
"rateLimitDurationInMinutes": 0,
"rateLimitThreshold": 0,
"matchConditions": [
{
"matchVariable": "RemoteAddr",
"selector": null,
"operator": "GeoMatch",
"negateCondition": false,
"matchValue": [
"CH"
]
},
{
"matchVariable": "RequestHeader",
"selector": "UserAgent",
"operator": "Contains",
"negateCondition": false,
"matchValue": [
"windows"
],
"transforms": [
"Lowercase"
]
}
],
"action": "Block"
}
]
},
"managedRules": {
"managedRuleSets": [
{
"ruleSetType": "DefaultRuleSet",
"ruleSetVersion": "1.0",
"exclusions": [
{
"matchVariable": "RequestHeaderNames",
"selectorMatchOperator": "Equals",
"selector": "User-Agent"
}
],
"ruleGroupOverrides": [
{
"ruleGroupName": "SQLI",
"rules": [
{
"ruleId": "942100",
"enabledState": "Enabled",
"action": "Redirect"
},
{
"ruleId": "942110",
"enabledState": "Disabled"
}
]
}
]
}
]
},
"frontendEndpointLinks": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontdoors/fd1/frontendendpoints/fd1-azurefd-net"
}
]
}
}
]
}
}
}
}
Loading

0 comments on commit 9f0049e

Please sign in to comment.