last sync: 2021-May-10 15:04:35 UTC

Azure Policy definition

Modify Azure SignalR Service resources to disable public network access

Name Modify Azure SignalR Service resources to disable public network access
Azure Portal
Id 62a3ae95-8169-403e-a2d2-b82141448092
Version 1.0.0
details on versioning
Category SignalR
Microsoft docs
Description To improve the security of Azure SignalR Service resource, ensure that it isn't exposed to the public internet and can only be accessed from a private endpoint. Disable the public network access property as described in https://aka.ms/asrs/networkacls. This option disables access from any public address space outside the Azure IP range, and denies all logins that match IP or virtual network-based firewall rules. This reduces data leakage risks.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Modify
Allowed: (Modify, Disabled)
Used RBAC Role
Role Name Role Id
SignalR Contributor 8cf5e20a-e4b2-4e9d-b3a1-5ceb692c2761
History
Date/Time (UTC ymd) (i) Change type Change detail
2021-03-09 14:37:41 add 62a3ae95-8169-403e-a2d2-b82141448092
Used in Initiatives none
JSON
{
  "properties": {
    "displayName": "Modify Azure SignalR Service resources to disable public network access",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "To improve the security of Azure SignalR Service resource, ensure that it isn't exposed to the public internet and can only be accessed from a private endpoint. Disable the public network access property as described in https://aka.ms/asrs/networkacls. This option disables access from any public address space outside the Azure IP range, and denies all logins that match IP or virtual network-based firewall rules. This reduces data leakage risks.",
    "metadata": {
      "version": "1.0.0",
      "category": "SignalR"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Modify",
          "Disabled"
        ],
        "defaultValue": "Modify"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.SignalRService/SignalR"
          },
          {
            "anyOf": [
              {
                "field": "Microsoft.SignalRService/SignalR/networkACLs.defaultAction",
                "equals": "Allow"
              },
              {
                "field": "Microsoft.SignalRService/SignalR/networkACLs.publicNetwork.allow",
                "exists": false
              },
              {
                "count": {
                "field": "Microsoft.SignalRService/SignalR/networkACLs.publicNetwork.allow[*]"
                },
                "greater": 0
              }
            ]
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]",
        "details": {
          "conflictEffect": "Audit",
          "roleDefinitionIds": [
            "/providers/Microsoft.Authorization/roleDefinitions/8cf5e20a-e4b2-4e9d-b3a1-5ceb692c2761"
          ],
          "operations": [
            {
              "operation": "addOrReplace",
              "field": "Microsoft.SignalRService/SignalR/networkACLs.defaultAction",
              "value": "Deny"
            },
            {
              "operation": "addOrReplace",
              "field": "Microsoft.SignalRService/SignalR/networkACLs.publicNetwork.allow",
              "value": [
                
              ]
            }
          ]
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/62a3ae95-8169-403e-a2d2-b82141448092",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "62a3ae95-8169-403e-a2d2-b82141448092"
}