Profile Applicability:
Level 1
Description:
The azure.json file contains configuration details for accessing and managing Azure resources from a Kubernetes cluster. It is essential to set the correct file permissions to prevent unauthorized access to sensitive information, such as credentials and configuration settings.
Rationale:
Setting file permissions to 644 or more restrictive ensures that only authorized users can read or modify the azure.json file. This is a security best practice to prevent unauthorized access to the Azure configuration and protect sensitive credentials.
Impact:
Pros:
Prevents unauthorized access to the Azure configuration file.
Enhances security by restricting access to sensitive configuration data.
Cons:
Requires additional access control management to ensure authorized users can still read and update the file when necessary.
Default Value:
The default permissions for azure.json can vary, but the file should be configured with restrictive permissions by default for security purposes.
Pre-requisites:
Ensure that the azure.json file exists and is accessible, and that you have the necessary permissions to modify its file attributes.
Remediation
Test Plan:
Using Azure Console:
Use the system’s file management interface to navigate to the azure.json file.
Verify the file permissions to ensure they are set to 644 or more restrictive.
Using Azure CLI:
Use the following command to check the permissions of the azure.json file:
ls -l /etc/kubernetes/azure.json
Ensure that the file permissions are set to 644 or more restrictive.
Implementation Plan:
Using Azure Console:
Navigate to the location of the azure.json file.
Modify the file permissions to 644 or more restrictive using the file management interface.
Using Azure CLI:
Update the file permissions for the azure.json file:
chmod 644 /etc/kubernetes/azure.json
Backout Plan:
Using Azure Console:
If modifying the file permissions causes issues, revert to the original permissions using the file management interface.
Using Azure CLI:
Revert the permissions to the previous state using the following command:
chmod <previous-permissions> /etc/kubernetes/azure.json
References: