/
BackendAuth_AuditDeny.json
82 lines (82 loc) · 2.4 KB
/
BackendAuth_AuditDeny.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
{
"properties": {
"displayName": "API Management calls to API backends should be authenticated",
"policyType": "BuiltIn",
"mode": "All",
"description": "Calls from API Management to backends should use some form of authentication, whether via certificates or credentials. Does not apply to Service Fabric backends.",
"metadata": {
"version": "1.0.1",
"category": "API Management"
},
"version": "1.0.1",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.ApiManagement/service/backends"
},
{
"field": "Microsoft.ApiManagement/service/backends/url",
"exists": "true"
},
{
"field": "Microsoft.ApiManagement/service/backends/protocol",
"equals": "http"
},
{
"allOf": [
{
"anyOf": [
{
"field": "Microsoft.ApiManagement/service/backends/credentials.certificate",
"exists": "false"
},
{
"value": "[length(field('Microsoft.ApiManagement/service/backends/credentials.certificate[*]'))]",
"equals": 0
}
]
},
{
"anyOf": [
{
"field": "Microsoft.ApiManagement/service/backends/credentials.authorization.scheme",
"exists": "false"
},
{
"field": "Microsoft.ApiManagement/service/backends/credentials.authorization.parameter",
"exists": "false"
}
]
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"parameters": {
"effect": {
"type": "string",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit"
}
},
"versions": [
"1.0.1"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/c15dcc82-b93c-4dcb-9332-fbf121685b54",
"name": "c15dcc82-b93c-4dcb-9332-fbf121685b54"
}