-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
DisableLocalAuth_CognitiveServices_DINE.json
150 lines (150 loc) · 5.25 KB
/
DisableLocalAuth_CognitiveServices_DINE.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
140
141
142
143
144
145
146
147
148
149
150
{
"properties": {
"displayName": "Configure Azure AI Services resources to disable local key access (disable local authentication)",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Key access (local authentication) is recommended to be disabled for security. Azure OpenAI Studio, typically used in development/testing, requires key access and will not function if key access is disabled. After disabling, Microsoft Entra ID becomes the only access method, which allows maintaining minimum privilege principle and granular control. Learn more at: https://aka.ms/AI/auth",
"metadata": {
"version": "1.0.0",
"category": "Azure Ai Services"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "DeployIfNotExists",
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
},
"disableLocalAuth": {
"type": "String",
"metadata": {
"displayName": "disableLocalAuth",
"description": "The disableLocalAuth property of the Azure AI service"
},
"allowedValues": [
"true",
"false"
],
"defaultValue": "true"
},
"publicNetworkAccess": {
"type": "String",
"metadata": {
"displayName": "publicNetworkAccess",
"description": "The publicNetworkAccess property of the Azure AI service"
},
"allowedValues": [
"Disabled",
"Enabled"
],
"defaultValue": "Disabled"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.CognitiveServices/accounts"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.CognitiveServices/accounts",
"name": "[field('name')]",
"existenceCondition": {
"field": "Microsoft.CognitiveServices/accounts/disableLocalAuth",
"equals": true
},
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/a001fd3d-188f-4b5d-821b-7da978bf7442",
"/providers/microsoft.authorization/roleDefinitions/25fbc0a9-bd7c-42a3-aa1a-3b75d497ee68"
],
"deployment": {
"properties": {
"mode": "incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceName": {
"type": "string"
},
"location": {
"type": "string"
},
"disableLocalAuth": {
"type": "string"
},
"kind": {
"type": "string"
},
"sku": {
"type": "object"
},
"publicNetworkAccess": {
"type": "string"
},
"networkAcls": {
"type": "object"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2023-10-01-preview",
"name": "[parameters('resourceName')]",
"kind": "[parameters('kind')]",
"sku": "[parameters('sku')]",
"location": "[parameters('location')]",
"properties": {
"customSubDomainName": "[parameters('resourceName')]",
"disableLocalAuth": "[parameters('disableLocalAuth')]",
"publicNetworkAccess": "[parameters('publicNetworkAccess')]",
"networkAcls": "[parameters('networkAcls')]"
}
}
],
"outputs": {}
},
"parameters": {
"location": {
"value": "[field('location')]"
},
"resourceName": {
"value": "[field('name')]"
},
"disableLocalAuth": {
"value": "[parameters('disableLocalAuth')]"
},
"kind": {
"value": "[field('kind')]"
},
"sku": {
"value": "[field('Microsoft.CognitiveServices/accounts/sku')]"
},
"publicNetworkAccess": {
"value": "[parameters('publicNetworkAccess')]"
},
"networkAcls": {
"value": "[field('Microsoft.CognitiveServices/accounts/networkAcls')]"
}
}
}
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/55eff01b-f2bd-4c32-9203-db285f709d30",
"name": "55eff01b-f2bd-4c32-9203-db285f709d30"
}