ION DocsV3
  • Architecture
    • ION Architecture V2
      • ION V2 — Architecture Overview
      • V2 context
        • V2 capacity model
        • V2 constraints
        • V2 integration boundaries
        • V2 requirements
        • V2 solution strategy
      • V2 Structural Design
        • ION V2 Landscape
        • ION V2 Platform Views
          • ION V2 Delivery and Runway
          • ION V2 Incident-Processing Pipelines
          • ION V2 Platform Networking
          • ION V2 Platform Observability
          • ION V2 Platform Security
        • ION V2 System Context
        • ION V2 Systems
          • Alya System Topology
          • Cogs System Topology
          • Ion IQ System Topology
          • Kingsman System Topology
          • Pigeon System Topology
          • Veritas System Topology
          • Watchtower System Topology
      • V2 evolution and platform lineage
        • Tiberium Origins
          • Tiberium Architecture Overview
          • Tiberium Components Architecture Overview
        • Voyager and the V2 Merge
          • Voyager Architecture Overview
          • Voyager Identity Architecture Overview
          • Voyager Services Architecture Overview
      • V2 Platform Architecture
        • Alya Workbench
          • Mission Brief: Alya (Workbench for Cyber Defenders)
        • Asset Discovery
        • Automation
        • Customer Communications
          • Notification and Escalation Design
        • Reporting and Dashboards
        • Vulnerability Mitigations
      • V2 Well-Architected
        • V2 Reliability
          • Availability Architecture
        • V2 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V2 Security Architecture
          • Teams Notification Security
          • Customer Data and PII
          • V2 Identity
            • Applications and Authorization
            • V2 Identity Architecture
            • Microsoft Entra ID
            • V2 Identity Standard
            • V2 Identity Implementation
              • Application Registration
              • Application Roles
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Managed Identity
            • V2 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Portal Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Customer Environment Access Architecture
            • Customer Environment Access Guidelines
            • Customer Environment Access How-to
    • ION Architecture V3
      • ION V3 Architecture Overview
      • V3 context
        • V3 capacity model
        • V3 constraints
        • V3 integration boundaries
        • V3 requirements
        • V3 solution strategy
      • V3 Structural Design
        • Data and events
          • Archival and retention
          • Event model
          • Event sourcing
          • Event store
          • Micro-frontend interaction
          • Recovery and disaster recovery
          • Replay and reconstruction
          • Reporting and customer analytics
          • Event-sourcing requirements
          • Snapshots
          • UI interaction
        • ION v3 domains
          • Assets domain
            • Assets domain flows
            • Assets domain implementation
            • Assets domain model
          • Customer Collaboration domain
            • Customer Collaboration domain flows
            • Customer Collaboration domain implementation
            • Customer Collaboration domain model
          • Incident domain
            • Incident domain flows
            • Incident domain implementation
            • Incident domain model
          • Investigation domain
            • Investigation domain flows
            • Investigation domain implementation
            • Investigation domain model
          • Remediation domain
            • Remediation domain implementation
            • Remediation domain model
          • Ticket domain
            • Ticket domain flows
            • Ticket domain implementation
            • Ticket domain model
        • ION V3 Landscape
        • ION V3 Platform Views
          • Internal API
            • Internal API architecture
            • Internal API consumer guide
            • Internal API identity and access
            • Internal API implementation
          • Micro-Frontends
            • Micro-Frontends architecture
            • Micro-Frontends capability service (Signet)
            • Micro-Frontends composition
            • Micro-Frontends identity and access
            • Micro-Frontends implementation
            • Micro-Frontends real-time (SignalR)
            • Micro-Frontends routing and ingress
            • Shells and MFEs
          • SOAR Integration
            • SOAR Integration architecture
            • SOAR Integration customer onboarding
            • SOAR Integration Identity and Access Design
            • SOAR Integration implementation
            • SOAR Integration operations
        • ION V3 System Context
        • ION V3 systems
          • Alya
          • Cogs
          • ION IQ
          • Kingsman
          • Pigeon
          • Veritas
          • Watchtower
      • V2 to V3 evolution
        • V2 to V3 architecture delta
        • V2 to V3 decision changes
        • V2 to V3 migration guidance
        • V2 to V3 service impact
      • Well-Architected
        • Cost Optimization
          • Cost Governance
            • Cost Governance Architecture
            • Cost Governance Guidelines
            • Cost Governance Implementation
          • SKU Strategy
            • SKU Strategy Architecture
            • SKU Strategy Guidelines
            • SKU Strategy Implementation
        • Operational excellence
          • Audit Logs
            • Audit Logs Architecture
            • Audit Logs Guidelines
            • Audit Logs Implementation
          • CI/CD Runway
            • CI/CD Runway Architecture
            • CI/CD Runway Guidelines
            • CI/CD Runway Implementation
          • Feature Flags
            • Feature Flags Architecture
            • Feature Flags Guidelines
            • Feature Flags Implementation
          • Incident management
            • Incident management architecture
            • Incident management guidelines
            • Incident management implementation
          • Azure Landing Zone
            • Azure Landing Zone Architecture
            • Azure Landing Zone Guidelines
            • Azure Landing Zone Implementation
          • Notifications
            • Notifications Architecture
            • Notifications Guidelines
            • Notifications Implementation
          • Observability
            • Observability Architecture
            • Observability Guidelines
            • Observability Implementation
        • Performance efficiency
          • Capacity, sizing, and scaling
            • Capacity, sizing, and scaling architecture
            • Capacity, sizing, and scaling guidelines
            • Implement capacity, sizing, and scaling
          • UI responsiveness
            • UI responsiveness architecture
            • UI responsiveness guidelines
            • Implement UI responsiveness
        • V3 reliability
          • Application resilience patterns
          • Critical flows
          • Customer reliability assurance
            • ION Platform reliability and service continuity
            • Customer reliability slides
          • Disaster recovery
            • Disaster recovery architecture
            • Disaster recovery guidelines
            • Disaster recovery implementation
              • DR implementation: API Management
              • DR implementation: App Configuration
              • DR implementation: Application Gateway
              • DR implementation: Azure SQL Database
              • DR implementation: Container Apps
              • DR implementation: Container Registry
              • DR implementation: Cosmos DB
              • DR implementation: Event Hubs
              • DR implementation: Azure Front Door
              • DR implementation: Function Apps
              • DR implementation: Key Vault
              • DR implementation: Log Analytics and Application Insights
              • DR implementation: MySQL Flexible Server (Temporal)
              • DR implementation: PostgreSQL Flexible Server
              • DR implementation: Azure Managed Redis
              • DR implementation: Service Bus
              • DR implementation: SignalR
              • DR implementation: Storage accounts
            • Operational-data replication
            • Disaster recovery operations
          • Edge and routing
            • Azure Application Gateway
              • Azure Application Gateway architecture
              • Azure Application Gateway guidelines
              • Azure Application Gateway implementation
              • Azure Application Gateway resiliency
              • Azure Application Gateway security
            • Azure Front Door
              • Azure Front Door architecture
              • Azure Front Door guidelines
              • Azure Front Door implementation
              • Azure Front Door resiliency
              • Azure Front Door security
          • Event-store disaster recovery (moved)
          • Failure mode analysis
          • Graceful degradation
            • Graceful degradation architecture
            • Graceful degradation guidelines
            • Graceful degradation implementation
          • V3 reliability maturity model
            • V3 reliability maturity assessment
            • Maturity level 2: self-preservation
            • Maturity level 3: recovery readiness
            • Maturity level 4: maintain stability
            • Maturity level 5: stay resilient
          • Multi-region replication
            • Multi-region replication architecture
            • Multi-region replication guidelines
            • Multi-region replication implementation assessment
          • Reliability testing
          • Scaling and headroom
          • Targets and health model
          • Trade-offs and accepted risks
        • V3 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • API Contracts and Asynchronous Operations
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V3 Security Architecture
          • Data protection
            • Data protection architecture
            • Data protection guidelines
            • Data protection implementation guidelines
              • API Management
              • Application Gateway
              • Azure SQL Database
              • Azure Container Apps
              • Azure Cosmos DB
              • Azure Front Door
              • Azure Function Apps
              • Azure Database for MySQL
              • Azure Database for PostgreSQL
              • Data protection procedures
          • V3 Security Guidelines
          • V3 Identity
            • Applications and Authorization in ION V3
            • V3 Identity Architecture
            • Capabilities
            • Microsoft Entra ID for ION V3
            • V3 Identity Standard
            • V3 Identity Implementation
              • App Service Authentication
              • Application Registration
              • Application Roles
              • Customer Azure RBAC
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Mailbox-Scoped Access
              • Managed Identity
              • Workload Identity Federation
            • V3 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Azure RBAC Identity Workflow
              • Customer Portal Identity Workflow
              • Mailbox Access Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Shell and MFE Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Azure Lighthouse
              • Azure Lighthouse implementation
            • GDAP and Tenant Governance
              • Access Packages (legacy)
              • GDAP human access implementation
            • Customer environment access guidelines
            • Multi-tenant Entra apps
              • Multi-tenant Entra apps implementation
            • Teams B2B Direct Connect
              • Teams B2B Direct Connect implementation
          • Network Security
            • Network Security Architecture
            • Network Security Guidelines
            • Network Security Implementation
              • Egress and Static IPs
              • Resource Access Restrictions
          • V3 Security Patterns
    • ION Architecture V4
      • How V4 evolves from V3
  • Principles
  • Patterns
    • Application Permissions Only
    • Async REST
    • Audit Logs (Pattern)
    • Auth / AuthZ
    • Dead Letter Queue (DLQ)
    • Dual Writes (and how to avoid them)
    • ECST — Event-Carried State Transfer
    • Event Hubs Throttling
    • Feature Flags (Pattern)
    • Idempotent Write
    • MFE UI Interaction
    • Notifications (Pattern)
    • Private Data Store Access
    • Schema Evolution
    • Service Bus Topic Throttling
    • UI Interaction with an Event-Sourced Backend
  • Standards
    • API Standard
    • API Standards
    • Coding Standard
    • Coding Standards
    • Documentation Standard
    • Documentation Standards
    • Microservice Standard
    • Microservice Checklist
    • Operational Readiness Standard
    • ORR — Operational Readiness Review Checklist
  • Decisions
    • ADR-0001
    • ADR-0002
    • ADR-0003
    • ADR-0004
    • ADR-0005
    • ADR-0006
    • ADR-0007
    • ADR-0008
    • ADR-0009
    • ADR-0010
    • ADR-0011
    • ADR-0012
    • ADR-0013
    • ADR-0014
    • ADR-0015
    • ADR-0016
    • ADR-0017
    • ADR-0018
    • ADR-0019
    • ADR-0020
    • ADR-0021
    • ADR-0022
    • ADR-0023
    • ADR-0024
    • ADR-0025
    • ADR-0026
    • ADR-0027
    • ADR-0028
    • ADR-0029
    • ADR-0030
    • ADR-0031
    • ADR-0032
    • ADR-0033
    • ADR-0034
  • Services
  • Governance
    • Assumptions
    • Discrepancies
    • V3 reference coverage and conflict matrix
