| reviewed | 2025-05-25 |
|---|---|
| severity | Critical |
| pillar | Security |
| category | SE:05 Identity and access management |
| resource | Application Insights |
| resourceType | Microsoft.Insights/components |
| online version | https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AppInsights.LocalAuth/ |
Local authentication allows depersonalized access to store telemetry in Application Insights using a shared identifier.
Application Insights (App Insights) includes a built-in local authentication account. The local authentication account is a single non-changeable identifier called an Instrumentation Key. This key allows depersonalized access to send telemetry data to an App Insights resource.
Instead of using the admin account, consider using Entra ID (previously Azure AD) identities. Entra ID provides a centralized identity and authentication system for Azure. This provides a number of benefits including:
- Strong account protection controls with conditional access, identity governance, and privileged identity management.
- Auditing and reporting of account activity.
- Granular access control with role-based access control (RBAC).
- Separation of account types for users and applications.
Consider disabling local authentication and only use identity-based authentication for telemetry operations.
To deploy resource that pass this rule:
- Set the
properties.DisableLocalAuthproperty totrue.
For example:
resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
name: name
location: location
kind: 'web'
properties: {
Application_Type: 'web'
Flow_Type: 'Redfield'
Request_Source: 'IbizaAIExtension'
WorkspaceResourceId: workspaceId
DisableLocalAuth: true
}
}To deploy resource that pass this rule:
- Set the
properties.DisableLocalAuthproperty totrue.
For example:
{
"type": "Microsoft.Insights/components",
"apiVersion": "2020-02-02",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"kind": "web",
"properties": {
"Application_Type": "web",
"Flow_Type": "Redfield",
"Request_Source": "IbizaAIExtension",
"WorkspaceResourceId": "[parameters('workspaceId')]",
"DisableLocalAuth": true
}
}