Project: KICS (Provisioning / Security & Compliance)
File: e9c133e5-c2dd-4b7b-8fff-40f2de367b56.md

title: Website Azure Active Directory Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: e9c133e5-c2dd-4b7b-8fff-40f2de367b56 Query name: Website Azure Active Directory Disabled Platform: AzureResourceManager Severity: <span style="color:#edd57e">Low</span> Category: Access Control URL: WebApp should have Azure Active Directory enabled with 'identity.type' set to 'SystemAssigned' or 'userAssignedIdentities' set to 'true'<br> ```json title="Positive test num. 1 - json file" hl_lines="10" { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSitePositive2", "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "location": "location1", "tags": {}, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} } ``` ```json title="Positive test num. 2 - json file" hl_lines="15" { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSitePositive3", "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "location": "location1", "tags": {}, "identity": { "type": "None" }, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} } ``` ```json title="Positive test num. 3 - json file" hl_lines="15" { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSitePositive3", "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "location": "location1", "tags": {}, "identity": {}, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} } ``` <details><summary>Positive test num. 4 - json file</summary> ```json hl_lines="12" { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSitePositive2", "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "location": "location1", "tags": {}, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} }, "parameters": {} }, "kind": "template", "type": "Microsoft.Blueprint/blueprints/artifacts", "name": "myTemplate" } ``` </details> <details><summary>Positive test num. 5 - json file</summary> ```json hl_lines="17" { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSitePositive3", "type":

"apiVersion": "2020-12-01", "location": "location1", "tags": {}, "identity": { "type": "None" }, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} }, "parameters": {} }, "kind": "template", "type": "Microsoft.Blueprint/blueprints/artifacts", "name": "myTemplate" } ``` </details> <details><summary>Positive test num. 6 - json file</summary> ```json hl_lines="17" { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSitePositive3", "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "location": "location1", "tags": {}, "identity": {}, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} }, "parameters": {} }, "kind": "template", "type": "Microsoft.Blueprint/blueprints/artifacts", "name": "myTemplate" } ``` </details> ```json title="Negative test num. 1 - json file" { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSiteNegative1", "type": "Microsoft.Web/sites", "apiVersion": "2019-08-01", "location": "location1", "identity": { "type": "SystemAssigned" }, "tags": {}, "properties": { "enabled": true, "httpsOnly": true }, "resources": [ ] } ], "outputs": {} } ``` ```json title="Negative test num. 2 - json file" { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": { "identityName": "value" }, "functions": [], "resources": [ { "name": "webSiteNegative2", "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "location": "location1", "tags": {}, "identity": { "type": "UserAssigned", "userAssignedIdentities": { "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('identityName'))]": {} } }, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} } ``` ```json title="Negative test num. 3 - json file" { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "webSiteNegative1", "type": "Microsoft.Web/sites", "apiVersion": "2019-08-01", "location": "location1", "identity": { "type": "SystemAssigned" }, "tags": {}, "properties": { "enabled": true, "httpsOnly": true }, "resources": [ ] } ], "outputs": {} }, "parameters": {} }, "kind": "template", "type": "Microsoft.Blueprint/blueprints/artifacts", "name": "myTemplate" } ``` <details><summary>Negative test num. 4 - json file</summary> ```json { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": { "identityName": "value" }, "functions": [], "resources": [ { "name": "webSiteNegative2", "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "location": "location1", "tags": {}, "identity": { "type": "UserAssigned", "userAssignedIdentities": { "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('identityName'))]": {} } }, "properties": { "enabled": true, "httpsOnly": true }, "resources": [] } ], "outputs": {} }, "parameters": {} }, "kind": "template", "type": "Microsoft.Blueprint/blueprints/artifacts", "name": "myTemplate" } ``` </details>