Skip to content

Commit fedd84b

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-security-docs-pr into WI444612-antimalware
2 parents eb48fcc + 524c2df commit fedd84b

9 files changed

Lines changed: 102 additions & 18 deletions

File tree

articles/defender-for-cloud/TOC.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,10 +826,16 @@
826826
- name: Overview
827827
href: runtime-gated-overview.md
828828
- name: Enable gated deployment
829+
displayName: gated deployment, enable
829830
href: enablement-guide-runtime-gated.md
831+
- name: Gated deployment for Infrastructure as Code
832+
displayName: gated deployment, infrastructure as code, IaC
833+
href: gated-deployment-infrastructure-as-code.md
830834
- name: Troubleshooting
835+
displayName: troubleshooting, gated deployment
831836
href: troubleshooting-runtime-gated.md
832837
- name: Frequently asked questions
838+
displayName: faq, frequently asked questions, gated deployment
833839
href: faq-runtime-gated.md
834840
- name: Protect clusters with AKS Security Dashboard
835841
displayName: k8s, containers

articles/defender-for-cloud/defender-cli-syntax.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ The Defender for Cloud CLI provides commands to scan container images for securi
1414

1515
## CLI Options
1616

17-
Option | Required | Type | Description
17+
Option | Required | Type | Description
1818
--- | --- | --- | ---
19+
`--defender-debug` | No | Bool | Output debug information to the console.
1920
`--output-formats` | No | String | Option: HTML
2021
`--defender-output` | No | String | Sets the path to the output file [default: `pwd`]
2122
`--defender-break` | No | Bool | Exit with a non-zero code if critical issues are found

articles/defender-for-cloud/deploy-helm.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Install Defender for Containers sensor using Helm
33
description: Learn how to install the Microsoft Defender for Containers sensor on Kubernetes clusters using Helm.
44
author: Elazark
55
ms.topic: how-to
6-
ms.date: 02/01/2026
6+
ms.date: 02/18/2026
77
ms.author: elkrieger
88
ai-usage: ai-assisted
99
---
@@ -58,7 +58,7 @@ Depending on your deployment type, follow the relevant instructions to install t
5858

5959
- Helm version 3.8 or later (the available version supports OCI)
6060

61-
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest) and [logged in](/cli/azure/reference-index?view=azure-cli-latest) to an account with resource group owner role for the target cluster.
61+
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest&preserve-view=true) and [logged in](/cli/azure/reference-index?view=azure-cli-latest&preserve-view=true) to an account with resource group owner role for the target cluster.
6262

6363
- Azure resource ID for the target cluster
6464

