6 min read

Integration

Integration Security Baselines

Integration services expose and manage APIs across organizational boundaries. API Management is the gateway that controls authentication, rate limiting, and observability for all API traffic — making it a critical security control point in modern architectures.

1
Services
7
Controls
7
Customer-Owned
7
Manual Controls
1/1
Private Endpoint
1/1
Defender Coverage
API Management Security Architecture diagram

API Management

Full-lifecycle API gateway with built-in developer portal, OAuth 2.0 flow management, rate limiting, and policy-based request/response transformation. APIM should be deployed in Internal VNet mode for production — fronted by Application Gateway or Front Door with WAF for external access.

PropertyValue
Defender PlanDefender for APIs
Azure Policy Built-inYes — VNet deployment, TLS version, private endpoint, named values
Recommended TierPremium (VNet integration, multi-region, private endpoints)
Key FeatureInternal VNet mode with validate-jwt policy for Entra ID token enforcement

Baseline Controls

NS ✓ Supported

Internal VNet Mode

○ Manual Customer
NS ✓ Supported

Private Endpoint

○ Manual Customer
IM ✓ Supported

OAuth 2.0 + JWT Validation

○ Manual Customer
IM ✓ Supported

Managed Identity

○ Manual Customer
DP ✓ Supported

TLS 1.2+ Enforcement

○ Manual Customer
LT ✓ Supported

Defender for APIs

○ Manual Customer
LT ✓ Supported

Diagnostic Logging

○ Manual Customer

Azure Portal Instructions

API Management Baseline Configuration Workflow
  1. Navigate to your API Management service resource in the Azure Portal.
  2. Under Deployment + infrastructure, select Virtual network and deploy APIM in Internal mode if backend APIs are private.
  3. Under Security, select Managed identities and enable system-assigned managed identity.
  4. Under Security, select Protocols + ciphers and disable TLS 1.0/1.1. Keep only TLS 1.2+ ciphers.
  5. Under APIs, configure OAuth 2.0 + JWT validation policies to require Entra ID tokens.
  6. Under Monitoring, enable diagnostic settings for GatewayLogs, WebSocketConnectionLogs, and AllMetrics.

Terraform: Secure API Management (Internal VNet)

hcl
resource "azurerm_api_management" "main" {
  name                = "apim-prod"
  resource_group_name = azurerm_resource_group.integration.name
  location            = azurerm_resource_group.integration.location
  publisher_name      = "Contoso Security"
  publisher_email     = "apim-admin@contoso.com"
  sku_name            = "Premium_1"

  # NS-1: Internal VNet mode
  virtual_network_type = "Internal"

  virtual_network_configuration {
    subnet_id = azurerm_subnet.apim.id
  }

  # IM-3: System-assigned managed identity
  identity {
    type = "SystemAssigned"
  }

  # DP-3: TLS 1.2+ enforcement
  protocols {
    enable_http2 = true
  }

  security {
    enable_backend_ssl30  = false
    enable_backend_tls10  = false
    enable_backend_tls11  = false
    enable_frontend_ssl30 = false
    enable_frontend_tls10 = false
    enable_frontend_tls11 = false
  }
}

# IM-1: Global JWT validation policy
resource "azurerm_api_management_policy" "global" {
  api_management_id = azurerm_api_management.main.id

  xml_content = <<XML
<policies>
  <inbound>
    <validate-jwt header-name="Authorization" failed-validation-httpcode="401"
      failed-validation-error-message="Unauthorized. Access token required.">
      <openid-config url="https://login.microsoftonline.com/{tenant-id}/v2.0/.well-known/openid-configuration" />
      <audiences>
        <audience>api://{api-app-id}</audience>
      </audiences>
      <issuers>
        <issuer>https://sts.windows.net/{tenant-id}/</issuer>
      </issuers>
    </validate-jwt>
    <rate-limit calls="100" renewal-period="60" />
  </inbound>
</policies>
XML
}

# LT-3: Diagnostic Logging
resource "azurerm_monitor_diagnostic_setting" "apim" {
  name                       = "diag-apim-prod"
  target_resource_id         = azurerm_api_management.main.id
  log_analytics_workspace_id = azurerm_log_analytics_workspace.main.id

  enabled_log { category = "GatewayLogs" }
  enabled_log { category = "WebSocketConnectionLogs" }
  metric { category = "AllMetrics" }
}
resource "azurerm_api_management" "main" {
  name                = "apim-prod"
  resource_group_name = azurerm_resource_group.integration.name
  location            = azurerm_resource_group.integration.location
  publisher_name      = "Contoso Security"
  publisher_email     = "apim-admin@contoso.com"
  sku_name            = "Premium_1"

  # NS-1: Internal VNet mode
  virtual_network_type = "Internal"

  virtual_network_configuration {
    subnet_id = azurerm_subnet.apim.id
  }

  # IM-3: System-assigned managed identity
  identity {
    type = "SystemAssigned"
  }

  # DP-3: TLS 1.2+ enforcement
  protocols {
    enable_http2 = true
  }

  security {
    enable_backend_ssl30  = false
    enable_backend_tls10  = false
    enable_backend_tls11  = false
    enable_frontend_ssl30 = false
    enable_frontend_tls10 = false
    enable_frontend_tls11 = false
  }
}

