Skip to content

Commit f7319d6

Browse files
gokmen-msftAzure Policy Bot
and
Azure Policy Bot
authoredMar 13, 2024
Built-in Policy Release 090250c3 (#1287)
Co-authored-by: Azure Policy Bot <[email protected]>
1 parent e7f11f9 commit f7319d6

File tree

5,726 files changed

+223621
-206953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,726 files changed

+223621
-206953
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"properties": {
3+
"displayName": "API Management subscriptions should not be scoped to all APIs",
4+
"policyType": "BuiltIn",
5+
"mode": "All",
6+
"description": "API Management subscriptions should be scoped to a product or an individual API instead of all APIs, which could result in an excessive data exposure.",
7+
"metadata": {
8+
"version": "1.1.0",
9+
"category": "API Management"
10+
},
11+
"version": "1.1.0",
12+
"policyRule": {
13+
"if": {
14+
"allOf": [
15+
{
16+
"field": "type",
17+
"equals": "Microsoft.ApiManagement/service/subscriptions"
18+
},
19+
{
20+
"field": "Microsoft.ApiManagement/service/subscriptions/scope",
21+
"like": "*/apis"
22+
},
23+
{
24+
"field": "Microsoft.ApiManagement/service/subscriptions/state",
25+
"equals": "active"
26+
}
27+
]
28+
},
29+
"then": {
30+
"effect": "[parameters('effect')]"
31+
}
32+
},
33+
"parameters": {
34+
"effect": {
35+
"type": "string",
36+
"metadata": {
37+
"displayName": "Effect",
38+
"description": "Enable or disable the execution of the policy"
39+
},
40+
"allowedValues": [
41+
"Audit",
42+
"Disabled",
43+
"Deny"
44+
],
45+
"defaultValue": "Audit"
46+
}
47+
},
48+
"versions": [
49+
"1.1.0"
50+
]
51+
},
52+
"id": "/providers/Microsoft.Authorization/policyDefinitions/3aa03346-d8c5-4994-a5bc-7652c2a2aef1",
53+
"name": "3aa03346-d8c5-4994-a5bc-7652c2a2aef1"
54+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"properties": {
3+
"displayName": "API Management service should use a SKU that supports virtual networks",
4+
"policyType": "BuiltIn",
5+
"mode": "Indexed",
6+
"description": "With supported SKUs of API Management, deploying service into a virtual network unlocks advanced API Management networking and security features which provides you greater control over your network security configuration. Learn more at: https://aka.ms/apimvnet.",
7+
"metadata": {
8+
"version": "1.0.0",
9+
"category": "API Management"
10+
},
11+
"version": "1.0.0",
12+
"parameters": {
13+
"effect": {
14+
"type": "String",
15+
"metadata": {
16+
"displayName": "Effect",
17+
"description": "Enable or disable the execution of the policy"
18+
},
19+
"allowedValues": [
20+
"Audit",
21+
"Deny",
22+
"Disabled"
23+
],
24+
"defaultValue": "Audit"
25+
},
26+
"listOfAllowedSKUs": {
27+
"type": "Array",
28+
"metadata": {
29+
"description": "The list of SKUs that can be specified for Azure API Management service.",
30+
"displayName": "Allowed SKUs"
31+
},
32+
"allowedValues": [
33+
"Developer",
34+
"Basic",
35+
"Standard",
36+
"Premium",
37+
"Isolated",
38+
"Consumption"
39+
],
40+
"defaultValue": [
41+
"Developer",
42+
"Premium",
43+
"Isolated"
44+
]
45+
}
46+
},
47+
"policyRule": {
48+
"if": {
49+
"allOf": [
50+
{
51+
"field": "type",
52+
"equals": "Microsoft.ApiManagement/service"
53+
},
54+
{
55+
"not": {
56+
"field": "Microsoft.ApiManagement/service/sku.name",
57+
"in": "[parameters('listOfAllowedSKUs')]"
58+
}
59+
}
60+
]
61+
},
62+
"then": {
63+
"effect": "[parameters('effect')]"
64+
}
65+
},
66+
"versions": [
67+
"1.0.0"
68+
]
69+
},
70+
"id": "/providers/Microsoft.Authorization/policyDefinitions/73ef9241-5d81-4cd4-b483-8443d1730fe5",
71+
"name": "73ef9241-5d81-4cd4-b483-8443d1730fe5"
72+
}

0 commit comments

Comments
 (0)
Please sign in to comment.