Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you would like to understand the advantages of Microsoft Defender for Cloud's just-in-time (JIT) over NSG.
In simple words, JIT is a combination of NSG + Azure role-based access control (Azure RBAC).
To address your question, the main benefit is less management overhead and control of who can actually raise a request to access the VM
One more point to note is that JIT also seamlessly integrates with Azure Firewall
With traditional NSG,
- You have management overhead
- A rule created is permanent unless a user explicitly deletes it
- If you know the user's source IP and you are sure the IP will never change, you can use NSG rule as "Allow" for this IP
- However, if the source IP is not fixed, you have to manually create and delete rules every time the IP changes.
With JIT,
- When a user requests access to a VM, Defender for Cloud checks that the user has Azure role-based access control (Azure RBAC) permissions for that VM.
- If the request is approved, Defender for Cloud configures the NSGs and Azure Firewall to allow inbound traffic to the selected ports from the relevant IP address (or range), for the amount of time that was specified
- This means, not everyone can request to get their IP Allowed in the NSG
- See : How Defender for Cloud identifies which VMs should have JIT applied
Thanks,
Kapil
Please Accept an answer if correct.
Original posters help the community find answers faster by identifying the correct answer.