Skip to main content

Triage and Remediation

Remediation

Using Console

To remediate the HTTP 2.0 disabled misconfiguration in Azure using the Azure console, you can follow these steps:
  1. Log in to the Azure portal and navigate to the App Service that needs to be configured.
  2. Under the Settings section, select Configuration.
  3. Scroll down to the General settings section, and locate the HTTP version configuration.
  4. Change the HTTP version configuration to “2.0” to enable HTTP 2.0.
  5. Click Save to apply the changes.
  6. Restart the App Service to ensure that the changes are applied.
  7. Once the App Service is restarted, verify that HTTP 2.0 is enabled by accessing the application through a web browser and checking the network tab of the developer tools.
By following these steps, you can remediate the HTTP 2.0 disabled misconfiguration in Azure using the Azure console.

To remediate HTTP 2.0 disabled misconfiguration in Azure using Azure CLI, you can follow the below steps:Step 1: Open Azure CLI and login to your Azure account.
Step 2: Check the current status of HTTP 2.0 on the web app.
Step 3: If the output of the above command is false, then HTTP 2.0 is disabled for the web app. To enable it, run the below command:
Step 4: Verify that HTTP 2.0 is enabled by running the below command:
Step 5: Once verified, you have successfully remediated the HTTP 2.0 disabled misconfiguration for your Azure web app.Note: Replace <resource-group-name> and <web-app-name> with your actual resource group and web app name respectively.
To remediate the HTTP 2.0 Disabled misconfiguration in Azure using Python, you can use the Azure SDK for Python. Here are the step-by-step instructions:
  1. Install the Azure SDK for Python by running the following command in your terminal:
  2. Import the necessary modules:
  3. Authenticate with Azure using a service principal:
  4. Create a WebSiteManagementClient object:
  5. Get the resource group and site name for the web app:
  6. Get the current site configuration:
  7. Check if HTTP 2.0 is already enabled:
    This code checks if HTTP 2.0 is already enabled. If it is, it prints a message saying so. If it is not, it enables HTTP 2.0 and prints a message saying it has been enabled.
  8. Run the code and verify that HTTP 2.0 has been enabled for your web app.
This change does not force replacement of the App Service; it updates the existing site configuration in-place.To verify, terraform plan should show an in-place update on azurerm_app_service.APP_SERVICE_NAME with site_config.0.http2_enabled changing from false (or null) to true.