Skip to content

[Bug] Defender for Containers publisher Pods do not support managed identity authentication #1010

@lopf

Description

@lopf

Describe the bug
Microsoft Defender for Containers publisher Pods do not support managed identity authentication when integrating with AKS via custom Log Analytics workspace which has disableLocalAuth: true is set (this is the default also in the LAW AVM module).
The Pods crash when trying to access to Log Analytics workspace with static keys.

According to MS support, this occurs because Defender for Containers still uses the legacy Log Analytics agent internally, which only supports workspace key authentication. The publisher pods have not yet migrated to the Azure Monitor Agent (AMA), which supports managed identity authentication.

Relevant Microsoft documentation:

To Reproduce
Steps to reproduce:

  1. Provision a Log Analytics Workspace with default settings (e.g. via AVM module, disableLocalAuth: true will be set )
  2. Deploy Defender Profile via Bicep or CLI on an AKS cluster, see link
  3. Allow the Defender publisher Pods to start
  4. Observe Pod failures and authentication errors due to the use of static key authentication

Expected behavior
Defender for Containers publisher pods should authenticate using managed identity (Azure AD tokens) without requiring Log Analytics workspace to support local authentication.

Setting disableLocalAuth: true should not break authentication or cause pods to crash.

Additional context
According to Microsoft support, there are plans to retire workspace key authentication by September, 2026 and transition Defender for Containers telemetry ingestion to AMA with full managed identity support.
This migration will eliminate dependency on workspace keys and align the service with modern security best practices.

This circumstance is not publicly documented. Issue already detected and reported in Azure/AKS#4240

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions