Skip to main content

More Info:

Integrate Azure Active Directory with Kubernetes RBAC so cluster access is governed by centrally managed Azure AD identities and group memberships.

Risk Level

High

Address

Security

Compliance Standards

  • CIS AKS

Triage and Remediation

Remediation

Manual Steps

  1. Determine your AKS cluster’s auth model (Azure AD or local accounts)
    • On any machine with az access, run:
    • Review the output:
      • If aadProfile is null or empty and there is no oidcIssuerProfile in use with Azure AD Workload Identity, the cluster is not using Azure AD for client auth.
      • If aadProfile.enableAzureRBAC is true, AKS-managed Azure RBAC is used instead of Kubernetes-native RBAC; decide if this aligns with your org’s RBAC model.
  2. Identify how kubectl clients currently authenticate (Azure AD vs static credentials)
    • On any machine with kubectl access, inspect the kubeconfig being used:
    • Look at the users: section:
      • user.exec.command: az or kubelogin and exec.args with get-token indicate Azure AD/OIDC-based auth.
      • user.token, client-certificate-data, or static username/password indicate non–Azure AD credentials (service accounts, client certs, or basic auth), which should be minimized for human users.
  3. Review current Kubernetes RBAC subjects for non–Azure AD identities
    • On any machine with kubectl access, list RBAC bindings and look for User subjects that are not Azure AD principals (for clusters already wired to AAD, user names are typically AAD UPNs or Object IDs):
    • Flag any:
      • Local usernames or generic names (e.g., admin, kube-admin, devops) not traceable to Azure AD.
      • Tokens/certs issued outside Azure AD (service accounts are fine for workloads but not for human users).
    • Decide which of these should be re-mapped to Azure AD users or groups and plan to deprecate the non–AAD identities.
  4. Verify Azure AD groups mapped into Kubernetes RBAC (if AAD is enabled)
    • On any machine with kubectl access, inspect role bindings targeting Group subjects (these should correspond to Azure AD groups when Azure AD integration is used):
    • For each name value, confirm in the Azure portal (Azure AD → Groups) or via CLI:
    • Ensure:
      • Group membership is centrally managed in Azure AD (no per-user bindings where group-based bindings would work).
      • Privileged roles (e.g., bound to cluster-admin) are restricted to tightly controlled Azure AD groups.
  5. If Azure AD is not integrated, plan and configure AAD-based access
    • Decide, with your identity/security team, the target integration model:
      • AKS-managed Azure AD with Azure RBAC for Kubernetes authorization, or
      • AKS with AAD for auth and Kubernetes-native RBAC for authorization.
    • Implement using Azure documentation and IaC where possible. For example, to enable AKS-managed Azure AD and Azure RBAC on a new cluster (conceptual example; adapt to your environment):
    • For existing clusters, review whether migration to Azure AD–backed auth is supported for your cluster version and apply changes using az aks update or redeploy via ARM/Bicep/Terraform per your standards.
  6. Verify that Kubernetes RBAC is now governed by Azure AD identities
    • On any machine with az access, obtain credentials using Azure AD:
    • Confirm that the active user is an Azure AD identity:
    • Validate RBAC using Azure AD groups by attempting a namespaced operation as a member of an AAD group bound via RBAC (adjust namespace and group binding you configured):
    • Confirm that:
      • Access outcomes (allowed/denied) match the Azure AD user/group memberships.
      • Human user access no longer relies on non–Azure AD static users/tokens, except for explicitly justified break-glass or automation accounts you documented.
kubectl cannot be used to configure Azure AD integration for AKS; this setting is managed in the Azure portal / Azure CLI / IaC at the cloud-control-plane level. Refer to the Manual Steps section for guidance on how to review and configure Azure AD–based authentication and RBAC for your cluster.