OntinueION Docs
  1. Architecture
  2. ION Architecture V3
  3. Well-Architected
  4. V3 Security
  5. API Management
  6. API Management Implementation
  7. APIM Global Policy Implementation

APIM Global Policy Implementation

security
VersionV2V3
architecturev3

APIM Global Policy Implementation

This page documents the global Rome APIM policy as deployed. It is based on the Terraform and environment policy files under rome-ion/infrastructure/spoke/apim, rather than on a generic APIM design. The V3 global policy is the V2 global policy; nothing in its control flow has changed. What has changed is the V3 standard for X-Authorization and the edge, which the policy does not yet meet.

The global policy authenticates the caller, validates customer-tenant status, creates trusted request context, applies backend concurrency, forwards the request, and invokes shared trace fragments. Product, API, and operation policies extend this baseline through <base />.

Source and environment selection

Terraform selects one policy file using the environment short code:

module "rome-apim-global-policy" {
  depends_on        = [module.rome-apim, module.rome-apim-policy-fragments]
  source            = "<approved-api-management-policy-module>"
  api_management_id = module.rome-apim.apim_id

  apim_policy_globals = {
    customer_concurrency = 20
  }

  apim_policy = {
    apim = "${path.cwd}/apim_policies/apim_global_policy_${var.environment_short}.xml"
  }
}

