Internal Developer Platform (IDP)

An Internal Developer Platform (IDP) bridges the gap between raw infrastructure primitives and developer velocity. The platform’s primary job is to establish “Golden Paths”—pre-approved, automated, self-service workflows that allow developers to provision infrastructure, run microservices, and manage environments without needing deep Kubernetes or Cloud expertise.

Below is an architectural blueprint for an IDP powered by Backstage, Terraform, GitHub Actions, ArgoCD, and Kubernetes.


1. High-Level Architectural Topology

2. Core Platform Components & Layering

Layer 1: Developer Interaction (Backstage)
  • Software Catalog & Templates: Developers choose from predefined “Golden Path” templates (e.g., Create New Node.js Service with PostgreSQL).
  • Scaffolder: Collects parameters (App Name, Region, Database Size) and auto-generates a new GitHub repository populated with application code, Helm/Kustomize charts, and Terraform definitions.
Layer 2: Pipeline & Provisioning Engine (GitHub Actions & Terraform)
  • Infrastructure Pipeline: Runs terraform plan on Pull Requests and terraform apply on merges to provision cloud-native dependencies (e.g., Azure Database for PostgreSQL, AWS S3, IAM Roles).
  • Workload Identity Federation (OIDC): Authenticates GitHub Actions directly to cloud providers and Kubernetes without storing static credentials or access keys.
Layer 3: Application Delivery & State Reconciliation (ArgoCD & Kubernetes)
  • GitOps Controller: ArgoCD monitors application manifest repositories. When GitHub Actions pushes a updated Helm chart or image tag, ArgoCD automatically reconciles state in the Kubernetes cluster.
  • Environment Isolation: Uses Kubernetes Namespaces augmented with NetworkPolicies, ResourceQuotas, and LimitRanges to provide multi-tenant team isolation.

3. End-to-End Self-Service Workflow Sequence

1.Template Selection in Portal:Developer Action.

  1. A developer logs into Backstage and selects the “New Microservice” catalog template.
  2. They fill out a form providing parameters:
    • App Name: payment-service
    • Language: Go
    • Database Required: Yes (PostgreSQL)
    • Environment: Staging

2.Repository Scaffolding:Portal Orchestration.

  1. Backstage executes the template engine, creating a target GitHub repository: org/payment-service.
  2. It populates the repository with:
    • Base application skeleton code.
    • A /terraform directory with pre-approved modules for RDS/PostgreSQL.
    • A /helm chart for Kubernetes deployment.
    • A .github/workflows/deploy.yml pipeline.
  3. Backstage registers the new entity in its software catalog and registers the deployment with ArgoCD.

3.Infrastructure Provisioning via Terraform:CI/CD & IaC Execution.

  1. GitHub Actions triggers the initial workflow.
  2. It authenticates to the Cloud Provider via OIDC.
  3. Runs terraform apply inside /terraform to spin up the isolated cloud database, creating an output secret in HashiCorp Vault or Azure Key Vault / AWS Secrets Manager.

4.Kubernetes Deployment via ArgoCD:GitOps Delivery.

  1. GitHub Actions builds the Docker container, scans it using Trivy, and pushes it to container registry.
  2. The workflow updates the /helm/values.yaml image tag parameter in Git.
  3. ArgoCD detects the commit and pulls the updated Helm chart, creating the deployment, service, ingress, and pod resources inside the team-payments namespace.

4. Key Engineering Guardrails & Governance

IaC & Terraform Governance
  • Module Registry: Force developers to consume pre-tested, platform-team-maintained Terraform modules via a private module registry rather than writing raw IaC.
  • Policy-as-Code: Run static security checks (checkov or tfsec) and policy validation (OPA / Sentinel) inside GitHub Actions before terraform apply executes.
Kubernetes Runtime Security
  • Pod Security Standards (PSS): Enforce restricted or baseline security profiles cluster-wide using Kyverno or OPA Gatekeeper.
  • Secret Injection: Never store raw database passwords in Git. Inject secrets into Kubernetes pods at runtime using External Secrets Operator (ESO) connected to AWS Secrets Manager or HashiCorp Vault.

5. Summary Matrix: Responsibility Partitioning

ComponentPlatform Team Role (Maintainers)Developer Team Role (Consumers)
Backstage PortalMaintains golden-path templates, UI plugins, catalog RBAC.Selects templates, views operational metrics, reads service docs.
Terraform CodeAuthors reusable, hardened modules (S3, VPC, DB).Supplies module inputs via Backstage forms (e.g., db_size = “small”).
GitHub ActionsOwns reusable global workflow templates and security scans.Triggers builds via standard git push or PRs.
Kubernetes ClusterOperates cluster infrastructure, ingress controllers, CNI, and ArgoCD.Configures runtime environment variables and application scaling params.

Platform Engineer, Senior DevOps/Infrastructure Engineer, or Cloud Architect, breakdown of how these technical domains map to real-world responsibilities

A Platform Engineer, Senior DevOps/Infrastructure Engineer, or Cloud Architect focusing on building internal developer platforms, automating infrastructure, and establishing cloud governance.

Here is a breakdown of how these technical domains map to real-world responsibilities and interview preparation areas:

Skill Set Breakdown & Key Focus Areas

1. Infrastructure as Code & Landing Zones

  • Terraform / OpenTofu: Modular architecture design, state file management (remote backends, state locking), workspace usage, custom provider integrations, and drift detection.
  • Landing Zones: Setting up enterprise cloud foundations (Azure Landing Zones / AWS Control Tower / GCP Landing Zones) emphasizing hub-and-spoke networking, policy assignment, and identity hierarchy.

2. Automation & CI/CD Pipelines

  • CI/CD Templates: Designing reusable, standardized pipeline templates (GitHub Actions workflow templates, GitLab CI templates, Azure DevOps pipeline templates) to promote uniform deployment practices across engineering teams.
  • Self-Service Infrastructure: Implementing GitOps workflows (e.g., via ArgoCD or Flux) or developer-facing CLI/UI tools to let developers provision pre-approved infrastructure on demand.

3. Multi-Cloud & Kubernetes

  • Cloud Platforms (Azure/AWS/GCP): Cross-cloud architecture, compute choices (VMs, serverless, managed containers), virtual networking, and private connectivity (ExpressRoute, Direct Connect, Private Endpoints).
  • Kubernetes (AKS / EKS / GKE): Cluster management, ingress controllers, service mesh architectures, Helm chart deployment, storage classes, and pod security standards.

4. Governance, Security & Observability

  • RBAC / IAM: Implementing least-privilege access models, workload identity federation (OIDC), conditional access, and privileged identity management (PIM).
  • Cloud Governance: Policy enforcement as code (Azure Policy, AWS SCPs, OPA/Gatekeeper) to enforce guardrails and cost management.
  • Observability: Centralized logging, metrics, and tracing using tools like Prometheus, Grafana, OpenTelemetry, Datadog, or cloud-native suites (Azure Monitor, AWS CloudWatch).

Suggested Interview Preparation Strategy

To position yourself effectively for this role, focus on framing your past experience around outcomes:

  1. Automation Impact: Quantify how self-service infrastructure reduced provisioning lead times (e.g., “Reduced developer onboarding time from weeks to 15 minutes by building a self-service Terraform/Backstage pipeline”).
  2. Security & Guardrails: Emphasize how governance was baked into the infrastructure rather than enforced manually.
  3. Platform Mindset: Treat developers as internal customers—demonstrate how your templates and platform features improved internal developer velocity while maintaining reliability.

Evaluating the security of a Model Context Protocol (MCP)

Evaluating the security of a Model Context Protocol (MCP) server or client requires analyzing the boundary where non-deterministic AI outputs meet deterministic tools and systems. Traditional API security models (like strictly defined REST schemas) often fail because MCP tools are invoked based on natural language model context, making them vulnerable to prompt injection, confused deputy attacks, and supply chain threats.

Below is a structured evaluation matrix to assess an MCP integration across the five critical security pillars.

The MCP Security Evaluation Matrix

       [ Client / Host Application ]
                     │  (Natural Language & Tool Schema)
                     ▼
       ┌──────────────────────────┐
       │   MCP Security Boundary  │
       └─────────────┬────────────┘
                     │
    ┌────────────────┼────────────────┬────────────────┐
    ▼                ▼                ▼                ▼
1. Transport &   2. Tool Definition   3. Context &    4. Secrets &
   Auth Scope       & Shadowing       Data Isolation     Local OS
1. Transport, Authentication, and Scope
  • Authentication Method:Verify whether the MCP server communicates locally (STDIO) or remotely (HTTP/SSE).Remote servers should implement standard OAuth 2.0 or mutual TLS.
  • Confused Deputy Prevention:Ensure the MCP server executes actions scoped specifically to the end-user’s identity rather than inheriting the full service account permissions of the host host environment.
  • Audience Binding:Confirm tokens passed over MCP cannot be reused or forwarded across unauthorized target domains.
2. Tool Exposure and Definition Integrity
  • Tool Shadowing & Collisions:Check if a server exposes tool names identical to core or system tools (e.g., exposing a custom execute_command or read_file tool to override or shadow a native client capability).
  • Tool Poisoning in Descriptions: Inspect the description fields of MCP tool definitions. Attackers can embed indirect prompt injections directly into the JSON metadata of a tool to manipulate model behavior before the tool is even called.
  • Parameter Validation: Validate whether parameter schemas enforce strict data types, length limits, and format regexes rather than relying on open-ended string inputs.
3. Indirect Prompt Injection & Context Isolation
  • Data vs. Instruction Separation: Assess how output returned from an MCP tool (e.g., a retrieved web page or database record) is parsed by the client host. If raw data contains system-prompt-style instructions, determine if the host application accidentally treats it as executable system context.
  • Data Exfiltration Vectors: Verify if tools with external network capabilities (e.g., fetch_url) can be combined with local file-reading tools to leak sensitive local data.
4. Secret Management and Execution Sandboxing
  • Configuration Storage:Check how API keys and tokens are supplied to the MCP server. Storing keys in plain-text mcp_config.json files on local disk creates severe exposure risks. Prefer passing credentials via environment variables or secret vaults.
  • Command & Code Execution:Any MCP tool invoking shell scripts, system binaries, or arbitrary SQL must strictly sanitize parameters to prevent command injection.
  • Sandboxing: Local STDIO-based MCP servers should execute within a containerized or sandboxed process (e.g., Docker, AppArmor, or macOS sandbox) with restricted filesystem and network access.
