You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/image-integrity.md
+7-19Lines changed: 7 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ author: schaffererin
5
5
ms.author: schaffererin
6
6
ms.service: azure-kubernetes-service
7
7
ms.topic: article
8
-
ms.date: 09/20/2023
8
+
ms.date: 09/26/2023
9
9
---
10
10
11
11
# Use Image Integrity to validate signed images before deploying them to your Azure Kubernetes Service (AKS) clusters (Preview)
12
12
13
13
Azure Kubernetes Service (AKS) and its underlying container model provide increased scalability and manageability for cloud native applications. With AKS, you can launch flexible software applications according to the runtime needs of your system. However, this flexibility can introduce new challenges.
14
14
15
-
In these application environments, using signed container images helps verify that your deployments are built from a trusted entity and that images haven't been tampered with since their creation. Image Integrity is a service that allows you to add an AKS built-in policy to verify and enforce that only signed images are deployed to your AKS clusters.
15
+
In these application environments, using signed container images helps verify that your deployments are built from a trusted entity and that images haven't been tampered with since their creation. Image Integrity is a service that allows you to add an Azure Policy built-in definition to verify that only signed images are deployed to your AKS clusters.
16
16
17
17
> [!NOTE]
18
18
> Image Integrity is a feature based on [Ratify][ratify]. On an AKS cluster, the feature name and property name is `ImageIntegrity`, while the relevant Image Integrity pods' names contain `Ratify`.
@@ -24,7 +24,7 @@ In these application environments, using signed container images helps verify th
24
24
* An Azure subscription. If you don't have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free).
25
25
*[Azure CLI][azure-cli-install] or [Azure PowerShell][azure-powershell-install].
26
26
*`aks-preview` CLI extension version 0.5.96 or later.
27
-
*The Azure Policy add-on for AKS. If you don't have this add-on installed, see [Install Azure Policy add-on for AKS](../governance/policy/concepts/policy-for-kubernetes.md#install-azure-policy-add-on-for-aks).
27
+
*Ensure that the Azure Policy add-on for AKS is enabled on your cluster. If you don't have this add-on installed, see [Install Azure Policy add-on for AKS](../governance/policy/concepts/policy-for-kubernetes.md#install-azure-policy-add-on-for-aks).
28
28
* An AKS cluster enabled with OIDC Issuer. To create a new cluster or update an existing cluster, see [Configure an AKS cluster with OIDC Issuer](./use-oidc-issuer.md).
29
29
* The `EnableImageIntegrityPreview` and `AKS-AzurePolicyExternalData` feature flags registered on your Azure subscription. Register the feature flags using the following commands:
30
30
@@ -71,14 +71,14 @@ In these application environments, using signed container images helps verify th
71
71
Image Integrity uses Ratify, Azure Policy, and Gatekeeper to validate signed images before deploying them to your AKS clusters. Enabling Image Integrity on your cluster deploys a `Ratify` pod. This `Ratify` pod performs the following tasks:
72
72
73
73
1. Reconciles certificates from Azure Key Vault per the configuration you set up through `Ratify` CRDs.
74
-
2. Accesses images stored in ACR when validation requests come from [Azure Policy](../governance/policy/concepts/policy-for-kubernetes.md), an admission controller webhook that extends [Gatekeeper](https://open-policy-agent.github.io/gatekeeper).
74
+
2. Accesses images stored in ACR when validation requests come from [Azure Policy](../governance/policy/concepts/policy-for-kubernetes.md). To enable this experience, Azure Policy extends Gatekeeper, an admission controller webhook for [Open Policy Agent (OPA)](https://www.openpolicyagent.org/).
75
75
3. Determines whether the target image is signed with a trusted cert and therefore considered as *trusted*.
76
76
4. `AzurePolicy` and `Gatekeeper` consume the validation results as the compliance state to decide whether to allow the deployment request.
77
77
78
78
## Enable Image Integrity on your AKS cluster
79
79
80
80
> [!NOTE]
81
-
> Image signature verification is a governance-oriented scenario and works closely with [Azure Policy](../governance/policy/concepts/policy-for-kubernetes.md). We recommend using AKSbuilt-in policy to enable Image Integrity. For more information, see the [Image Integrity policy][image-integrity-policy].
81
+
> Image signature verification is a governance-oriented scenario and leverages [Azure Policy](../governance/policy/concepts/policy-for-kubernetes.md) to verify image signatures on AKS clusters at-scale. We recommend using AKS's Image Integrity built-in Azure Policy initiative, which is available in [Azure Policy's built-in definition library](../governance/policy/samples/built-in-policies.md#kubernetes).
82
82
83
83
### [Azure CLI](#tab/azure-cli)
84
84
@@ -116,7 +116,7 @@ Image Integrity uses Ratify, Azure Policy, and Gatekeeper to validate signed ima
116
116
117
117
For Image Integrity to properly verify the target signed image, you need to set up `Ratify` configurations through K8s [CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) using `kubectl`.
118
118
119
-
In this article, we use a self-signed CA cert from the official Ratify documentation to set up verification configurations. For more examples, see [Ratify CRDs](https://github.com/deislabs/ratify/blob/main/docs/reference/ratify-configuration.md).
119
+
In this article, we use a self-signed CA cert from the official Ratify documentation to set up verification configurations. For more examples, see [Ratify CRDs](https://ratify.dev/docs/1.0/ratify-configuration).
120
120
121
121
1. Create a `VerifyConfig` file named `verify-config.yaml` and copy in the following YAML:
122
122
@@ -190,19 +190,7 @@ In this article, we use a self-signed CA cert from the official Ratify documenta
190
190
191
191
## Deploy sample images to your AKS cluster
192
192
193
-
1. Deploy an unsigned image using the `kubectl run demo` command.
194
-
195
-
```azurecli-interactive
196
-
kubectl run demo-unsigned --image=ghcr.io/deislabs/ratify/notary-image:unsigned
197
-
```
198
-
199
-
The following example output shows that Image Integrity denies the deployment since the image hasn't been signed and doesn't meet the deployment criteria:
200
-
201
-
```output
202
-
Error from server (Forbidden): admission webhook "validation.gatekeeper.sh" denied the request: [ratify-constraint] Subject failed verification: ghcr.io/deislabs/ratify/notary-image:unsigned
203
-
```
204
-
205
-
2. Deploy a signed image using the `kubectl run demo` command.
193
+
* Deploy a signed image using the `kubectl run demo` command.
206
194
207
195
```azurecli-interactive
208
196
kubectl run demo-signed --image=ghcr.io/deislabs/ratify/notary-image:signed
0 commit comments