The deployed files are apim_global_policy_apa.xml, apim_global_policy_bta.xml, apim_global_policy_gma.xml, and apim_global_policy_prd.xml. Their control flow is equivalent, but their allowed audiences and backend concurrency are environment-specific.

EnvironmentPolicy suffixPer-API concurrencyMFE UI audience in list
Alphaapa30✓
Betabta30✓
Gammagma200✓
Productionprd200✗

The Terraform input customer_concurrency = 20 does not determine the hard-coded XML values. This drift, carried over from V2, must be resolved before treating that input as authoritative.

Deployed execution flow

The initial tid parse is only routing input for tenant lookup. It is not an authentication decision. Trust is established only after validate-jwt succeeds. The tenant-validation URL is built from the fixed {{APIM-TENANT-VALIDATION-URL}} base with only the parsed tid appended (Verified), so the unvalidated claim cannot select an arbitrary host. The tid format is not validated before use.

Note that there is no X-Azure-FDID step in this flow (gap APIM-02).

Inbound execution order

OrderPolicy implementationEffective behaviorFailure behavior
1check-headerRequires a case-sensitive Authorization header.APIM returns 401 Not authorized.
2set-headerPreserves a caller-supplied X-Transaction-Id; otherwise generates a time/GUID-based value.Policy evaluation fails if the expression cannot execute.
3TryParseJwt in set-variableParses the bearer value without validating it and reads tid into jwt-tid.Missing or unparseable tid is traced and returns 401.
4set-variableBuilds the tenant-validation URL, cache key, and Ontinue-tenant flag.Subsequent tenant processing fails closed.
5cache-lookup-valueFor a non-Ontinue tenant, checks cached active status.A miss invokes tenant validation.
6send-request with HEADOn a cache miss, calls the tenant-validation API using the primary APIM UAMI and the {{APIM-AZURE-AD-APPLICATION-ID}} audience.Request failure enters on-error; non-200 status becomes inactive.
7cache-store-valueCaches the Boolean result for {{APIM-TENANT-CACHE-DURATION}} (1,800 seconds).Missing/false status returns a traced 401.
8validate-jwtValidates the bearer token against the organizations and Ontinue OpenID metadata, environment audiences, tenant-bound v1 and v2 issuers, signature, and lifetime. Stores the validated token as jwt.APIM rejects the token and enters error processing.
9choose claim checksRequires roles and tid claims.Each missing claim is traced and returns 401.
10choose token-type checkRejects idtyp=app for non-Ontinue tenants; customer traffic must be user traffic.Traced 401.
11set-header overrideOverwrites X-Tenant-Id with tid from the validated JWT.Request does not proceed with an untrusted tenant header.
12set-header skipSets Authorization to itself with exists-action="skip". Because the header always exists here, this is a no-op.None. API policy later overrides Authorization for the backend.
13set-header skipCopies Authorization to X-Authorization only if X-Authorization is absent.Gap APIM-01: a client-supplied X-Authorization survives unchanged.
14set-header overrideOverwrites Forwarded with original scheme, host, and path.No local rejection.
15include-fragmentInvokes the request trace fragment.Fragment failure enters on-error.