5. Supply Chain & Package Integrity
  • Package Source Verification: Verify the origin of the server repository or npm/uv package. Look for signed releases and pinned package dependencies to prevent “rug pulls” where a trusted server version is modified post-release.
  • Post-Install Scripts: Audit package.json or build hooks for malicious post-install scripts that run during initial setup.

Evaluation Checklist

To run an evaluation on a target MCP server, verify each baseline control below:

Security DomainControl CheckStatus
SandboxServer runs in an isolated, unprivileged process space.[ ]
CredentialsAPI keys are injected at runtime, not written to configuration files.[ ]
PermissionsHigh-impact actions require explicit Human-in-the-Loop (HITL) approval.[ ]
Tool NamesTool identifiers use unique namespaces to avoid naming collisions.[ ]
Input SanitizationFunction arguments are strictly sanitized before reaching system calls.[ ]
LoggingSensitive parameters and authorization tokens are redacted from MCP traces.[ ]

Configuring security baselines for workloads in an Azure Landing Zone (ALZ)

Configuring security baselines for workloads in an Azure Landing Zone (ALZ) relies on policy-driven governance. Rather than manually configuring individual resources, you enforce security controls at the Management Group level using Azure Policy, Microsoft Defender for Cloud, and Infrastructure as Code (IaC) modules.

1. Implement Policy-Driven Guardrails

In an Enterprise-Scale Landing Zone, security baselines inherit automatically based on where a subscription sits in the Management Group hierarchy (Corp, Online, or Platform).

                    

Key Policy Definitions to Assign

Assign built-in policy initiatives (like the Microsoft cloud security benchmark (MCSB)) to the Intermediate Root Management Group:

  • Enforce Encryption in Transit: Block storage accounts or web apps that allow HTTP or TLS versions below 1.2 (Deny).
  • Disable Public Access: Prevent PaaS resources (SQL Server, Key Vault, Storage) from exposing public IP endpoints (Deny or Modify).
  • Auto-Provision Diagnostics: Stream all resource activity, audit, and diagnostic logs to the central Log Analytics workspace in the Management subscription using DeployIfNotExists (DINE) policies.

2. Deploy Automated Security via IaC (Bicep / Terraform)

When provisioning workload landing zones, use ALZ Bicep or Terraform modules to apply security baselines dynamically upon subscription creation.

Example: Bicep Policy Assignment for Security Baseline

Code snippet

targetScope = 'managementGroup'
param managementGroupId string = 'alz-landing-zones'
// Assign Microsoft Cloud Security Benchmark Initiative
resource mcsbAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
name: 'mcsb-baseline-assignment'
scope: managementGroup(managementGroupId)
properties: {
displayName: 'Enforce Microsoft Cloud Security Benchmark'
description: 'Applies baseline security controls across all landing zone subscriptions.'
policyDefinitionId: '/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8'
enforcementMode: 'Default'
}
}

3. Configure Microsoft Defender for Cloud at Scale

To ensure all workload subscriptions automatically inherit Defender plans:

  1. Enable Defender Plan Auto-Provisioning: Configure continuous policy assignments at the Management Group level so any new subscription placed in Corp or Online automatically enables plans for Servers, Containers, Databases, and Storage.
  2. Auto-Deploy Endpoint Protection: Enable auto-provisioning for Microsoft Defender for Endpoint extensions on all Linux and Windows VMs.
  3. Agentless Vulnerability Scanning: Activate agentless scanning for VMs and container registries across all subscriptions.

4. Operational Checklist for Workload Onboarding

1.Subscription Placement:Placement.

Move the workload subscription under the appropriate Management Group archetype (Corp for internal hybrid workloads, Online for internet-facing apps).

Verification: Verify that inherited policy assignments appear under Subscription > Policies.

2.Enforce Perimeter Isolation:Network.

Provision Private Endpoints for all PaaS services and attach a Network Security Group (NSG) to every subnet. Route outbound traffic through the Central Azure Firewall.

Verification: Ensure public network access is disabled on the resource overview blade in the portal.

3.Configure Managed Identities:Identity.

Configure System-Assigned or User-Assigned Managed Identities for app-to-service authentication, eliminating hardcoded keys or credentials.

Verification: Check Entra ID enterprise applications to confirm Managed Identity registration.

Securing cloud workloads

Securing cloud workloads (IaaS virtual machines, PaaS services, container clusters, and serverless functions) requires enforcing defense-in-depth across identity, network perimeter, data protection, and continuous threat monitoring.

Core Security Configurations by Layer

1. Identity & Access Management (IAM)
  • Least Privilege Access: Assign granular Role-Based Access Control (RBAC) roles at the resource group or specific resource scope. Avoid global Owner or Contributor assignments.
  • Workload Identities: Use managed identities (Azure Managed Identities, AWS IAM Roles for Service Accounts) for app-to-service authentication instead of embedding service principal credentials or hardcoded API keys.
  • Privileged Identity Management (PIM): Enforce Just-In-Time (JIT) access and multi-factor authentication (MFA) for administrative operations.
