Skip to content

Commit

Permalink
Add audit policy for resource access from other services and tenants
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsyversen committed Aug 18, 2024
1 parent a7df806 commit 1ffe2ef
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "e369a998-a653-4e19-a058-a6256c3f999b",
"type": "Microsoft.Authorization/policyDefinitions",
"properties": {
"displayName": "Audit Allow Azure services and resources to access this server",
"description": "This option configures the firewall to allow connections from IP addresses allocated to any Azure service or asset, including connections from the subscriptions of other customers. Rather than allowing any service in any tenant to access this server, network access should be limited using the virtual network option or private access.",
"metadata": {
"category": "SQL",
"version": "1.0.0",
"preview": true
},
"mode": "All",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Audit or Disabled the execution of the Policy"
},
"allowedValues": [
"Audit",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Sql/servers/firewallrules"
},
{
"field": "name",
"like": "AllowAllWindowsAzureIps"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Audit or Disabled the execution of the Policy"
},
"allowedValues": [
"Audit",
"Disabled"
],
"defaultValue": "Audit"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Sql/servers/firewallrules"
},
{
"field": "name",
"like": "AllowAllWindowsAzureIps"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}

0 comments on commit 1ffe2ef

Please sign in to comment.