ZCSPM
Configuring Auto Remediation for Microsoft Azure
Non-compliant assets can be automatically remediated using ZCSPM's remediation framework. An Azure account can have administrators creating, updating, or removing assets frequently. ZCSPM uses the Azure APIs to automatically remediate non-compliant assets.
Prerequisite Roles
Ensure you have access to the following prerequisite roles:
- ZCSPM License Admin
- Microsoft Azure Subscription Owner
- Microsoft Azure Resource Policy Contributor
Configuring Auto Remediation
- 1. Assign permissions to the Service Principal.
- Log in to the Azure Portal as a Subscription Owner.
- Go to Subscriptions, then select your subscription.
- Click Access Control (IAM), then click Add.
- Click Add role assignment, then select Resource Policy Contributor role.
- Select the ZCSPM application, then click Save.
- 2. Create policy definitions.
- Click on the Cloud Shell icon, then choose PowerShell.
- Clone the Azure remediation policy repository using the following command:
git clone https://github.com/Cloudneeti/azure-remediation-policy.git
- Switch to the user directory using the following command:
cd $user
- Navigate to the remediation directory using the following command:
cd azure-remediation-policy
- Provision the policy definitions in the subscription using the following command:
Close.\provision-PolicyDefinitions.ps1 -SubscriptionId <Subscription Id>
- 3. Configure policy remediation.
- Log into the ZCSPM Admin Portal as a License Admin.
- Select a license and cloud account using the drop-down menus.
- Navigate to Configurations > Security Policies.
- Select the Cloud Account level tab.
- Select Remediation Available from the filter menu.
- Enable policies for remediation.
- Click Save.
- Click Yes Please in the confirmation message window.
- 4. Assign permissions to assignments.
- Click on the Cloud Shell icon, then choose PowerShell.
- Download the
Assign-RolesToRemediationPolicy.ps1
script using the following command:
wget https://raw.githubusercontent.com/Cloudneeti/docs_cloudneeti/master/scripts/Assign-RolesToRemediationPolicy.ps1 -O Assign-RolesToRemediationPolicy.ps1
- Switch to the user directory using the following command:
cd $user
- Run the role assignment script using the following command and inline parameters:
Close./AssignRolesToRemediationPolicy.ps1 -azureActiveDirectoryId <Azure active directory Id> -subscriptionId <Subscription Id>
- 5. Initiate remediation for existing non-compliant assets.
ZCSPM can remediate all future assets, but the remediation framework needs to be triggered manually for existing non-compliant assets:
- Log into the ZCSPM Admin Portal as a License Admin.
- Select a license and cloud account using the drop-down menus.
- Click Cloud Security Best Practices.
- Click Remediate, then select the checkboxes next to the desired policies from the Policy Remediation panel.
- Click Remediate Now. Remediation changes the asset configurations to make them compliant with security policies.
- Click Remediate Now to confirm.
To confirm manually triggered remediation, you need to re-scan the cloud account and verify the asset information on the asset dashboard.
Close