Triage and Remediation
Remediation
Using Console
Using Console
To enable FTPS-only access for App Services in Azure, you can follow these steps:
- Open the Azure Portal and navigate to the App Service that you want to configure.
- Click on the “Networking” tab in the left-hand menu.
- Under “FTP Access,” select “FTPS Only” from the drop-down menu.
- Click “Save” to apply the changes.
- Under “SSL/TLS settings,” select “Require SSL/TLS” from the drop-down menu.
- Under “FTP Access,” select “FTPS Only” from the drop-down menu.
- Click “Save” to apply the changes.
Using CLI
Using CLI
To remediate the misconfiguration “Enable FTPS-Only Access For App Services” for Azure using Azure CLI, you can follow the below steps:Step 1: Open the Azure CLI and login to your Azure account using the command “az login”.Step 2: Once you are logged in, you need to select the subscription that contains the App Service you want to remediate. You can use the command “az account set —subscription In the above command, replace
<subscription-id>
” to set the subscription.Step 3: Now, you need to enable FTPS-Only Access for the App Service. You can use the following command to do this:<resource-group-name>
with the name of the resource group that contains the App Service you want to remediate, and replace <app-service-name>
with the name of the App Service.Step 4: Once you run the above command, it will enable FTPS-Only Access for the App Service. You can verify this by going to the Azure portal and checking the FTPS settings for the App Service.By following the above steps, you can successfully remediate the misconfiguration “Enable FTPS-Only Access For App Services” for Azure using Azure CLI.Using Python
Using Python
To remediate the misconfiguration “Enable FTPS-Only Access for App Services” in Azure using Python, you can follow the below steps:Step 1: Install the Azure SDK for Python using the below command:Step 2: Connect to the Azure subscription using the below code:Step 3: Get the FTPS state of the web app using the below code:Step 4: If the FTPS state is not ‘FtpsOnly’, then update the FTPS state using the below code:Step 5: Verify that the FTPS state has been updated to ‘FtpsOnly’ using the below code:This should remediate the misconfiguration “Enable FTPS-Only Access for App Services” in Azure using Python.