2. Network & Perimeter Controls
  • Private Connectivity: Disable public IP addresses on databases, key vaults, and internal backend services using Private Endpoints / Private Link.
  • Traffic Inspection: Route outbound internet-bound traffic through a central firewall (e.g., Azure Firewall, AWS Network Firewall) to enforce FQDN/URL filtering.
  • Micro-segmentation: Enforce stateful packet filtering using Network Security Groups (NSGs) or Kubernetes NetworkPolicies to restrict East-West traffic between subnets and pods.
3. Data Protection & Secrets Management
  • Encryption at Rest: Enforce Customer-Managed Keys (CMK) via key vaults for storage accounts, database disks, and backups.
  • Encryption in Transit: Mandate TLS 1.2 or TLS 1.3 across all endpoints and disable plain HTTP/unencrypted database connections.
  • Centralized Secrets Storage: Store connection strings, certificates, and tokens in dedicated secret vaults (e.g., Azure Key Vault, AWS Secrets Manager) with auto-rotation policies.
4. Vulnerability & Threat Protection
  • Continuous Scanning: Enable Cloud Workload Protection Platforms (CWPP)—such as Microsoft Defender for Cloud or Wiz—for real-time threat detection and vulnerability scanning.
  • Container Image Security: Integrate image scanning into CI/CD pipelines and container registries to block images with known CVEs from being deployed.
  • Automated Audit Logging: Stream control-plane Activity Logs and resource diagnostic logs to a central Log Analytics workspace or SIEM (e.g., Microsoft Sentinel).

Workload Baseline Configurations

Workload TypeBaseline Security Configurations
Virtual Machines (IaaS)Enable Disk Encryption; enforce Just-In-Time (JIT) SSH/RDP access; deploy EDR agents (e.g., Defender for Endpoint); disable public IPs.
Containers (AKS / EKS)Turn on RBAC; enforce OPA Gatekeeper / Azure Policy for Kubernetes; isolate control plane via private cluster endpoints; scan container images.
PaaS & Web AppsAttach Web Application Firewall (WAF); enforce custom domain TLS certificates; restrict IP inbound ranges to front-end proxies only.
Serverless FunctionsSet short execution timeouts; restrict IAM execution role permissions to explicit target resources; validate input payloads against injection attacks.

Azure Network Security Policy interview questions

Here are top Azure Network Security Policy interview questions spanning core components—including Network Security Groups (NSGs), Application Security Groups (ASGs), Azure Firewall, and Web Application Firewall (WAF)—structured by role level with key architectural takeaways.

1. Foundational & Core Security Policy Questions

Q1: What is the difference between an NSG, an ASG, and an Azure Firewall?
  • Network Security Group (NSG): A basic Layer 3/4 stateful packet-filtering firewall applied at the Subnet or Network Interface (NIC) level. It evaluates rules based on source/destination IP, port, and protocol.
  • Application Security Group (ASG): A logical grouping of VMs based on workload type or application role (e.g., ASG-Web, ASG-DB). ASGs are used within NSGs as source/destination abstractions so you don’t need to maintain individual static IP addresses in security rules.
  • Azure Firewall: A fully managed, stateful, cloud-native Layer 3–7 firewall service. It supports threat intelligence, FQDN/URL filtering, IDPS (Intrusion Detection and Prevention System), TLS inspection, and central routing across multiple VNets.
Q2: How are NSG rules evaluated when both Subnet-level and NIC-level NSGs are applied?
  • Inbound Traffic: The Subnet NSG evaluates traffic first. If allowed, the packet moves to the NIC NSG. Traffic is blocked if either NSG denies it.
  • Outbound Traffic: The NIC NSG evaluates traffic first. If allowed, the packet moves to the Subnet NSG.
  • Key Takeaway: Both NSGs must explicitly allow the traffic for communication to succeed.

Q3: Explain NSG Rule Priority and Default Rules.

  • Priority Range: Rules are processed in order of priority from 100 to 4096 (lower numbers take higher precedence).
  • Evaluation: Once a packet matches a rule’s criteria, rule processing stops (first match wins).
  • Default Rules (Priority 65000+): Cannot be deleted, but can be overridden by adding higher-priority rules (e.g., < 65000):
    • AllowVNetInBound (65000)
    • AllowAzureLoadBalancerInBound (65001)
    • DenyAllInBound (65500)

2. Advanced Architecture & Deep-Dives

Q4: How does Azure Firewall Manager manage security policies across enterprise landing zones?
  • Answer: Azure Firewall Manager centralizes security policy and route management across multiple Azure Firewalls and Virtual WAN Hubs.
  • Firewall Policies: Hierarchical objects containing Rule Collection Groups (DNAT, Network, and Application rule collections).
  • Inheritance Model: Allows a central SecOps team to enforce a Parent Policy (e.g., global threat-intel blocking and core logging) while allowing application teams to append region-specific or app-specific rules via Child Policies.
Q5: Compare Azure Firewall vs. Web Application Firewall (WAF) on Azure Front Door / Application Gateway.
  • Azure Firewall: Broad L3–L7 network/application firewall designed for non-HTTP/HTTPS traffic, outbound egress filtering, and cross-subnet/cross-VNet inspection.
  • Azure WAF: Specialized L7 reverse-proxy firewall designed exclusively for HTTP/HTTPS web applications. Protects against OWASP Top 10 risks (SQLi, XSS), bot attacks, and rate limiting using managed rule sets (CRS).