@@ -81,7 +81,7 @@ Depending on your deployment type, follow the relevant instructions to install t
8181
8282
Or, run the [delete_conflicting_policies.sh](https://github.com/microsoft/Microsoft-Defender-For-Containers/blob/main/scripts/delete_conflicting_policies.sh) script with the following command:
8383
84-
```azurecli
84+
```bash
8585
delete_conflicting_policies.sh <CLUSTER_AZURE_RESOURCE_ID>
8686
```
8787
This command removes resource group and subscription level policies for setting up the generally available (GA) version of Defender for Containers. It can affect clusters other than the one you're configuring.
@@ -92,11 +92,11 @@ Use the [install_defender_sensor_aks.sh](https://github.com/microsoft/Microsoft-
9292
9393
Run the script with the command:
9494
95-
```azurecli
96-
install_defender_sensor_aks.sh --id <CLUSTER_AZURE_RESOURCE_ID> --version <VERSION> [--release_train <RELEASE_TRAIN>] [--antimalware]
95+
```bash
96+
install_defender_sensor_aks.sh --id <CLUSTER_AZURE_RESOURCE_ID> --version <VERSION> [--release_train <RELEASE_TRAIN>] [--namespace <NAMESPACE>] [--antimalware]
9797
```
9898
99-
Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, and `<VERSION>` with your own values.
99+
Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, `<NAMESPACE>`, and `<VERSION>` with your own values:
100100
101101
- Replace `<VERSION>` with:
102102
- `latest` for the most recent version.
@@ -106,6 +106,11 @@ Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, a
106106
- `stable` (default).
107107
- `public` for the preview version.
108108
109+
- Replace `<NAMESPACE>` with `kube-system` if you are deploying to AKS Automatic.
110+
111+
> [!NOTE]
112+
> Don’t provide this parameter for standard AKS deployments. If not specified, the default namespace is `mdc`.
113+
109114
- Use the `--antimalware` flag to enable antimalware scanning.
110115
111116
> [!NOTE]
@@ -117,7 +122,7 @@ Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, a
117122
118123
- Helm version 3.8 or later (the available version supports OCI)
119124
120-
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest) and [logged in](/cli/azure/reference-index?view=azure-cli-latest) to an account with resource group owner role for the security connector.
125+
- Azure CLI must be [installed](/cli/azure/install-azure-cli?view=azure-cli-latest&preserve-view=true) and [logged in](/cli/azure/reference-index?view=azure-cli-latest&preserve-view=true) to an account with resource group owner role for the security connector.
121126
122127
- Ensure the cluster account is connected to Microsoft Defender for Cloud. Learn how to [connect your AWS account](quickstart-onboard-aws.md) or [connect your GCP project](quickstart-onboard-gcp.md) to your Defender for Cloud.
123128
@@ -140,7 +145,7 @@ Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, a
140145
141146
1. Set the `kubeconfig` context to the target cluster by using the following command:
142147
143-
```azurecli
148+
```bash
144149
install_defender_sensor_mc.sh --id <SECURITY_CONNECTOR_AZURE_RESOURCE_ID> --version <VERSION> --distribution <DISTRIBUTION> [--release_train <RELEASE_TRAIN>] [--antimalware]
145150
```
146151
@@ -172,12 +177,20 @@ Replace the placeholder text `<CLUSTER_AZURE_RESOURCE_ID>`, `<RELEASE_TRAIN>`, a
172177
173178
### Verify the installation
174179
175-
Verify that the installation succeeded by using the command:
180+
Verify that the installation succeeded by using the namespace you used during installation:
181+
182+
**For standard AKS, EKS, and GKE**
176183
177184
```bash
178185
helm list --namespace mdc
179186
```
180187
188+
**For AKS Automatic**
189+
190+
```bash
191+
helm list --namespace kube-system
192+
```
193+
181194
The installation is successful if the `STATUS` field displays **deployed**.
182195
183196
## Configure security rules for gated deployment
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Gated deployment for Infrastructure as Code
3+
description: Learn how to deploy gated deployment infrastructure as code for managed cluster API.
4+
#customer intent: As a Kubernetes administrator, I want to deploy gated deployment infrastructure as code so that I can automate the setup and ensure consistent configuration across environments.
5+
author: Elazark
6+
ms.author: elkrieger
7+
ms.date: 02/16/2026
8+
ms.topic: how-to
9+
---
10+
11+
# Gated deployment for Infrastructure as Code
12+
13+
Microsoft Defender for Cloud's gated deployment agent is a Kubernetes admission controller that enforces container image security policies at deployment time. Gated deployment acts as a gatekeeper for container images for known security problems at deployment time and decides whether they're allowed to run.
14+
15+
The gated deployment agent requires read access to all of your Azure Container Registries (ACRs) associated with the cluster. These registries store the container images alongside the vulnerability assessment artifacts generated by Defender for Containers. To enable this access, configure a Managed Service Identity (MSI) with the required ACR read permissions and assign it to the agent.
16+
17+
## Prerequisites
18+
19+
- An Azure subscription with Microsoft Defender for Cloud enabled.
20+
- You must [enable gated deployment in Defender for Containers](enablement-guide-runtime-gated.md) with the defender sensor and registry access extensions turned on.
21+
- You must enable on your Azure Kubernetes Service (AKS) cluster:
22+
- [An OpenID Connect (OIDC) issuer](/azure/aks/use-oidc-issuer#create-an-aks-cluster-with-the-oidc-issuer).
23+
- [An Azure Workload Identity](/azure/aks/workload-identity-deploy-cluster?tabs=new-cluster).
24+
25+
> [!NOTE]
26+
> Security gating only needs to be installed once. The first time you enable the security gating toggle, it installs security gating.
27+
> After that, security gating is already installed. When the installation runs again, the system detects this and does nothing.
28+
> If you try to install it again through the API, it fails because security gating already exists.
29+
>
30+
> :::image type="content" source="media/gated-deployment-infrastructure-as-code/security-gating-on.png" alt-text="Screenshot that shows security gating is turned to on." lightbox="media/gated-deployment-infrastructure-as-code/security-gating-on.png":::
31+
32+
## Deploy the gated agent
33+
34+
1. [Create a Managed Service Identity (MSI) that the gated deployment agent uses](/entra/identity/managed-identities-azure-resources/manage-user-assigned-managed-identities-azure-portal).
35+
36+
1. [Assign the AcrPull role (or equivalent read role)](/azure/container-registry/container-registry-rbac-built-in-roles-overview?tabs=registries-configured-with-rbac-registry-abac-repository-permissions) to the MSI on all ACRs the cluster uses.
37+
38+
1. [Add a Federated Identity Credential (FIC) to the MSI](/graph/api/resources/federatedidentitycredentials-overview?view=graph-rest-1.0) that allows the gated deployment agent to authenticate by using AKS Workload Identity, with the following FIC parameters:
39+
40+
- **Issuer**: The AKS OIDC issuer URL
41+
- **Subject**: The service account used by the gated deployment agent `system:serviceaccount:kube-system:defender-admission-controller-serviceaccount`.
42+
- **Audience**: api://AzureADTokenExchange
43+
44+
1. Under the [securityGating section of the managed cluster API configuration](https://learn.microsoft.com/azure/templates/microsoft.containerservice/managedclusters?pivots=deployment-language-arm-template#resource-format-1), set the [MSI’s objectId in the identities parameter](https://learn.microsoft.com/azure/templates/microsoft.containerservice/managedclusters?pivots=deployment-language-arm-template#managedclustersecurityprofiledefendersecuritygating-1) under the security gating section of the managed cluster API configuration.
45+
46+
:::image type="content" source="media/gated-deployment-infrastructure-as-code/identities.png" alt-text="Screenshot that shows the section of the securityGating section of the managed cluster API configuration, where the code is located." lightbox="media/gated-deployment-infrastructure-as-code/identities.png":::
47+
48+
This ensures the gated deployment agent can use the MSI at runtime.
49+
50+
## Next step
51+
52+
> [!div class="nextstep"]
53+
> [Troubleshoot gated deployment in Kubernetes](troubleshooting-runtime-gated.md)
21.4 KB
Loading
11.9 KB
Loading

0 commit comments

Comments
 (0)