More Info:
Grant only the minimum permissions required for the AKS cluster service principal to read and pull images from Azure Container Registry, avoiding broad Owner or account administrator roles.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS AKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify the AKS cluster’s identity and attached ACRs
- Run on any machine with Azure CLI access:
- Determine whether the cluster uses a system-assigned identity, user-assigned managed identity, or legacy service principal.
- Run on any machine with Azure CLI access:
-
List current role assignments on each ACR and identify over-privileged roles
- For each registry (replace with actual names and resource groups):
- Look for assignments of broad roles like
Owner,Contributor, or subscription/resource-group–scoped roles to the AKS identity or to generic user/service principals that are not required for image pull.
- For each registry (replace with actual names and resource groups):
-
Verify that the AKS identity has only the minimum ACR role (AcrPull or AcrPull-equivalent)
- From the output above, for the AKS identity principalId (or service principal appId), confirm that:
- Scope is the ACR resource (not entire subscription or resource group) unless broader scope is intentionally required.
- Role is
AcrPull(orAcrImageSigner/AcrPushonly where there is a clear business need).
- If AKS authenticates using image pull secrets instead of managed identity, identify the underlying principal:
- Review who manages the credentials used in those secrets and what roles they have on the ACR (via
az role assignment listas above).
- From the output above, for the AKS identity principalId (or service principal appId), confirm that:
-
Remove over-privileged role assignments and reassign least-privilege roles
- For any AKS identity or service principal that has
Owner,Contributor, or other broad roles on the ACR and does not require them, remove the assignment: - Then assign the minimal required role (
AcrPull) scoped to the ACR: - If needed, configure or update the AKS–ACR integration so AKS uses this principal:
- For any AKS identity or service principal that has
-
Optionally migrate from legacy service principal / broad roles to dedicated identity for ACR access
- If the AKS cluster or image-pulling process currently uses a generic Owner/Contributor principal, create or select a dedicated identity with only ACR permissions:
- Integrate this identity into AKS either as the cluster managed identity or via pull secrets, following your chosen authentication pattern.
- If the AKS cluster or image-pulling process currently uses a generic Owner/Contributor principal, create or select a dedicated identity with only ACR permissions:
-
Verify least-privilege configuration and cluster image pull functionality
- Re-list ACR role assignments and confirm only minimal roles remain for AKS-related principals:
- Validate that pods can still pull images from ACR:
- If the test pod starts successfully and the role assignments show only scoped
AcrPull(and any explicitly justified roles), the configuration meets the intent of the control.
- Re-list ACR role assignments and confirm only minimal roles remain for AKS-related principals:
Using kubectl
Using kubectl
kubectl cannot change Azure Container Registry role assignments or AKS–ACR integration, because these live in Azure RBAC and AKS configuration managed via the Azure portal, Azure CLI, or IaC. To address this finding, make the changes described in the Manual Steps section using those cloud provider tools.
Automation
Automation