Q6: How do NSG Service Tags and Application Security Groups simplify rule management?
  • Service Tags: System-managed aliases representing IP address prefixes for specific Azure services (e.g., Storage, Sql, AzureKeyVault). They automatically update when Microsoft adjusts backend IP ranges, removing the need to manage dynamic public IPs manually.
  • ASGs: Decouple security configurations from network topology. Rather than writing rules targeting explicit static IP addresses (10.0.1.4), you write rules using ASGs (Allow ASG-Web to ASG-DB on port 1433).

3. Scenario-Based Architectural Questions

Q7: Scenario: Traffic between two subnets in the same VNet is failing, but the NSG allows port 443. How do you troubleshoot?
  1. Rule Evaluation Check: Check for a higher-priority NSG rule (e.g., Priority 200 Deny vs. Priority 300 Allow) overriding the rule.
  2. Effective Security Rules: Use Azure Portal or CLI (az network nic show-effective-security-rules) to inspect the combined Subnet + NIC rule evaluation on the target VM.
  3. IP Flow Verify: Run Network Watcher IP Flow Verify with the specific 5-tuple payload to see which precise NSG and rule name is dropping packets.
  4. Local OS Firewall: Check if the internal OS firewall (Windows Firewall / iptables / ufw) on the VM itself is blocking inbound requests on port 443.
Q8: How do you enforce asymmetric routing prevention when implementing Azure Firewall in a Hub-and-Spoke topology?
  • Cause: Asymmetric routing occurs when request traffic reaches a spoke via an external route (e.g., direct public IP or Gateway), but return traffic is redirected to Azure Firewall via a 0.0.0.0/0 User Defined Route (UDR), causing the stateful firewall to drop the connection.
  • Fix: Enforce SNAT (Source Network Address Translation) on Azure Firewall for internal ranges, or adjust User Defined Routes (UDRs) and Gateway Subnet routing tables so both inbound and outbound legs traverse the same firewall instance.

4. Hands-On Configuration Example: Creating an NSG with Bicep

Below is an enterprise Bicep template demonstrating an NSG configuration with rule priorities, Service Tags, and Subnet association:

param location string = resourceGroup().location
// Define Application Security Group
resource webAsg 'Microsoft.Network/applicationSecurityGroups@2023-09-01' = {
name: 'asg-web-prod'
location: location
}
// Define Network Security Group with Custom Rules
resource webNsg 'Microsoft.Network/networkSecurityGroups@2023-09-01' = {
name: 'nsg-web-prod'
location: location
properties: {
securityRules: [
{
name: 'Allow-HTTP-Inbound-ASG'
properties: {
priority: 100
direction: 'Inbound'
access: 'Allow'
protocol: 'Tcp'
sourceAddressPrefix: 'Internet'
sourcePortRange: '*'
destinationApplicationSecurityGroups: [
{
id: webAsg.id
}
]
destinationPortRange: '443'
}
}
{
name: 'Deny-All-Inbound-Custom'
properties: {
priority: 4000
direction: 'Inbound'
access: 'Deny'
protocol: '*'
sourceAddressPrefix: '*'
sourcePortRange: '*'
destinationAddressPrefix: '*'
destinationPortRange: '*'
}
}
]
}
}

Troubleshoot routing issues in Azure

To troubleshoot routing issues in Azure, Network Watcher Next Hop calculates which route wins for a specific destination IP, while Effective Routes lists all active routes applied to a Virtual Machine’s Network Interface (NIC).

Prerequisites

  • Network Watcher must be enabled in the Azure region where your Virtual Machine (VM) resides.
  • You need Network Contributor or Reader permissions on the target VM and NIC.

1.Run Next Hop Diagnostics:Identify the Win Route.

First, check where a packet from your source VM will actually travel when attempting to reach the destination IP.

Option A: Via Azure Portal

  1. Search for Network Watcher in the top search bar.
  2. Under Network diagnostic tools, select Next hop.
  3. Choose your Subscription, Resource Group, Virtual Machine, and target Network Interface.
  4. Enter the Source IP address (the private IP of your VM NIC) and the Destination IP address you are trying to reach.
  5. Click Next hop.

Option B: Via Azure CLI

Bash

az network watcher show-next-hop \
--resource-group myResourceGroup \
--vm myVm \
--nic myVmVMNic \
--source-ip 10.0.0.4 \
--dest-ip 10.1.0.5 \
--out table
  • VirtualAppliance: Traffic is correctly hitting an Azure Firewall or NVA.
  • VirtualNetwork: Traffic stays within local/peered VNet subnets.
  • Internet: Traffic bypasses local appliances and goes directly to the web.
  • None: Traffic is being intentionally dropped (blackholed) due to a missing route or misconfigured 0.0.0.0/0 UDR.

2.View Effective Routes for the NIC:Inspect Full Routing Table.

If Next Hop returns unexpected results (like None or Internet when you expected a firewall), inspect the underlying complete route table evaluation.

Option A: Via Azure Portal

  1. Navigate to your Virtual Machine and select Networking under Settings.
  2. Click on the attached Network Interface (NIC) name.
  3. Under Help or Settings, select Effective routes.

Option B: Via Azure CLI

az network nic show-effective-route-table \
--resource-group myResourceGroup \
--name myVmVMNic \
--output table