# IM-1: Global JWT validation policy
resource "azurerm_api_management_policy" "global" {
  api_management_id = azurerm_api_management.main.id

  xml_content = <<XML
<policies>
  <inbound>
    <validate-jwt header-name="Authorization" failed-validation-httpcode="401"
      failed-validation-error-message="Unauthorized. Access token required.">
      <openid-config url="https://login.microsoftonline.com/{tenant-id}/v2.0/.well-known/openid-configuration" />
      <audiences>
        <audience>api://{api-app-id}</audience>
      </audiences>
      <issuers>
        <issuer>https://sts.windows.net/{tenant-id}/</issuer>
      </issuers>
    </validate-jwt>
    <rate-limit calls="100" renewal-period="60" />
  </inbound>
</policies>
XML
}

# LT-3: Diagnostic Logging
resource "azurerm_monitor_diagnostic_setting" "apim" {
  name                       = "diag-apim-prod"
  target_resource_id         = azurerm_api_management.main.id
  log_analytics_workspace_id = azurerm_log_analytics_workspace.main.id

  enabled_log { category = "GatewayLogs" }
  enabled_log { category = "WebSocketConnectionLogs" }
  metric { category = "AllMetrics" }
}

Azure Portal Instructions

Step-by-step instructions for configuring each API Management control through the Azure Portal.

NS-1 — Internal VNet Mode
  1. Navigate to your API Management resource in the Azure Portal
  2. In the left menu under Deployment + infrastructure, select Virtual network
  3. Change the VNet type to Internal
  4. Select the VNet and subnet for APIM deployment
  5. Click Apply and then Save (this may take 30-45 minutes)
  6. Deploy Application Gateway or Front Door in front of APIM for external access with WAF
IM-1 — OAuth 2.0 + JWT Validation
  1. In the Azure Portal, open API Management > APIs
  2. Select an API and click the Inbound processing policy editor
  3. Add the validate-jwt policy with your Entra ID tenant issuer URL
  4. Set the required audience to match your API app registration
  5. Optionally add required-claims to enforce specific roles or scopes
  6. Apply the policy at the All APIs level for global enforcement
  7. Test by sending a request without a valid token — it should return 401
IM-3 — Managed Identity
  1. Navigate to your API Management resource in the Azure Portal
  2. In the left menu under Security, select Managed identities
  3. On the System assigned tab, set Status to On and click Save
  4. Use the managed identity in policies: <authentication-managed-identity resource="https://target.service.url" />
  5. Grant the managed identity access to Key Vault for TLS certificate retrieval
  6. Assign appropriate RBAC roles on backend services
DP-3 — TLS 1.2+ Enforcement
  1. Navigate to your API Management resource in the Azure Portal
  2. In the left menu under Security, select Protocols + ciphers
  3. Under Protocols, disable TLS 1.0 and TLS 1.1 for both client and backend
  4. Under Ciphers, disable weak ciphers (RC4, triple DES, etc.)
  5. Keep only strong TLS 1.2+ cipher suites
  6. Click Save
LT-1 — Defender for APIs
  1. Navigate to Microsoft Defender for Cloud in the Azure Portal
  2. In the left menu, select Environment settings
  3. Select your subscription
  4. Under Cloud Workload Protection (CWP), find the APIs row
  5. Toggle the plan to On
  6. Click Save — API Management APIs will be inventoried and monitored for threats
LT-3 — Diagnostic Logging
  1. Navigate to your API Management resource in the Azure Portal
  2. In the left menu under Monitoring, select Diagnostic settings
  3. Click + Add diagnostic setting
  4. Select log categories: GatewayLogs, WebSocketConnectionLogs
  5. Select AllMetrics under Metrics
  6. Select the destination: Send to Log Analytics workspace
  7. Select your Log Analytics workspace
  8. Click Save

APIM + Application Gateway Pattern

The most common production pattern is APIM in Internal VNet mode behind Application Gateway WAF v2. App Gateway handles TLS termination, WAF rules, and public-facing traffic, while APIM handles authentication, rate limiting, and API routing — creating a defense-in-depth API security architecture.