/
Disks_DataAccessAuthMode_Modify.json
62 lines (62 loc) · 1.83 KB
/
Disks_DataAccessAuthMode_Modify.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
{
"properties": {
"displayName": "Protect your data with authentication requirements when exporting or uploading to a disk or snapshot.",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth.",
"metadata": {
"version": "1.0.0",
"category": "Compute"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"defaultValue": "Modify",
"allowedValues": [
"Modify",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Compute/disks"
},
{
"field": "Microsoft.Compute/disks/dataAccessAuthMode",
"notEquals": "AzureActiveDirectory"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
],
"conflictEffect": "audit",
"operations": [
{
"operation": "addOrReplace",
"field": "Microsoft.Compute/disks/dataAccessAuthMode",
"value": "AzureActiveDirectory"
}
]
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/c3921d55-b741-4d16-8d56-7f16e99e6892",
"name": "c3921d55-b741-4d16-8d56-7f16e99e6892"
}