Verification: Review the generated table. Look for:

  • Address Prefixes: Ensure your destination IP falls within an active prefix.
  • State: Verify routes show as Active. Invalid IP addresses or detached gateways will mark routes as Invalid.
  • Source: Identifies whether a rule originates from a Default system route, a User Defined Route (UDR), or a VirtualNetworkGateway (BGP).

3.Isolate and Fix the Misconfiguration:Resolution.

Compare the destination IP against the evaluated routes to correct the issue:

  • If Next Hop is None: A UDR with a destination prefix matching your traffic has Next Hop Type = None, or an RFC 1918 default blackhole route is active without a Gateway/UDR overriding it. Edit the associated Route Table to specify a valid Next Hop.
  • If Next Hop is Internet instead of NVA: The Route Table containing your 0.0.0.0/0 UDR is either not associated with the source VM’s subnet, or a more specific system/BGP route is taking precedence due to Longest Prefix Match.
  • If Next Hop is correct (VirtualAppliance) but traffic still fails: The routing layer is functioning properly. Switch to IP Flow Verify in Network Watcher to check if a Network Security Group (NSG) or Firewall policy is blocking the port/protocol.

User Defined Routes (UDRs)

User Defined Routes (UDRs) are custom network routing rules created in Azure to override or supplement Azure’s default network routing. They give you fine-grained control over how network traffic flows between subnets, Virtual Networks (VNets), on-premises environments, and the internet.

1. Why Are UDRs Needed?

By default, Azure automatically creates a System Route Table for every subnet in a VNet. System routes allow resources in a subnet to talk directly to:

  • Other resources in the same VNet.
  • Other VNets joined via VNet Peering.
  • The Internet (direct outbound access).
  • On-premises networks (if connected via VPN or ExpressRoute).

While convenient, default routing can create security and governance risks because resources can communicate directly without inspection.

UDRs allow you to break this default direct path. For example, instead of letting a database subnet send internet-bound traffic directly out to the web, a UDR forces that traffic to pass through an Azure Firewall or a Network Virtual Appliance (NVA) first for security inspection.

2. Core Components of a Route Table

A User Defined Route is contained inside a Route Table resource in Azure. A Route Table consists of:

  • Name: A descriptive label (e.g., udr-spoke-to-hub).
  • Address Prefix (Destination): The IP address range in CIDR notation (e.g., 0.0.0.0/0 for all internet traffic) that triggers the rule.
  • Next Hop Type: Where traffic matching the destination range should be forwarded.
  • Next Hop IP Address: The specific IP address of the firewall or virtual appliance (required when the Next Hop Type is set to Virtual Appliance).
Common Next Hop Types
Next Hop TypeUsage Scenario
Virtual ApplianceRoutes traffic to a specific internal IP address (e.g., an Azure Firewall private IP, Palo Alto, Fortinet, or custom proxy).
Virtual Network GatewayRoutes traffic to a VPN or ExpressRoute Gateway (used for forcing on-premises routing).
Virtual NetworkRoutes traffic within the VNet boundary (overriding default behavior).
InternetExplicitly routes traffic directly out to the public internet.
NoneDrops matching traffic completely (acts as a black hole / traffic sink).

3. How Azure Chooses Which Route to Use

When a packet leaves a subnet, Azure evaluates the available routes in a strict order:

┌──────────────────────────────────────────────────────────┐
│ Incoming Network Packet │
└────────────────────────────┬─────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────┐
│ 1. Longest Prefix Match (Most Specific Subnet/IP First) │
│ e.g., 10.0.1.0/24 takes priority over 10.0.0.0/16 │
└────────────────────────────┬─────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────────┐
│ 2. Route Origin Preference (If Prefixes Match Exactly) │
│ User Defined Route (UDR) ► OVERRIDES ► System Route │
└──────────────────────────────────────────────────────────┘
  1. Longest Prefix Match: Azure prefers the route with the most specific IP mask. A route destined for 10.1.1.0/24 will always beat a broader route destined for 10.0.0.0/8 or 0.0.0.0/0.
  2. UDR Precedence: If a UDR and a default System Route have the exact same destination prefix, the UDR wins and overrides the system route.

4. Common Real-World Use Cases

Scenario 1: Central Egress Inspection (Hub-and-Spoke Topology)

In an Enterprise Landing Zone, you want all outbound internet traffic from application spoke VNets to be inspected by a central Azure Firewall in the Hub VNet.

  • Route Table Name:udr-corp-spoke
  • Address Prefix:0.0.0.0/0
  • Next Hop Type:Virtual Appliance
  • Next Hop Address:10.0.0.4 (Azure Firewall Private IP)
  • Subnet Association: Associated with AppSubnet and DBSubnet.
Scenario 2: Preventing Direct Internet Exposure (Forced Tunneling)

You want to ensure that all internet traffic from Azure goes back to your on-premises data center via ExpressRoute/VPN before reaching the internet.

  • Address Prefix:0.0.0.0/0
  • Next Hop Type:Virtual Network Gateway

5. Key Best Practices & Gotchas

  • Subnet-Level Association: Route Tables are applied at the Subnet level, not at the VNet level or individual Virtual Machine level.
  • BGP Propagation Control: When connecting via ExpressRoute or VPN, BGP routes are automatically pushed to your subnets. You can disable Virtual network gateway route propagation on a Route Table to prevent on-premises routes from dynamically overriding local subnet policies.
  • Avoid Gateway Subnet Lockout: Never attach a 0.0.0.0/0 UDR with Next Hop = Virtual Appliance directly to the GatewaySubnet or AzureFirewallSubnet itself, as this will cause routing loops and break connectivity.