Tenant activation sub-flow

The deployed tenant lookup is skipped for the Ontinue tenant. Every other tenant uses a cache-first validation call:

<cache-lookup-value
  key="@(context.Variables.GetValueOrDefault&lt;string&gt;(&quot;jwt-tid-cache-key&quot;, &quot;NIL&quot;))"
  variable-name="jwt-tid-cache-value" />

<choose>
  <when condition="@(!context.Variables.ContainsKey(&quot;jwt-tid-cache-value&quot;))">
    <send-request
      mode="new"
      response-variable-name="tenant-state"
      timeout="20"
      ignore-error="false">
      <set-url>@(context.Variables.GetValueOrDefault&lt;string&gt;("tenant-validation-url", "NIL"))</set-url>
      <set-method>HEAD</set-method>
      <authentication-managed-identity
        resource="{{APIM-AZURE-AD-APPLICATION-ID}}"
        client-id="{{APIM-MSI-CLIENT-ID}}"
        ignore-error="false" />
    </send-request>

    <set-variable
      name="jwt-tid-cache-value"
      value="@(((IResponse)context.Variables[&quot;tenant-state&quot;]).StatusCode == 200)" />
    <cache-store-value
      key="@(context.Variables.GetValueOrDefault&lt;string&gt;(&quot;jwt-tid-cache-key&quot;, &quot;NIL&quot;))"
      value="@((bool)context.Variables[&quot;jwt-tid-cache-value&quot;])"
      duration="{{APIM-TENANT-CACHE-DURATION}}" />
  </when>
