55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
id: azure-aks-entra-id-unintegrated
|
|
info:
|
|
name: Azure AKS Microsoft Entra ID Integration Not Configured
|
|
author: princechaddha
|
|
severity: high
|
|
description: |
|
|
Ensure that your Azure Kubernetes Service (AKS) clusters are integrated with Microsoft Entra ID to provide granular access to AKS resources.
|
|
impact: |
|
|
Without Microsoft Entra ID integration, AKS clusters might lack granular access control, increasing the risk of unauthorized access and potential security breaches.
|
|
remediation: |
|
|
Ensure that each Azure Kubernetes Service (AKS) cluster is configured with Microsoft Entra ID by enabling the integration in the AKS cluster settings.
|
|
reference:
|
|
- https://docs.microsoft.com/en-us/azure/aks/managed-aad
|
|
tags: cloud,devops,azure,microsoft,aks,azure-cloud-config
|
|
|
|
flow: |
|
|
code(1);
|
|
for (let ClusterInfo of iterate(template.clusterList)) {
|
|
ClusterInfo = JSON.parse(ClusterInfo);
|
|
set("name", ClusterInfo.name);
|
|
set("resourceGroup", ClusterInfo.resourceGroup);
|
|
code(2);
|
|
}
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
az aks list --output json --query '[*].{name:name, resourceGroup:resourceGroup}'
|
|
|
|
extractors:
|
|
- type: json
|
|
name: clusterList
|
|
internal: true
|
|
json:
|
|
- '.[]'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
az aks show --name "$name" --resource-group "$resourceGroup" --query 'aadProfile'
|
|
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- ''
|
|
|
|
extractors:
|
|
- type: dsl
|
|
dsl:
|
|
- 'name + " in " + resourceGroup + " does not have Microsoft Entra ID integration configured"'
|
|
# digest: 4a0a0047304502206d6c29cd8aa4bb54fac3d4c9a53107ac6a7c249f0bc30b9ab2a9c666a8e9656e022100ab3e315cde391f7089701d128f6f27df0d204abc00d94866b26d763ce05257d1:922c64590222798bb761d5b6d8e72950 |