Azure network security configurations

Azure network security configurations rely on a defense-in-depth model operating across multiple layers (L3/L4 transport filtering, L7 application inspection, and platform-level perimeter defense).

Below is an overview of the primary Azure network security constructs, how they differ, and standard deployment patterns.

1. Network Access Control Controls

Network Security Groups (NSGs)
  • Scope:L3/L4 stateful packet inspection. Attached to Subnets or Network Interfaces (NICs).
  • Rule Syntax:Evaluates 5-tuple hash (Source IP, Source Port, Destination IP, Destination Port, Protocol) based on rule Priority (100–4096). Lower numbers take precedence.
  • Service Tags: Simplifies rule management by representing groups of IP address prefixes (e.g., VirtualNetwork, AzureCloud, Storage).
  • Application Security Groups (ASGs): Allows grouping virtual machines into logical application tiers (e.g., Web-Tier, DB-Tier) to write rules based on workload identity rather than explicit static IPs.
Azure Firewall
  • Scope:Fully managed, cloud-native L4/L7 stateful firewall deployed in a dedicated AzureFirewallSubnet.
  • Rule Engine:
    • DNAT Rules: Inbound port forwarding/translation.
    • Network Rules: L3/L4 filtering based on IP addresses, ports, and protocols.
    • Application Rules: Fully Qualified Domain Name (FQDN) filtering (e.g., allow *.github.com via HTTP/HTTPS).
  • SKU Tiers:
    • Basic:SMB workloads (< 250 Mbps).
    • Standard:L3–L7 filtering, threat intelligence-based filtering, DNS Proxy.
    • Premium:Signature-based Intrusion Detection & Prevention System (IDPS), TLS Inspection, and URL filtering.

2. Web & Perimeter Protection

ServiceOSI LayerScope / PlacementPrimary Use Case
Azure Web Application Firewall (WAF)Layer 7Integrated with Application Gateway or Azure Front DoorProtects HTTP/HTTPS apps from common web exploits (OWASP Top 10, SQLi, XSS) and rate limiting.
Azure DDoS ProtectionLayer 3/4Applied to Virtual Networks / Public IPsMitigates volumetric and protocol DDoS attacks with automated traffic profiling and adaptive tuning.
Azure BastionLayer 7Dedicated AzureBastionSubnetProvides agentless, secure RDP/SSH access to VMs directly via browser over TLS, keeping VMs free of public IP addresses.

3. Secure PaaS & Private Connectivity

To prevent Azure PaaS services (e.g., Storage Accounts, SQL Databases) from exposing public IP addresses:

  • Private Endpoints (Azure Private Link): Assigns a private IP address from your Virtual Network to an individual Azure PaaS instance. Eliminates public internet access and prevents data exfiltration risks.
  • Service Endpoints: Secures direct connection to PaaS endpoints by extending your VNet private address space over the Azure backbone, while keeping the public IP destination of the PaaS service.

4. Routing & Traffic Inspection Enforcers

By default, system routes in Azure allow VNet-to-VNet and outbound Internet communications directly. To force traffic through a centralized inspection point (like Azure Firewall or a Network Virtual Appliance):

  1. User Defined Routes (UDRs): Custom route tables attached to subnets.
  2. Next Hop Overrides: Route 0.0.0.0/0 (Internet) or internal VNet CIDRs to the private IP address of the Azure Firewall as the VirtualAppliance next hop.

Recommended Architecture Pattern: Hub-and-Spoke Topology

                  ┌─────────────────────────────────────────┐
                  │              Public Internet            │
                  └────────────────────┬────────────────────┘
                                       │
                               ┌───────▼───────┐
                               │  Azure WAF /  │ (Public Edge Inbound)
                               │  Front Door   │
                               └───────┬───────┘
                                       │
    ┌──────────────────────────────────▼──────────────────────────────────┐
    │ HUB VNet                                                            │
    │                                                                     │
    │  ┌───────────────────────────────────────────────────────────────┐  │
    │  │ AzureFirewallSubnet                                           │  │
    │  │ ┌───────────────────────────────────────────────────────────┐ │  │
    │  │ │                      Azure Firewall                       │ │  │
    │  │ └───────────────────────────────────────────────────────────┘ │  │
    │  └───────────────────────────────▲───────────────────────────────┘  │
    └──────────────────────────────────┼──────────────────────────────────┘
                                       │ (VNet Peering + UDR)
            ┌──────────────────────────┴──────────────────────────┐
            │                                                     │
    ┌───────▼─────────────────────────────┐       ┌───────────────▼─────────────────────┐
    │ SPOKE 1: Web App VNet               │       │ SPOKE 2: Backend VNet               │
    │                                     │       │                                     │
    │ ┌─────────────────────────────────┐ │       │ ┌─────────────────────────────────┐ │
    │ │ Subnet: Web Tier                │ │       │ │ Subnet: Database Tier           │ │
    │ │  • NSG: Allow inbound 443 from  │ │       │ │  • NSG: Allow 1433 from Web     │ │
    │ │    Firewall Subnet              │ │       │ │    subnet only                  │ │
    │ │  • UDR: Default route to FW     │ │       │ │  • Private Endpoint (SQL DB)    │ │
    │ └─────────────────────────────────┘ │       │ └─────────────────────────────────┘ │
    └─────────────────────────────────────┘       └─────────────────────────────────────┘
  1. Centralized Inspection: All spoke traffic routes through the central Hub VNet where the Azure Firewall resides.
  2. Micro-Segmentation: Spoke subnets use localized NSGs to limit lateral movement between subnets (e.g., blocking direct access to the database layer from non-web tiers).
  3. Private Access: Backend resources communicate externally or with PaaS using Private Endpoints.