</choose>

Only HTTP 200 means active. Unknown, inactive, or unavailable tenant state must not silently become authorized. The 30-minute cache duration bounds how quickly customer offboarding takes effect at this layer.

JWT validation

The real policy contains an environment-specific audience list. The sanitized shape is:

<validate-jwt
  header-name="Authorization"
  require-scheme="Bearer"
  require-signed-tokens="true"
  output-token-variable-name="jwt">
  <openid-config url="https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration" />
  <openid-config url="{{APIM-ONTINUE-OPENID-CONFIGURATION-URL}}" />
  <audiences>
    <audience>{{APIM-PORTAL-API-AUDIENCE}}</audience>
    <audience>{{APIM-PLATFORM-API-AUDIENCE}}</audience>
    <audience>{{APIM-INTERNAL-API-AUDIENCE}}</audience>
    <audience>{{APIM-MFE-UI-AUDIENCE}}</audience> <!-- apa, bta, gma only -->
  </audiences>
  <issuers>
    <issuer>{{APIM-ONTINUE-V1-ISSUER}}</issuer>
    <issuer>{{APIM-CALLER-TENANT-V1-ISSUER}}</issuer>
    <issuer>{{APIM-ONTINUE-V2-ISSUER}}</issuer>
    <issuer>{{APIM-CALLER-TENANT-V2-ISSUER}}</issuer>
  </issuers>
</validate-jwt>

The placeholders above are illustrative. The deployed files hard-code the audience GUIDs and Ontinue issuer, which is why the policy is per environment. The production file also has development comments listing application names and IDs; they should be removed.

Global policy checks that a roles claim exists; operation policy decides which Ion.* role authorizes a route. Possessing any role is therefore not sufficient to invoke any operation, provided the operation template enforces its role (see APIM-05).

Headers after global inbound policy

HeaderDeployed sourceTrust and use
AuthorizationOriginal caller bearer tokenValidated at global scope. API or operation policy later overrides it with an APIM UAMI token for backend OAuth.
X-AuthorizationCopy of the original caller bearer token, unless the client already sent oneCaller context for the receiving service. Not trustworthy until APIM-01 is fixed; backends must validate it. Must not be logged, stored, or propagated.
X-Tenant-Idtid from the validated JWTTrusted gateway-derived tenant context. The backend must still enforce its customer and operation rules.
X-Transaction-IdCaller value or generated valueEnd-to-end correlation. Services propagate it to dependent calls.
ForwardedOriginal scheme, host, and pathRouting context; not an authorization grant.

Relationship to product, API, and operation policy

After global inbound completes, inherited policy executes:

  1. For MFE APIs, the product policy rate-limits, applies the tenant quota, and validates the capability token with Signet, failing closed with 403.
  2. API policy selects the backend and applies API-level rate limits.
  3. API or operation policy obtains a token using an approved APIM UAMI and overrides backend Authorization.
  4. Operation policy rewrites the URI and requires the operation’s Ion.* role.
  5. The inherited global backend section forwards the request.

The original caller token and backend token have different purposes. The first authorizes caller-to-APIM access. The second authenticates APIM to the OAuth-protected compute resource.

Backend, outbound, and error sections

The deployed backend section isolates concurrency by context.Api.Id, emits a trace containing backend URL, API ID, and operation ID, and forwards with a 120-second timeout:

<backend>
  <limit-concurrency key="@(context.Api.Id)" max-count="${environment_concurrency}">
    <trace source="ION Platform API Request" severity="information">
      <message>ION Platform APIM Concurrency Request</message>
      <metadata name="BackendEndpointUri" value="@(context.Request.Url.ToString())" />
      <metadata name="ApiId" value="@(context.Api.Id)" />
      <metadata name="OperationId" value="@(context.Operation.Id)" />
    </trace>
    <forward-request timeout="120" fail-on-error-status-code="true" />
  </limit-concurrency>
</backend>

fail-on-error-status-code="true" routes backend 4xx and 5xx responses through APIM error processing. The outbound section invokes fragment-response-trace; the on-error section invokes fragment-error-trace.

Trace fragments: deployed behavior and required target

The fragments are installed before global policy because the global policy references them by ID.

FragmentDeployed behaviorRequired safe target behavior
RequestUses existing jwt, or parses X-Authorization before Authorization. Logs correlation/request IDs, preferred_username, oid, aud, azp, all non-auth request headers, original URI, and the full request body.Log bounded route, correlation, outcome, and timing metadata. Do not log raw claims, broad headers, or request bodies by default.
ResponseIf jwt is absent, attempts token parsing. Logs non-auth response headers, rate-limit counters, status/reason, and the full response body.Log bounded status, timing, cache, and rate-limit metadata. Do not log response bodies or broad headers by default.
ErrorLogs identity claims and roles when available, request and response headers, rate-limit values, URLs, full response body, and serialized APIM error details.Log a stable error category, policy location, status, route, and correlation ID. Minimize identity and exception detail and never emit customer payloads.

The response fragment’s fallback reads X-Authorization and then, when that value is not NIL, replaces it with Authorization (Verified, unchanged from V2). This inverted condition can select the backend APIM token instead of the caller token. It is a defect, not a pattern to reproduce.

The fragments exclude Authorization and X-Authorization from their header dumps, but their identity and body capture is unsafe for a shared customer platform. Because webhook APIs include fragment-request-trace without a validated jwt, the fragment also logs provider payloads. For Twilio, that includes caller phone numbers (gap APIM-03). New policies MUST follow the minimized trace example in Policy authoring.

Public health bypass

Policy inheritance depends on <base />. The public GET and HEAD health operation policies deliberately omit it from inbound, apply an IP rate limit, and return a synthetic response without calling a backend.

<inbound>
  <rate-limit-by-key
    calls="200"
    renewal-period="60"
    counter-key="@(context.Request.IpAddress)" />
  <return-response>
    <set-status code="200" reason="OK" />
    <set-body>{ "status": "Healthy" }</set-body>
  </return-response>
</inbound>

Authenticated health includes <base />, requires the health-read role, and returns a synthetic result. Neither operation proves backend readiness. The other reviewed exceptions are the provider webhook APIs, which bypass global inbound authentication but retain global backend, outbound, and error inheritance. No ordinary protected operation may omit global inbound inheritance.

Known implementation risks

These findings describe deployed behavior. They do not relax the API Management Guidelines. Rows without a new ID are V2 risks carried forward; their status is as of 2026-10-15.

