last sync: 2021-Oct-15 16:53:12 UTC

Azure Policy definition

Configure Azure SignalR Service to disable local authentication

Name Configure Azure SignalR Service to disable local authentication
Azure Portal
Id 702133e5-5ec5-4f90-9638-c78e22f13b39
Version 1.0.0
details on versioning
Category SignalR
Microsoft docs
Description Disable local authentication methods so that your Azure SignalR Service exclusively requires Azure Active Directory identities for authentication.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Modify
Allowed: (Modify, Disabled)
Used RBAC Role
Role Name Role Id
SignalR/Web PubSub Contributor 8cf5e20a-e4b2-4e9d-b3a1-5ceb692c2761
History
Date/Time (UTC ymd) (i) Change type Change detail
2021-09-08 15:39:57 add 702133e5-5ec5-4f90-9638-c78e22f13b39
Used in Initiatives none
JSON
{
  "displayName": "Configure Azure SignalR Service to disable local authentication",
  "policyType": "BuiltIn",
  "mode": "Indexed",
  "description": "Disable local authentication methods so that your Azure SignalR Service exclusively requires Azure Active Directory identities for authentication.",
  "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"
        },
        {
          "field": "Microsoft.SignalRService/SignalR/disableLocalAuth",
          "notEquals": true
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "conflictEffect": "audit",
        "roleDefinitionIds": [
          "/providers/Microsoft.Authorization/roleDefinitions/8cf5e20a-e4b2-4e9d-b3a1-5ceb692c2761"
        ],
        "operations": [
          {
            "condition": "[greaterOrEquals(requestContext().apiVersion, '2021-06-01-preview')]",
            "operation": "addOrReplace",
            "field": "Microsoft.SignalRService/SignalR/disableLocalAuth",
            "value": true
          }
        ]
      }
    }
  }
}