filter and convert specific Microsoft Defender for Cloud (MDC) alerts into tailored Microsoft Sentinel Incidents,

To filter and convert specific Microsoft Defender for Cloud (MDC) alerts into tailored Microsoft Sentinel Incidents, you write custom Kusto Query Language (KQL) rules using the SecurityAlert table.

1. Understand How MDC Alerts Are Stored

When Defender for Cloud streams alerts into Sentinel, they populate the SecurityAlert table. The key fields used for filtering are:

  • ProviderName: For MDC alerts, this is typically ProtectionCenter, MDFC, or specific engines like Azure Security Center.
  • AlertName: The title of the alert (e.g., “Unfamiliar ASP.NET app execution”, “Potential SQL Injection”).
  • AlertSeverity: Severity level (High, Medium, Low, Informational).
  • Entities: JSON array containing detailed entity metadata (IPs, Hosts, Accounts, Azure Resources).
  • ExtendedProperties: JSON dictionary containing alert-specific context (e.g., process command line, query text).

2. Crafting Custom KQL Alert Queries

Example 1: High-Severity Storage & Database Alerts

Filter only for High severity MDC alerts targeting Storage Accounts or SQL Databases:

Code snippet

SecurityAlert
| where TimeGenerated >= ago(1h)
| where ProviderName in ("ProtectionCenter", "MDFC", "Azure Security Center")
| where AlertSeverity == "High"
// Filter by specific alert types or resource categories
| where AlertName has_any ("SQL", "Storage", "Blob", "Key Vault")
| extend CompromisedResource = Properties
| project TimeGenerated, SystemAlertId, AlertName, AlertSeverity, Description, CompromisedResource, Entities
Example 2: Suspicious Process Execution on VMs (Excluding Approved Dev Machines)

Filter for server alerts related to suspicious processes while suppressing noise from non-production resource groups:

Code snippet

SecurityAlert
| where TimeGenerated >= ago(1h)
| where ProviderName in ("ProtectionCenter", "MDFC")
| where AlertName has_any ("Suspicious Process", "Malware", "Execution")
// Parse entities to extract the targeted computer name or Azure resource
| extend ExtractedHost = tostring(parse_json(Entities)[0].HostName)
| extend ResourceGroup = tostring(parse_json(ExtendedProperties)["Resource Group"])
// Suppress noise from non-prod/test resource groups
| where ResourceGroup !has "rg-dev-" and ResourceGroup !has "rg-test-"
| project TimeGenerated, SystemAlertId, AlertName, AlertSeverity, ExtractedHost, ResourceGroup, Entities

3. Step-by-Step: Creating the Analytics Rule in Sentinel

1.Open Analytics Rules:Sentinel Navigation.

  1. In the Azure Portal, open Microsoft Sentinel.
  2. Under Configuration on the left menu, select Analytics.
  3. Click + Create at the top and select NRT query rule (for real-time evaluation) or Scheduled query rule.

2.Set General Properties:Rule Details.

  1. Name: Give your rule a descriptive title (e.g., MDC: High-Severity SQL Injection Attempts).
  2. Description: State the purpose of the custom filter.
  3. Tactics and Techniques: Map to MITRE ATT&CK categories (e.g., Initial Access, Execution).
  4. Severity: Set the severity level for the generated incident.

3.Set Query, Mapping, and Scheduling:Rule Logic.

  1. Set rule logic: Paste your refined KQL query into the Set rule logic field.
  2. Entity Mapping: Map query fields to Sentinel entities so incident analysts see structured context:
    • Host$\rightarrow$ExtractedHost
    • IP$\rightarrow$IPAddress
    • Azure Resource$\rightarrow$ResourceGroup
  3. Query scheduling: Set Run query every (e.g., 1 hour) and Lookup data from the last (e.g., 1 hour).

4.Configure Grouping and Alert Suppression:Incident Settings.

  1. Incident creation: Ensure Create incidents from alerts triggered by this analytics rule is Enabled.
  2. Alert grouping: Choose whether to group multiple matching alerts into a single incident (e.g., group alerts triggered within 5 hours for the same resource).

5.Validate and Save:Review.

  1. Click Review + create and select Save.
  2. The custom rule will now periodically run against incoming Defender for Cloud alerts and automatically create high-fidelity Sentinel incidents.

Best Practice Tip: Suppress Duplicate Incidents

Because the native Microsoft Defender for Cloud data connector can create default Sentinel incidents, turn off the default incident creation setting on the connector page OR disable specific rules if you are replacing them with custom KQL rules. This prevents duplicate incidents from cluttering your SOC queue.