Skip to main content

More Info:

Enable JIT Network Access recommendations for virtual machines.

Risk Level

Low

Address

Operational Maturity, Security

Compliance Standards

  • HIPAA
  • HITRUST CSF
  • ISO 27001
  • SOC2

Triage and Remediation

Remediation

Using Console

To remediate the “Monitor JIT Network Access setting is not enabled” misconfiguration for Azure using the Azure console, follow the below steps:
  1. Log in to the Azure portal using your credentials.
  2. Navigate to the “Security Center” service from the left-hand menu.
  3. In the Security Center dashboard, click on the “Security policy” tab.
  4. In the Security policy tab, scroll down to the “Just-in-Time network access” policy and click on the “Edit” button.
  5. In the “Just-in-Time network access” policy page, enable the “Monitor” option by toggling it to “On”.
  6. Click on the “Save” button to save the changes.
  7. Once the policy is saved, Azure will start monitoring the Just-in-Time network access setting and provide recommendations for remediation if any misconfiguration is detected.
By following the above steps, you can remediate the “Monitor JIT Network Access setting is not enabled” misconfiguration for Azure using the Azure console.

To remediate the “Monitor JIT Network Access setting is not enabled” misconfiguration in AZURE using AZURE CLI, follow these steps:
  1. Open the AZURE CLI on your local machine or on the AZURE Cloud Shell.
  2. Run the following command to check the current status of the JIT Network Access setting:
    This command will list all the NSGs (Network Security Groups) that have JIT (Just-In-Time) Network Access enabled or disabled.
  3. If the output shows that the JIT Network Access setting is not enabled for any NSG, run the following command to enable it:
    Replace <NSG_NAME> with the name of the NSG that you want to enable JIT Network Access for, and <RESOURCE_GROUP_NAME> with the name of the resource group that the NSG belongs to.
  4. Once the command is executed successfully, the JIT Network Access setting will be enabled for the specified NSG.
  5. Verify the change by running the command in step 2 again. The output should show that the JIT Network Access setting is now enabled for the specified NSG.
To remediate the “Monitor JIT Network Access setting is not enabled” misconfiguration in Azure using Python, you can use the Azure Python SDK to enable the Just-In-Time (JIT) Network Access setting for your virtual machines. Here are the step-by-step instructions:
  1. Install the Azure Python SDK by running the following command in your terminal:
  1. Authenticate with your Azure account using the SDK. You can use the following code snippet to authenticate:
  1. Get the virtual machine resource group and name for which you want to enable JIT Network Access. You can use the following code snippet to get the virtual machine details:
  1. Enable JIT Network Access for the virtual machine by updating its network profile. You can use the following code snippet to enable JIT Network Access:
With these steps, you should be able to remediate the “Monitor JIT Network Access setting is not enabled” misconfiguration for your Azure virtual machine using Python.
Substitute:
  • SUBSCRIPTION_ID with your actual subscription ID or change scope to a management group or resource group as needed.
This assigns the built‑in Azure Policy “Just-in-time network access control should be applied on virtual machines” at the chosen scope so that Defender for Cloud monitors and raises recommendations for JIT Network Access.This change does not force replacement of any existing VM or network resources; it only adds a new policy assignment.For verification, terraform plan should show:
  • + azurerm_policy_assignment.Monitor_JIT_NETWORK_ACCESS to be created with the policy_definition_id exactly as above and the expected scope.