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.
API Management Security Architecture
Scroll sideways to see the whole 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.
| Property | Value |
|---|---|
| Defender Plan | Defender for APIs |
| Azure Policy Built-in | Yes — VNet deployment, TLS version, private endpoint, named values |
| Recommended Tier | Premium (VNet integration, multi-region, private endpoints) |
| Key Feature | Internal VNet mode with validate-jwt policy for Entra ID token enforcement |
Baseline Controls
| Domain | Feature | Supported | Default | Responsibility |
|---|---|---|---|---|
| NS | Internal VNet Mode | ✓ | Manual | Customer |
| NS | Private Endpoint | ✓ | Manual | Customer |
| IM | OAuth 2.0 + JWT Validation | ✓ | Manual | Customer |
| IM | Managed Identity | ✓ | Manual | Customer |
| DP | TLS 1.2+ Enforcement | ✓ | Manual | Customer |
| LT | Defender for APIs | ✓ | Manual | Customer |
| LT | Diagnostic Logging | ✓ | Manual | Customer |
Internal VNet Mode
Private Endpoint
OAuth 2.0 + JWT Validation
Managed Identity
TLS 1.2+ Enforcement
Defender for APIs
Diagnostic Logging
Azure Portal Instructions
API Management Baseline Configuration Workflow
- Navigate to your API Management service resource in the Azure Portal.
- Under Deployment + infrastructure, select Virtual network and deploy APIM in Internal mode if backend APIs are private.
- Under Security, select Managed identities and enable system-assigned managed identity.
- Under Security, select Protocols + ciphers and disable TLS 1.0/1.1. Keep only TLS 1.2+ ciphers.
- Under APIs, configure OAuth 2.0 + JWT validation policies to require Entra ID tokens.
- Under Monitoring, enable diagnostic settings for GatewayLogs, WebSocketConnectionLogs, and AllMetrics.
Terraform: Secure API Management (Internal VNet)
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
- Navigate to your API Management resource in the Azure Portal
- In the left menu under Deployment + infrastructure, select Virtual network
- Change the VNet type to Internal
- Select the VNet and subnet for APIM deployment
- Click Apply and then Save (this may take 30-45 minutes)
- Deploy Application Gateway or Front Door in front of APIM for external access with WAF
IM-1 — OAuth 2.0 + JWT Validation
- In the Azure Portal, open API Management > APIs
- Select an API and click the Inbound processing policy editor
- Add the validate-jwt policy with your Entra ID tenant issuer URL
- Set the required audience to match your API app registration
- Optionally add required-claims to enforce specific roles or scopes
- Apply the policy at the All APIs level for global enforcement
- Test by sending a request without a valid token — it should return 401
IM-3 — Managed Identity
- Navigate to your API Management resource in the Azure Portal
- In the left menu under Security, select Managed identities
- On the System assigned tab, set Status to On and click Save
- Use the managed identity in policies:
<authentication-managed-identity resource="https://target.service.url" /> - Grant the managed identity access to Key Vault for TLS certificate retrieval
- Assign appropriate RBAC roles on backend services
DP-3 — TLS 1.2+ Enforcement
- Navigate to your API Management resource in the Azure Portal
- In the left menu under Security, select Protocols + ciphers
- Under Protocols, disable TLS 1.0 and TLS 1.1 for both client and backend
- Under Ciphers, disable weak ciphers (RC4, triple DES, etc.)
- Keep only strong TLS 1.2+ cipher suites
- Click Save
LT-1 — Defender for APIs
- Navigate to Microsoft Defender for Cloud in the Azure Portal
- In the left menu, select Environment settings
- Select your subscription
- Under Cloud Workload Protection (CWP), find the APIs row
- Toggle the plan to On
- Click Save — API Management APIs will be inventoried and monitored for threats
LT-3 — Diagnostic Logging
- Navigate to your API Management resource in the Azure Portal
- In the left menu under Monitoring, select Diagnostic settings
- Click + Add diagnostic setting
- Select log categories: GatewayLogs, WebSocketConnectionLogs
- Select AllMetrics under Metrics
- Select the destination: Send to Log Analytics workspace
- Select your Log Analytics workspace
- Click Save
APIM + Application Gateway Pattern
Evidence Collection
The gateway is the control here, so the evidence is the policy that runs on it plus a request that proves it ran:
The MCSB v1 control:
The control id - NS-1, IM-1, IM-3, DP-3, LT-1, LT-3 - against the APIM instance and the policy scope it was found at (global, product, API or operation).
The resource id and the deployment mode:
The instance id with the SKU and virtualNetworkType, because Internal VNet mode, private endpoints and multi-region are Premium-only and change which controls are applicable.
The effective policy XML:
The exported validate-jwt policy with the issuer, audience and any required-claims, taken from the scope that actually applies. An API-level policy that inherits from All APIs must be evidenced at the inherited scope.
A request and its response: The request you sent without a token and the 401 returned, with the timestamp - then the same request with a valid token. Policy that is not exercised is configuration, not an enforced control.
False Positive Identification
- Inherited from a parent policy scope: A <code>validate-jwt</code> at the All APIs scope or in a policy fragment applies to every operation, and an empty API-level policy is not a gap. Read the inheritance chain before reporting missing authentication.
- Set by a parent scope or the edge: Rate limiting and WAF protection may live at Front Door or Application Gateway rather than in APIM, and a policy assignment at management-group scope may already enforce the TLS floor. Check both before writing the finding.
- Preview or tier-limited: A v2 tier feature or a preview policy is not an applied control. Confirm the tier and that the deployment ran, rather than reading the provider schema.
- Correctly marked not applicable: An internally published API with no external consumers legitimately has no public WAF finding, and a backend that does not speak TLS has no DP-3 backend finding beyond the flag that disables it.
Baseline Verification Checklist
Gateway placement
- ☐ Confirm Internal VNet mode and that the instance is reachable only through the Front Door or Application Gateway in front of it (NS-1).
- ☐ Confirm the developer portal and the management endpoint are not publicly reachable (NS-2).
- ☐ Confirm a private endpoint exists where the design requires one, with public access disabled.
Authentication
- ☐ Confirm <code>validate-jwt</code> runs at the widest scope, with issuer, audience and required claims set (IM-1).
- ☐ Confirm subscription keys are not the only gate on any operation, and that unused products are removed.
- ☐ Confirm backend calls use the managed identity rather than a stored credential (IM-3).
Transport and detection
- ☐ Confirm both frontend and backend TLS floors are 1.2 or higher, with SSL 3.0, TLS 1.0 and 1.1 disabled (DP-3).
- ☐ Confirm weak ciphers are removed from the protocol and cipher configuration.
- ☐ Confirm GatewayLogs and WebSocketConnectionLogs reach the workspace, and that Defender for APIs is on (LT-1, LT-3).
Remediation & Defense
Close the control at the layer that owns it - the gateway policy, the identity, or the edge in front.
Gateway
- • Internal VNet mode with Application Gateway WAF v2 or Front Door in front, so no client reaches APIM directly (NS-1, NS-6).
- • Private endpoint for the gateway where the design allows it, with public network access disabled (NS-2).
- • Rate limiting and quota policies per subscription, sized from measured traffic rather than guessed.
Identity and transport
- • A <code>validate-jwt</code> policy at the All APIs scope, enforcing issuer, audience and required claims (IM-1).
- • Managed identity authentication to backends, with per-backend RBAC rather than a shared secret (IM-3).
- • Frontend and backend TLS floors of 1.2 or higher with legacy protocols and weak ciphers disabled (DP-3).
Detection
- • Defender for APIs enabled on the subscription so the APIM APIs are inventoried and monitored (LT-1).
- • GatewayLogs, WebSocketConnectionLogs and AllMetrics routed to the workspace, with alerts on 401 and 429 spikes (LT-3).
- • An alert on policy changes at the All APIs scope - the single change that can disable every auth control at once.