WAF 是否需要作为应用程序网关创建的一部分包含在内?
Does WAF need to be included as part of Application Gateway creation?
作为BCP/Disaster恢复计划的一部分,我们想要模拟我们在 bitbucket 中的应用程序网关模板的恢复场景。
我在存储库中有 json 模板和参数文件,但我也看到了网关的 WAF 规则模板文件。
所以基本上有 4 个文件....但是 New-AzResourceGroupDeployment
只包含主模板文件 (-TemplateUri
) 和参数文件 (-TemplateParameterUri
)。那么我如何才能将 WAF 模板指定为网关创建的一部分呢?
我确实在主网关模板文件中看到了对 WAF 规则的引用,但这足够了吗?
sku信息:
"properties": {
"sku": {
"name": "WAF_v2",
"tier": "WAF_v2",
"capacity": 1
您可以在创建 WAF v2 网关时添加 WAF 策略,只需在模板文件中添加以下内容,方法与创建 WAF v2 网关的方式相同已在此 Microsoft Documentation
中完成并根据您的要求提供值:
{
"type": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies",
"apiVersion": "2020-06-01",
"name": "[variables('AGWafPol01')]",
"location": "[parameters('location')]",
"properties": {
"customRules": [
{
"name": "CustRule01",
"priority": 100,
"ruleType": "MatchRule",
"action": "Block",
"matchConditions": [
{
"matchVariables": [
{
"variableName": "RemoteAddr"
}
],
"operator": "IPMatch",
"negationConditon": true,
"matchValues": [
"10.10.10.0/24"
]
}
]
}
],
"policySettings": {
"requestBodyCheck": true,
"maxRequestBodySizeInKb": 128,
"fileUploadLimitInMb": 100,
"state": "Enabled",
"mode": "Prevention"
},
"managedRules": {
"managedRuleSets": [
{
"ruleSetType": "OWASP",
"ruleSetVersion": "3.1"
}
]
}
}
},
作为BCP/Disaster恢复计划的一部分,我们想要模拟我们在 bitbucket 中的应用程序网关模板的恢复场景。
我在存储库中有 json 模板和参数文件,但我也看到了网关的 WAF 规则模板文件。
所以基本上有 4 个文件....但是 New-AzResourceGroupDeployment
只包含主模板文件 (-TemplateUri
) 和参数文件 (-TemplateParameterUri
)。那么我如何才能将 WAF 模板指定为网关创建的一部分呢?
我确实在主网关模板文件中看到了对 WAF 规则的引用,但这足够了吗?
sku信息:
"properties": {
"sku": {
"name": "WAF_v2",
"tier": "WAF_v2",
"capacity": 1
您可以在创建 WAF v2 网关时添加 WAF 策略,只需在模板文件中添加以下内容,方法与创建 WAF v2 网关的方式相同已在此 Microsoft Documentation
中完成并根据您的要求提供值:
{
"type": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies",
"apiVersion": "2020-06-01",
"name": "[variables('AGWafPol01')]",
"location": "[parameters('location')]",
"properties": {
"customRules": [
{
"name": "CustRule01",
"priority": 100,
"ruleType": "MatchRule",
"action": "Block",
"matchConditions": [
{
"matchVariables": [
{
"variableName": "RemoteAddr"
}
],
"operator": "IPMatch",
"negationConditon": true,
"matchValues": [
"10.10.10.0/24"
]
}
]
}
],
"policySettings": {
"requestBodyCheck": true,
"maxRequestBodySizeInKb": 128,
"fileUploadLimitInMb": 100,
"state": "Enabled",
"mode": "Prevention"
},
"managedRules": {
"managedRuleSets": [
{
"ruleSetType": "OWASP",
"ruleSetVersion": "3.1"
}
]
}
}
},