Network access and permissions reference for Defender for Containers - Microsoft Defender for Cloud (original) (raw)

This article describes the network connectivity and permission requirements for Microsoft Defender for Containers.

The requirements in this article depend on the enabled features and the environment in which your container workloads run.

Learn more about connectivity patterns and plan components.

Microsoft Defender for Cloud to container registries

Microsoft Defender for Cloud connects to container registries to scan container images for vulnerabilities. In some cases, Defender for Containers also publishes vulnerability assessment results back to the registry.

Azure Container Registry (ACR)

Network

Permissions

Amazon Elastic Container Registry (ECR)

Network

Permissions

Note

The MDCContainersImageAssessmentRole permissions are used only to publish vulnerability assessment results back to the registry for gated deployment. Microsoft Defender for Cloud doesn't modify customer container images.

Google Artifact Registry (GAR)

Network

Permissions

Note

The MDCWritingGarAssessmentsRole permissions are used only to publish vulnerability assessment results back to the registry for gated deployment. Microsoft Defender for Cloud doesn't modify customer container images.

JFrog Artifactory (SaaS)

Network

Permissions and configuration

API scopes used

Docker Hub (SaaS)

Network

Permissions

Microsoft Defender for Cloud to Kubernetes clusters

Microsoft Defender for Cloud connects to Kubernetes API endpoints to discover clusters and collect configuration data for posture and risk analysis.

Azure Kubernetes Service (AKS)

Network

Permissions

Note

For AKS, Defender for Cloud uses AKS Trusted Access. Defender for Cloud creates a managed identity and a trusted access role binding. After the cluster is discovered, Defender for Cloud creates a Kubernetes ClusterRoleBinding to the built-in AKS ClusterRole aks:trustedaccessrole:defender-containers:microsoft-defender-operator, which grants read permissions inside the cluster.

Amazon Elastic Kubernetes Service (EKS)

Network

For private EKS clusters, the Kubernetes API server must expose a restricted public endpoint that allows access from the approved Microsoft Defender for Containers IP ranges.

Permissions

Note

eks:UpdateClusterConfig is used to add the Microsoft Defender for Containers static IP CIDR blocks to the EKS cluster public access CIDR allowlist (ResourcesVpcConfig.PublicAccessCidrs). It's also used to update the authentication mode from CONFIG_MAP to API_AND_CONFIG_MAP, which is required for access entry creation on older clusters. If this permission isn't granted, inventory collection fails for clusters with restricted public endpoint access because Defender for Containers can't connect to the Kubernetes API server. Inventory collection also fails for clusters that use CONFIG_MAP-only authentication because Defender for Containers can't create the required access entries. For clusters with an open public endpoint, this permission isn't required for connectivity, but Defender for Cloud still attempts the configuration update.

Google Kubernetes Engine (GKE)

Network

For private GKE clusters, the Kubernetes API server must expose a restricted public endpoint that allows access from the approved Microsoft Defender for Containers IP ranges.

Permissions

Note

container.clusters.update is used to add the Microsoft Defender for Containers static IP CIDR blocks to the GKE cluster Master Authorized Networks configuration. If this permission isn't granted, inventory collection fails for clusters that have Master Authorized Networks enabled because Defender for Containers can't connect to the Kubernetes API server. For clusters without Master Authorized Networks enabled, this permission isn't required for connectivity.

Kubernetes clusters to Microsoft Defender for Cloud

Kubernetes clusters send runtime security data to Microsoft Defender for Cloud.

Outbound network requirements

Kubernetes permissions created by the Defender sensor

The Defender sensor creates Kubernetes roles with the following permissions:

API group Resources Verbs
core ("") pods, nodes, services, events, configmaps get, list, watch, patch
apps daemonsets, replicasets, statefulsets, deployments get, list, watch
batch jobs, cronjobs get, list, watch
networking.k8s.io ingresses get, list, watch
apiextensions.k8s.io customresourcedefinitions get, list, watch, create, update, delete
defender.microsoft.com All resources (*) get, list, watch, create, update, delete

Cloud infrastructure to Microsoft Defender for Cloud (Kubernetes audit logs)

Defender for Containers requires Kubernetes audit logs for control plane threat detection.

Azure Kubernetes Service (AKS)

Amazon Elastic Kubernetes Service (EKS)

Required roles

Google Kubernetes Engine (GKE)