IDSeverityRiskCurrent implementationRequired dispositionStatus
APIM-01HighCaller-controlled X-Authorization (V2 carry-over)Global policy uses exists-action="skip" (apim_global_policy_prd.xml, lines 240–242). Identity docs previously claimed APIM always overwrites it.Change to exists-action="override" in all four environment files. Add a negative test that an injected header is replaced.Open
APIM-02HighDirect gateway access bypasses the Front Door WAFNo global X-Azure-FDID check or ip-filter; classic Standard tier without VNet. Conflicts with SEC-4 and ADR-0015, including its priority-2 failover-origin exception.Add a global check-header on X-Azure-FDID = {{APIM-FRONT-DOOR-ID}} before check-header Authorization, returning 403. Exempt only the public health operations.Open
APIM-03MediumExcessive trace data (V2 carry-over), now including webhook payloadsFragments capture bodies, claims, and broad headers. The Twilio and Graph webhook APIs include fragment-request-trace.Replace with bounded, redacted telemetry and controlled sampling. Remove body-logging fragments from webhook and unauthenticated APIs now.Open
APIM-04LowNotifications to a personal mailboxAutoscale notification targets an individual’s email.Route to an owned team channel or action group.Open
APIM-05MediumOperation roles not enforced in SignetSignet’s apim-api-operation.xml rewrites the path and acquires the MI token but has no role check, so roles_csv is ignored. The signet-int /v1/validations route therefore accepts any globally-valid token and can act as a capability-validation oracle.Add the standard role choose block to the template, and restrict signet-int to the APIM identity or an explicit role.Open
—LowConcurrency configuration driftTerraform supplies 20; XML hard-codes 30 or 200.Make one configuration source authoritative and test rendered policy.Open
—LowUnvalidated tenant pre-routingtid is parsed before JWT validation to select tenant status. The base URL is a fixed named value.Validate tid format before use and keep authorization dependent on validated JWT.Partially mitigated
—MediumOriginal token copied broadlyGlobal policy creates X-Authorization for every inherited route.Keep, per the amended ADR-0014, but only after APIM-01 is fixed so the value is APIM-owned. Routes that need no caller context should override it with APIM’s token.Accepted with condition
—LowResponse trace fallbackInverted condition can choose the wrong token for parsing.Correct the condition or remove token parsing from response tracing.Open
—MediumLarge global audience catalogueOne global list accepts several application audiences; production lacks the MFE UI audience.Keep lists environment-controlled, pair every route with explicit operation or capability authorization, and add the MFE UI audience to production at go-live.Open
Recommended APIM-02 fix
<inbound>
  <check-header
    name="X-Azure-FDID"
    failed-check-httpcode="403"
    failed-check-error-message="Request was not routed through Front Door."
    ignore-case="false">
    <value>{{APIM-FRONT-DOOR-ID}}</value>
  </check-header>
  <!-- existing global inbound policy, starting with check-header Authorization -->
</inbound>

The public health operations already omit inbound <base />, so they are exempt without extra logic. Verify first that Application Gateway forwards the X-Azure-FDID header unchanged. The manual Front Door outage bypass in ADR-0015 sends traffic to Application Gateway without Front Door, so its runbook must include a step to relax this check for the duration of the outage. Inferred: the SignalR WebSocket leg does not traverse APIM, so it is unaffected; confirm before rollout.

Validation checklist

For each environment, verify:

  • missing Authorization returns 401;
  • malformed tokens and tokens without tid fail closed;
  • inactive, unknown, and unavailable customer tenants are denied;
  • valid Ontinue tokens skip customer-tenant lookup;
  • signature, lifetime, issuer, and environment audience are validated;
  • missing roles and tid claims are denied;
  • external-tenant application tokens are denied;
  • X-Tenant-Id comes only from the validated token;
  • a client-supplied X-Authorization is replaced (APIM-01);
  • a request without the expected X-Azure-FDID is denied (APIM-02);
  • every protected API and operation inherits global policy;
  • operation policy requires the intended Ion.* role (APIM-05);
  • API or operation policy replaces backend Authorization with the expected APIM UAMI token;
  • concurrency and timeout match the approved environment configuration;
  • only public health and reviewed webhook APIs bypass global inbound authentication; and
  • traces contain no bearer tokens, customer payloads, unnecessary identity data, or unrestricted exception details (APIM-03).

Related pages

  • Policy model
  • API Management architecture
  • Platform provisioning
  • Webhook flow implementation
  • Policy authoring
  • Deployment and debugging

On this page

  • Source and environment selection
  • Deployed execution flow
  • Inbound execution order
  • Tenant activation sub-flow
  • JWT validation
  • Headers after global inbound policy
  • Relationship to product, API, and operation policy
  • Backend, outbound, and error sections
  • Trace fragments: deployed behavior and required target
  • Public health bypass
  • Known implementation risks
  • Validation checklist
  • Related pages
PreviousAPIM Deployment and Debugging
NextAPIM Platform Provisioning
Edit on GitHubSecurity