Skip to main content

More Info:

The azure.json file holds cloud provider credentials and should have permissions of 644 or more restrictive to limit access.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS AKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, confirm the azure.json file exists and note its current permissions:
  2. On every worker node, set the file permissions to 644 (or more restrictive if desired, e.g., 640 or 600):
  3. (Optional but recommended) On every worker node, ensure ownership is appropriate (typically root:root):
  4. On every worker node, verify the permissions are now 644 or more restrictive:
kubectl cannot be used to modify file permissions on worker node files like /etc/kubernetes/azure.json; this must be fixed directly on each worker node’s host OS. Refer to the Manual Steps section for the exact commands to run on the nodes.
Usage:
  • Copy this script to each worker node, for example /usr/local/sbin/fix-azure-json-perms.sh.
  • On every worker node, run: